|
|
|
@ -40,17 +40,16 @@ print_help() {
|
|
|
|
echo " --to <to time>, default=now"
|
|
|
|
echo " --to <to time>, default=now"
|
|
|
|
echo " --notime don't convert timestamp to human time"
|
|
|
|
echo " --notime don't convert timestamp to human time"
|
|
|
|
echo " -c|--constant) the equivalent of a tail -f on the Nagios log file"
|
|
|
|
echo " -c|--constant) the equivalent of a tail -f on the Nagios log file"
|
|
|
|
echo "All input is evaluated as a regexp for pattern matching."
|
|
|
|
echo " --file <file[s]>) scan <file[s]> instead of $file; use \"...\" if wildcards"
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
echo "All input is evaluated as a case-insensitive regexp surrounded by wildcards."
|
|
|
|
echo "Time values can be in the following formats:"
|
|
|
|
echo "Time values can be in the following formats:"
|
|
|
|
echo " HH:MM[:SS] MM/DD/YYYY MM/DD/YYYY HH:MM[:SS] -2 (ie, two days ago)"
|
|
|
|
echo " HH:MM[:SS] YYYY-MM-DD YYYY-MM-DD HH:MM[:SS]*"
|
|
|
|
echo "So to see yesterday's critical service alerts, try this:"
|
|
|
|
echo "This program does not directly scan log files other than the current one. If you want"
|
|
|
|
echo " $0 [-A SERVICE] [-a ALERT] -f 00:00 -t 23:59 -y 1"
|
|
|
|
echo "to scan older files, use the --file option. Note that this can be combined with the"
|
|
|
|
echo "The logic for scanning which files to search relies upon Nagios rotating log"
|
|
|
|
echo "--from and --to options, but keep in mind that file names are named based on the date they"
|
|
|
|
echo "files once per day, at midnight. This causes a \"LOGFILE ROTATE\" message to"
|
|
|
|
echo "were rotated, not the date of their contents."
|
|
|
|
echo "occur in the logfile, which this program uses to determine if the logfile could"
|
|
|
|
echo "*Due to the awk pattern matching, dates before 2020-09-09 will produce empty output."
|
|
|
|
echo "contain valid information for the date range specified on the command line."
|
|
|
|
|
|
|
|
echo "While this dramatically speeds up file processing time, it could lead to skipped"
|
|
|
|
|
|
|
|
echo "data if the Nagios logfile rotation schedule is ever changed."
|
|
|
|
|
|
|
|
exit;
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|