Fixed some usage output to group sources to logserver or node
This commit is contained in:
		
							
								
								
									
										38
									
								
								log-search
									
									
									
									
									
								
							
							
						
						
									
										38
									
								
								log-search
									
									
									
									
									
								
							| @@ -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>] | ||||
|  | ||||
| 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*) | ||||
|   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/<hostname>/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 <regex>    : Will be used to filter only the services you want to  | ||||
|     -d|--debug                   : Turns on debugging | ||||
|     -o|--output-file <filename>  : Filename to output to | ||||
|     --remote <hostname>          : This will run the gathering code remotely  | ||||
|     --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  | ||||
|     -d|--debug                     : Turns on debugging | ||||
|     -o|--output-file <filename>    : Filename to output to | ||||
|     --remote <hostname>            : This will run the gathering code remotely  | ||||
|   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: | ||||
|     -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 | ||||
|     -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 | ||||
|   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 | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user