Domů | Blogy | Blog uživatele kamilhlavka

Nagios

// vytvorime hosta bez default notifikace

 

define host{
        use                    generic-host            ; Name of host template to use
        host_name       velkenemcice
        alias                   velkenemcice            
       address             velkenemcice.cz
        notifications_enabled   0    
}

 

// na hostovi budem testovat službu, port 443, https

 

define service{
        use                             generic-service         ; Name of service template to use
        host_name               velkenemcice
        service_description  test-port-https
        check_command      check_tcp!443
      
        }

 

# Generic host definition template - This is NOT a real host, just a template!

define host{
        name                            generic-host    ; The name of this host template
        event_handler_enabled           1       ; Host event handler is enabled
        flap_detection_enabled          1       ; Flap detection is enabled
        failure_prediction_enabled      1       ; Failure prediction is enabled
        process_perf_data               1       ; Process performance data
        retain_status_information       1       ; Retain status information across program restarts
        retain_nonstatus_information    1       ; Retain non-status information across program restarts
        check_command                   check-host-alive
        max_check_attempts              5
        check_command         check-host-alive_4 ; Default command to check Linux hosts
        check_interval            1
            retry_interval            1
                notifications_enabled           1
        notification_interval           0
        notification_period             24x7
                notification_options        d, u, r, s
        contact_groups                  admins
                statusmap_image                 switch40.png
        register                        0       ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
        }