Tuesday 29 March 2011

Nagios Error: Host has no default contacts or contactgroups defined

Warning: Host 'BLALBA' has no default contacts or contactgroups defined!

host definition:


define host{
        use             generic-host
        host_name       Scopserve
        alias           Scopserve
        address         172.18.0.30
        }

error - generic-host don't have a contact or contactgroup defined.

Setup correct template/hostgroup definition and "use" the correct definition ie:



template.cfg

define host{
        name                    PT-PBX  ; The name of this host template
        use                     generic-host    ; Inherit default values from the generic-host template
        check_period            24x7            ; By default, switches are monitored round the clock
        check_interval          5               ; Switches are checked every 5 minutes
        retry_interval          1               ; Schedule host check retries at 1 minute intervals
        max_check_attempts      10              ; Check each switch 10 times (max)
        check_command           check-host-alive        ; Default command to check if routers are "alive"
        notification_period     24x7            ; Send notifications at any time
        notification_interval   30              ; Resend notifications every 30 minutes
        notification_options    d,r             ; Only send notifications for specific host states
        contact_groups          admins          ; Notifications get sent to the admins by default
        register                0               ; DONT REGISTER THIS - ITS JUST A TEMPLATE
        }

New host definition using "CPT-PBX"

define host{
        use             CPT-PBX
        host_name       Scopserve
        alias           Scopserve
        address         172.18.0.30
        }

No comments:

Post a Comment