diff --git a/nlog b/nlog index ba2851b..4753f0e 100755 --- a/nlog +++ b/nlog @@ -40,17 +40,16 @@ print_help() { echo " --to , default=now" echo " --notime don't convert timestamp to human time" 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 ) scan 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 " HH:MM[:SS] MM/DD/YYYY MM/DD/YYYY HH:MM[:SS] -2 (ie, two days ago)" - echo "So to see yesterday's critical service alerts, try this:" - echo " $0 [-A SERVICE] [-a ALERT] -f 00:00 -t 23:59 -y 1" - echo "The logic for scanning which files to search relies upon Nagios rotating log" - echo "files once per day, at midnight. This causes a \"LOGFILE ROTATE\" message to" - echo "occur in the logfile, which this program uses to determine if the logfile could" - 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." + echo " HH:MM[:SS] YYYY-MM-DD YYYY-MM-DD HH:MM[:SS]*" + echo "This program does not directly scan log files other than the current one. If you want" + echo "to scan older files, use the --file option. Note that this can be combined with the" + echo "--from and --to options, but keep in mind that file names are named based on the date they" + echo "were rotated, not the date of their contents." + echo "*Due to the awk pattern matching, dates before 2020-09-09 will produce empty output." exit; }