{{tag>nagios monitoring}}
====== Add new check on localhost (nagios itself) ======
1. Define new command in ///usr/local/nagios/etc/commands///
define command {
command_name check_my_service
command_line $USER1$/check_http -H example.com -u "http://example.com/health/someapi/" -a :
}
Above is example for checking http with authorization (see ''check_http --help'' for options)
2. Add a check with the name of the command that you defined above to ///usr/local/nagios/etc/services///
define service{
use generic-service
service_description Check for my new service
check_command check_my_service
host_name localhost
}
====== Tested on ======
* NagiosĀ® Coreā¢ 4.2.2
* Debian 11
====== See also ======
* [[wiki:add_new_nagios_check_remote_host|Add new nagios check on remote host]]
====== References ======