Regarding check_command

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Yoshi
Posts: 1
Joined: Mon Apr 21, 2014 2:09 am

Regarding check_command

Post by Yoshi »

I'm not sure whether I should post my question here.
I just registered my account.
I don't know how to use. I'm sorry.

I'd like to know about the difference of check_commad parameter both used in hosts.cfg and services.cfg.
"check_command" parameter is written in hosts.cfg.
"check-host-alive" is defined for check_commad parameter in the hosts.cfg uses .

There is also a "check_command" parameter in services.cfg.
"check_http" is defined for check_commad parameter in the services.cfg.

Could anybody differentiate the check_command parameters in different config files?

Regards
Yoshi
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Regarding check_command

Post by tmcdonald »

A check_command entry tells the host or service what command to use when determining its status. So if you have "check_http" as the check_command, then every time that service runs a check it will look for the check_http command.

If you look in commands.cfg you will see the definition for the check_http command, and that will tell Nagios what plugin to use and what arguments to pass to the plugin. Commands and plugins are different, but they are often named pretty similarly, so it can get confusing.
Former Nagios employee
Locked