LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Nagios: Server Notifications (https://www.linuxquestions.org/questions/linux-software-2/nagios-server-notifications-714504/)

DaveQB 03-26-2009 01:33 AM

Nagios: Server Notifications
 
Hi all,

I can not for the life of me get Service notifications working on a working Nagios box.

In point form:
  • Emails send fine from the command line using the command line for services in the commands.cfg file.
  • The box has always and continues to email notify about Hosts going up and down, as expected.
  • I have created 1 config file with a host and 1 service, [see below] nothing in inherited, so only 1 point of failure. This does not notify.

I can not see any reason why Service Notification should not be working....

Code:



define service{
        active_checks_enabled          1      ; Active service checks are enabled
        passive_checks_enabled          1      ; Passive service checks are enabled/accepted
        parallelize_check              1      ; Active service checks should be parallelized (disabling this can lead to major performance problems)
        obsess_over_service            1      ; We should obsess over this service (if necessary)
        check_freshness                0      ; Default is to NOT check service 'freshness'
        notifications_enabled          1      ; Service notifications are enabled
        event_handler_enabled          1      ; Service event handler is enabled
        flap_detection_enabled          1      ; Flap detection is enabled
        failure_prediction_enabled      1      ; Failure prediction is enabled
        process_perf_data              1      ; Process performance data
        retain_status_information      1      ; Retain status information across program restarts
        retain_nonstatus_information    1      ; Retain non-status information across program restarts
                notification_interval          5              ; Only send notifications on status change by default.
                is_volatile                    0
                check_period                    24x7
                normal_check_interval          2
                retry_check_interval            1
                max_check_attempts              99999
                notification_period            24x7
                notification_options            w,u,c,r
                contact_groups                  admins
                service_description    test_uptime
                check_command check_wsc-aemc!uptime!"24,5"
                host_name      test

        }
define host{
        host_name      test                      ; The name we're giving to this host
        address        swsyd-bes              ; IP address of the host
        notifications_enabled          1      ; Host notifications are enabled
        event_handler_enabled          1      ; Host event handler is enabled
        flap_detection_enabled          1      ; Flap detection is enabled
        failure_prediction_enabled      1      ; Failure prediction is enabled
        process_perf_data              1      ; Process performance data
        retain_status_information      1      ; Retain status information across program restarts
        retain_nonstatus_information    1      ; Retain non-status information across program restarts
                check_command                  check-host-alive
                max_check_attempts              5
                notification_interval          9
                notification_period            24x7
                notification_options            d,u,r
                contact_groups                  admins

        }


anomie 03-26-2009 06:25 PM

What does # nagios -v <nagios_config_here> show?

DaveQB 03-26-2009 06:31 PM

Ahh thanks.


Hmmm all looks good.


snippet..
Code:

Total Warnings: 236
Total Errors:  0

Things look okay - No serious problems were detected during the pre-flight check


anomie 03-26-2009 09:02 PM

Nothing illuminating in all the warnings that you didn't post?

Quote:

Originally Posted by DaveQB
Code:

define service{
...
                check_command check_wsc-aemc!uptime!"24,5"
...
        }


Try something simpler to see if maybe the check_command is borked. e.g.: check_ssh or check_tcp!<some_port>.


All times are GMT -5. The time now is 10:21 PM.