Folder Watch Wizard
Posted: Tue Jun 13, 2023 11:16 am
Using the 'Folder Watch' wizard, I created a service to check the size of /home/nagios/procmail.log on our Nagios development server (localhost). After testing, I created the same service on our production server using the same command, but the one on production is giving me an error:
COMMAND
ERROR
You must specify files to check on with '-F'
Usage: /usr/local/nagios/libexec/folder_watch.pl [-v] [-t <timeout>] -D <directory> -F <files to check> -w <warn level(s)> -c <crit level(s)> [-a [<warn age>,<crit age>]] [-s [<warn size>,<crit size>]] [-S [<warn size>,<crit size>]] [-f] [-r] [-l] [-T files
The exact same command works fine on our development server. Both servers running CentOS Linux release 7.9.2009 (Core) and Nagios 5.10.0.
This command, which is similar to what Nagios is trying to run, works at the command line of both servers:
and gives this result:
Any assistance would truly be appreciated.
Steve
COMMAND
Code: Select all
check_file_size_age!-C 'ls -l /home/nagios/procmail.log' -F '/home/nagios/procmail.log' -T 'files'! -s 40960000,46080000You must specify files to check on with '-F'
Usage: /usr/local/nagios/libexec/folder_watch.pl [-v] [-t <timeout>] -D <directory> -F <files to check> -w <warn level(s)> -c <crit level(s)> [-a [<warn age>,<crit age>]] [-s [<warn size>,<crit size>]] [-S [<warn size>,<crit size>]] [-f] [-r] [-l] [-T files
The exact same command works fine on our development server. Both servers running CentOS Linux release 7.9.2009 (Core) and Nagios 5.10.0.
This command, which is similar to what Nagios is trying to run, works at the command line of both servers:
Code: Select all
/usr/local/nagios/libexec/folder_watch.pl -C 'ls -l /home/nagios/procmail.log' -F '/home/nagios/procmail.log' -s 40960000,46080000Code: Select all
OK - Largest size file is 1441910 bytes, 1 /home/nagios/procmail.log files foundSteve