atc0005 / notes

Various notes, quick references and topics I want to explore further
MIT License
0 stars 0 forks source link

Nagios | Exclude hosts from hostgroup-based service check #57

Open atc0005 opened 2 years ago

atc0005 commented 2 years ago
define service {
    host_name                !BOX STATUS,!localhost
    service_description      check ssh
    use                      generic-service
    hostgroup_name           HPC ACTIVE
    check_command            check_ssh!!!!!!!!
    initial_state            o
    max_check_attempts       5
    check_interval           5
    retry_interval           1
    active_checks_enabled    1
    check_period             24x7
    contacts                 events
    register                 1
}

In this example, the BOX STATUS and localhost hosts are excluded from the check ssh service check against the hosts within the HPC ACTIVE hostgroup.