User Tools

Site Tools


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 -u "" -a <username>:<password> 

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_server.txt · Last modified: 2023/02/03 16:43 by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki