0

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

1 Answer 1

1
su - nagios -s /bin/bash -c '/usr/lib/nagios/plugins/check_http -H site1.dreaddomain.com'
8
  • No , i want to check check_http-site1 not check_http. that i know it work
    – Pandora
    Jul 9, 2013 at 9:42
  • check_http-site1 is just a command name that actually runs the above command as the nagios user.
    – quanta
    Jul 9, 2013 at 9:45
  • yes but i want to know if that is working or not , or i have messed with something
    – Pandora
    Jul 10, 2013 at 1:34
  • Have you tried the above command?
    – quanta
    Jul 10, 2013 at 1:38
  • yes that is working , but my new command was not working , so i wanted to know how to check that
    – Pandora
    Jul 10, 2013 at 1:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .