Page 1 of 1

consolidated list of disabled notifications

Posted: Wed Apr 09, 2014 11:47 pm
by clive.dias
Hi Team ,

How do get to know the consolidated list of all service checks that have been disabled for notifying any issues ?
Similar to knowing all the acknowledgements made

Thanks
Clive

Re: consolidated list of disabled notifications

Posted: Thu Apr 10, 2014 9:56 am
by tmcdonald
These can be found in the /usr/local/nagios/var/objects.cache file:

Code: Select all

define service {
        host_name       localhost
        service_description     Current Load
        check_period    24x7
        check_command   check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
        contact_groups  admins
        notification_period     24x7
        initial_state   o
        hourly_value    1
        check_interval  5.000000
        retry_interval  1.000000
        max_check_attempts      4
        is_volatile     0
        parallelize_check       1
        active_checks_enabled   1
        passive_checks_enabled  1
        obsess  1
        event_handler_enabled   1
        low_flap_threshold      0.000000
        high_flap_threshold     0.000000
        flap_detection_enabled  1
        flap_detection_options  a
        freshness_threshold     0
        check_freshness 0
        notification_options    r,w,u,c
        notifications_enabled   1
        notification_interval   60.000000
        first_notification_delay        0.000000
        stalking_options        n
        process_perf_data       1
        retain_status_information       1
        retain_nonstatus_information    1
        }
That's just an example from my server that shows the config options for a single service. You could write a pretty quick bash script to parse out all you need for the notifications. Just look for "notifications_enabled 0".