Fixed some usage output to group sources to logserver or node

This commit is contained in:
Tristan Ancelet 2024-05-18 13:34:18 -05:00
parent 25bb829ccb
commit bbd879a792

View File

@ -67,32 +67,34 @@ usage () {
$( basename $0 ) [-s|--source <source>] [-m|--mode <mode>] [--services] [-l|--last-nth-days <int>] [-H|--hostname <hostname>] [-d|--debug] [-o|--output-file <filename>] $( basename $0 ) [-s|--source <source>] [-m|--mode <mode>] [--services] [-l|--last-nth-days <int>] [-H|--hostname <hostname>] [-d|--debug] [-o|--output-file <filename>]
Sources: Sources:
log : When used on the log-server for a customer environment (references the hosts messages file /var/log/hosts/<hostname>/YYYY/MM/DD/messages*) Logserver:
ilog : Log, but it will let you chose which files you will be checking against. (interactive) log : When used on the log-server for a customer environment (references the hosts messages file /var/log/hosts/<hostname>/YYYY/MM/DD/messages*)
journal (default) : When used on a node (referenced a nodes journal for finding errors) ilog : Log, but it will let you chose which files you will be checking against. (interactive)
file : search through a local file Global:
file : search through a local file
journal (default) : When used on a node (referenced a nodes journal for finding errors)
Search Modes Search Modes
cluster : Searching for errors that are cluster related (matches regex: ${SEARCH_MODES[CLUSTER]}) cluster : Searching for errors that are cluster related (matches regex: ${SEARCH_MODES[CLUSTER]})
issues : General issues that report a warning, failure, error, critical, etc (matches regex: ${SEARCH_MODES[ISSUES]}) issues : General issues that report a warning, failure, error, critical, etc (matches regex: ${SEARCH_MODES[ISSUES]})
custom [custom-regex] : Requires you to provide your own regex as the next argument (make sure to escape your string carefully) custom [custom-regex] : Requires you to provide your own regex as the next argument (make sure to escape your string carefully)
all (default) : Just output all logs provided by your source all (default) : Just output all logs provided by your source
Flags: Flags:
Universal: Universal:
--services : Get all the service names that return from the search --services : Get all the service names that return from the search
-f|--filter-regex <regex> : Will be used to filter only the services you want to -f|--filter-regex <regex> : Will be used to filter only the services you want to
-d|--debug : Turns on debugging -d|--debug : Turns on debugging
-o|--output-file <filename> : Filename to output to -o|--output-file <filename> : Filename to output to
--remote <hostname> : This will run the gathering code remotely --remote <hostname> : This will run the gathering code remotely
File Source: File Source:
--filename <file> : File that contains logs that you want to use for the file source --filename <file> : File that contains logs that you want to use for the file source
Log & iLog Source: Log & iLog Source:
-l|--last-nth-days <int> : (only used with log source) Search for logs in the last nth days. -l|--last-nth-days <int> : (only used with log source) Search for logs in the last nth days.
-H|--hostname <hostname> : Hostname to search against -H|--hostname <hostname> : Hostname to search against
Journal Source: Journal Source:
--hours : This will narrow down to within the last X hours (cannot be used with --days) --hours : This will narrow down to within the last X hours (cannot be used with --days)
--days : This will narrow down to within the last X days (cannnot be used with --hours) --days : This will narrow down to within the last X days (cannnot be used with --hours)
EOF EOF
} }