Page 1 of 1

Single notification for passive

Posted: Mon Jun 29, 2015 6:48 am
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

Re: Single notification for passive

Posted: Mon Jun 29, 2015 12:11 pm
by abrist
Does the passive check only send a problem state once?
Can you post the service check and a contact definition?

Re: Single notification for passive

Posted: Mon Jun 29, 2015 12:38 pm
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         [email protected]  ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
        }

define contactgroup{
        contactgroup_name       admins
        alias                   Nagios Administrators
        members                 nagiosadmin
        }
Thanks in advance for your help !

Re: Single notification for passive

Posted: Mon Jun 29, 2015 2:45 pm
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?

Re: Single notification for passive

Posted: Mon Jun 29, 2015 3:56 pm
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!

Re: Single notification for passive

Posted: Mon Jun 29, 2015 4:04 pm
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?

Re: Single notification for passive

Posted: Mon Jun 29, 2015 4:13 pm
by frankjustme
Yes you can lock the thread

thanks again for the help