Single notification for passive

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
frankjustme
Posts: 4
Joined: Mon Dec 30, 2013 3:40 pm

Single notification for passive

Post by frankjustme »

Hi,

First time posting. I have been using Nagios core at all of my customer sites and it has been very helpful in keeping my group on top of issues. Leave it to say that I have been a advocate in my company that we use this tool as a standard.

I have a issue with passive alerts that I have seen people have issues with but never any resolution. I am using Nagios passive alerts to keep track of 30 Netezza database events. Works well except it only notifies once weather I acknowledge it or not. I don't get why thy would work this way. I have a work around I have developed. It seems to be abit of a kludge but I don't know what else to do. I have a script that runs out of cron that reads the status.dat using a perl module that is available on the exchange and allows me to pull settings out. So what I am doing now is sending a custom notification at a regular interval for those passive alerts that haven't been acknowledged.

Any thoughts as to why passive alerts act this way ?

Thank you
Frank
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Single notification for passive

Post by abrist »

Does the passive check only send a problem state once?
Can you post the service check and a contact definition?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
frankjustme
Posts: 4
Joined: Mon Dec 30, 2013 3:40 pm

Re: Single notification for passive

Post by frankjustme »

abrist wrote:Does the passive check only send a problem state once?
Can you post the service check and a contact definition?
Yes the state is only sent once.

here is service check defintion

Code: Select all

define service{
    use                     generic-service   ; template to inherit from
    name                    passive-service   ; name of this template
    active_checks_enabled   0                 ; no active checks
    passive_checks_enabled  1                 ; allow passive checks
    check_command           check_dummy!0     ; use "check_dummy", RC=0 (OK)
    check_period            24x7              ; check active all the time
    flap_detection_enabled  0           ; Flap detection is enabled
    check_freshness         0                 ; don't check if check result is "stale"
    max_check_attempts      1
    register                0                 ; this is a template, not a real service
    notification_interval   10
    }
Here is contact definition

Code: Select all

define contact{
        contact_name    nagiosadmin             ; Short name of user
        use             generic-contact         ; Inherit default values from generic-contact template (defined above)
        alias           Nagios Admin            ; Full name of user
        email         someaddress@com.com  ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
        }

define contactgroup{
        contactgroup_name       admins
        alias                   Nagios Administrators
        members                 nagiosadmin
        }
Thanks in advance for your help !
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Single notification for passive

Post by jdalrymple »

frankjustme wrote:Yes the state is only sent once.
Unfortunately I can't find the answer in our own documentation, but sx indicates that you will need to process the check again to continue to get notifications:


http://stackoverflow.com/questions/2040 ... ive-checks

Can you submit a passive check result in the UI or from the host to verify if that is your issue?
frankjustme
Posts: 4
Joined: Mon Dec 30, 2013 3:40 pm

Re: Single notification for passive

Post by frankjustme »

This SO post was very helpful thanks !
http://stackoverflow.com/questions/2040 ... ive-checks

Can you submit a passive check result in the UI or from the host to verify if that is your issue?
Ok submitting a passive check result does work it looks alot cleaner on the log than using the custom notification too.

Great find!
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Single notification for passive

Post by jdalrymple »

This doesn't really solve your issue directly - although I'm not sure we'll be able to. I suspect the devs have good reason to write it the way they did. We certainly can put in a feature request, but maybe it would be easier to just have your passive checks repeat failure notifications?

If so is it OK if we lock the thread?
frankjustme
Posts: 4
Joined: Mon Dec 30, 2013 3:40 pm

Re: Single notification for passive

Post by frankjustme »

Yes you can lock the thread

thanks again for the help
Locked