From bbd879a79261724dad8cf7b9ac2e56859bc7732c Mon Sep 17 00:00:00 2001 From: Tristan Ancelet Date: Sat, 18 May 2024 13:34:18 -0500 Subject: [PATCH] Fixed some usage output to group sources to logserver or node --- log-search | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/log-search b/log-search index d7be7d1..f02c484 100644 --- a/log-search +++ b/log-search @@ -67,32 +67,34 @@ usage () { $( basename $0 ) [-s|--source ] [-m|--mode ] [--services] [-l|--last-nth-days ] [-H|--hostname ] [-d|--debug] [-o|--output-file ] Sources: - log : When used on the log-server for a customer environment (references the hosts messages file /var/log/hosts//YYYY/MM/DD/messages*) - ilog : Log, but it will let you chose which files you will be checking against. (interactive) - journal (default) : When used on a node (referenced a nodes journal for finding errors) - file : search through a local file + Logserver: + log : When used on the log-server for a customer environment (references the hosts messages file /var/log/hosts//YYYY/MM/DD/messages*) + ilog : Log, but it will let you chose which files you will be checking against. (interactive) + Global: + file : search through a local file + journal (default) : When used on a node (referenced a nodes journal for finding errors) Search Modes - 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]}) - 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 + 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]}) + 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 Flags: Universal: - --services : Get all the service names that return from the search - -f|--filter-regex : Will be used to filter only the services you want to - -d|--debug : Turns on debugging - -o|--output-file : Filename to output to - --remote : This will run the gathering code remotely + --services : Get all the service names that return from the search + -f|--filter-regex : Will be used to filter only the services you want to + -d|--debug : Turns on debugging + -o|--output-file : Filename to output to + --remote : This will run the gathering code remotely File Source: - --filename : File that contains logs that you want to use for the file source + --filename : File that contains logs that you want to use for the file source Log & iLog Source: - -l|--last-nth-days : (only used with log source) Search for logs in the last nth days. - -H|--hostname : Hostname to search against + -l|--last-nth-days : (only used with log source) Search for logs in the last nth days. + -H|--hostname : Hostname to search against Journal Source: - --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) + --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) EOF }