check_file_size configuration
Posted: Thu Jul 12, 2012 8:01 am
I am trying to setup "check_file_size.sh" plugin on my linux system.
Command line is giving perfect output as given below.
./check_file_size.sh --maxwarn 18000 --maxcrit 25000 -v /root/script/
Verbose Mode ON
--> `/root/script/'
Size of /root/script/ is 17940, validating
FILE OK: All files (1) fall within requested parameters
But, making same entry in "commands.cfg" & "switch.cfg" doesn't work. Here is my both files.
define command{
command_name check_file_size.sh
command_line /usr/local/nagios/libexec/check_file_size.sh /root/script 19000 25000
}
#####################################
define service{
use local-service ; Name of service template to use
host_name localhost
service_description /root/script/ Directory Size
check_command check_file_size.sh
notifications_enabled 1
}
Nagios Web Front End is giving below message.
Not a file or directory (or doesn't exist), don't know what to do with /root/script
Advanced Thanks for the solution.
Nishith
Command line is giving perfect output as given below.
./check_file_size.sh --maxwarn 18000 --maxcrit 25000 -v /root/script/
Verbose Mode ON
--> `/root/script/'
Size of /root/script/ is 17940, validating
FILE OK: All files (1) fall within requested parameters
But, making same entry in "commands.cfg" & "switch.cfg" doesn't work. Here is my both files.
define command{
command_name check_file_size.sh
command_line /usr/local/nagios/libexec/check_file_size.sh /root/script 19000 25000
}
#####################################
define service{
use local-service ; Name of service template to use
host_name localhost
service_description /root/script/ Directory Size
check_command check_file_size.sh
notifications_enabled 1
}
Nagios Web Front End is giving below message.
Not a file or directory (or doesn't exist), don't know what to do with /root/script
Advanced Thanks for the solution.
Nishith