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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.