I am using nagios o centos server and i only want to monitor the localhost only.
I have defined my service like this
define service{
host_name localhost
service_description Site1Service
check_command check_http-site1
use generic-service
notification_interval 1440
}
and
command like this in commands.cfg
define command{
command_name check_http-site1
command_line /usr/lib/nagios/plugins/check_http -H site1.dreaddomain.com
}
I am getting critical error in there. so i want to check from command line if that service is running or not
You actually have the answer in your config - just execute in shell:
/usr/lib/nagios/plugins/check_http -H site1.dreaddomain.com
You may add -v for verbose output.
Nagios is only a scheduler and executes commands at specified intervals. Then reports the state based on response.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With