NSCA + Notifications

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
blrg891
Posts: 6
Joined: Thu Dec 13, 2012 1:59 pm

NSCA + Notifications

Post by blrg891 »

Hello All!

I am running both passive checks and active checks on the the same Nagios Server. The issue is that on the Nagios dashboard I see:

Last Notification: N/A (notification 0)

For my passive checks. They are configured virtually the same as the active checks, however i am not getting notifications. I have notifications turned on at the service, host, and system level. Am I missing anything?

Thanks!!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: NSCA + Notifications

Post by lmiltchev »

Can you show us the config of one hosts/services that you are not getting notifications about?
Be sure to check out our Knowledgebase for helpful articles and solutions!
blrg891
Posts: 6
Joined: Thu Dec 13, 2012 1:59 pm

Re: NSCA + Notifications

Post by blrg891 »

Sure:

Code: Select all

define service{
        use                             passive-service         ; Name of service template to use
        hostgroup_name                  fh-services
        service_description             FH SERVER
        check_command                   check_dummy!3!"No Data Received"  ; put into unknown state
        notifications_enabled           1
        action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$
}

Code: Select all

define hostgroup{
        hostgroup_name  fh-services
        alias           fh servers
        members         server1
}

Code: Select all

define host{
        use                     linux-server
        host_name               server1
        alias                   server1
        address                 192.168.0.1
        action_url /nagiosgraph/cgi-bin/showhost.cgi?host=$HOSTNAME$
        notifications_enabled   1
        notification_options    d,u,r,f,s       ;
}

Code: Select all

define service{
        use                             generic-service
        name                            passive-service 
        active_checks_enabled           0
        passive_checks_enabled          1
        check_period                    24x7
        notification_period             24x7
        notification_options            w,u,c,r 
        flap_detection_enabled          0 
        max_check_attempts              1  
        notification_interval           0  
        is_volatile                     0
        contact_groups                  admins_LOG
}

Code: Select all

define service{
        name                            generic-service  
        active_checks_enabled           1     
        passive_checks_enabled          1   
        parallelize_check               1  
        obsess_over_service             1         
        check_freshness                 1      
        notifications_enabled           1        
        event_handler_enabled           1   
        flap_detection_enabled          1     
        failure_prediction_enabled      1        
        process_perf_data               1     
        retain_status_information       1  
        retain_nonstatus_information    1         
        is_volatile                     0         
        max_check_attempts              3   
        normal_check_interval           5   
        retry_check_interval            3 
        contact_groups                  admins_LOG  
        notification_options            w,u,c,r  
        notification_interval           180
        check_period                    24x7
        notification_period             24x7
        register                        0 
}
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NSCA + Notifications

Post by slansing »

Can you show us the "linux-server" and "passive-service" templates? The config's you shared do not show the full notification definitions that are required.

Also, does this service have passive data being pushed to it? Is it in a state that should be sending you a notification?
blrg891
Posts: 6
Joined: Thu Dec 13, 2012 1:59 pm

Re: NSCA + Notifications

Post by blrg891 »

The passive service is listed above. I believe that it is second to the bottom. This is the linux server definition:

define host{
name linux-server
use generic-host
check_period 24x7
check_interval 5
retry_interval 5
max_check_attempts 3
check_command check-host-alive
notification_period 24x7
notification_interval 120
notification_options d,u,r
contact_groups admins_LOG
register 0
}

The service is passing data, the state is critical yet no notifications emails or notification indications are being listed on the dashboard.

I think I actually fixed it. I am getting updates through a port forwarded tunnel and Nagios was running host checks. It would seem that if the host check fails it doesn't care about any services running on the host and their state.

Interesting.

Thanks for the help!!!!
Last edited by slansing on Thu Sep 12, 2013 10:59 am, edited 1 time in total.
Reason: Please edit your previous post to add information/questions if you are the last poster. Thanks!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: NSCA + Notifications

Post by slansing »

Correct if the host is unreachable or down the service states will not matter unless they changed before the host failed. Glad to hear this got worked out!
Locked