[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Nagios flooding with "Host UP" alerts

Posted on 2008-11-05
6
Medium Priority
?
1,691 Views
Last Modified: 2009-12-16
This is a new installation of nagios 2.10 (really groundwork, which I'm starting to think is a total POS).

I am getting flooded with "Host UP" alerts.  I get an occasional down alert, but most of the UP alerts have no associated DOWN alerts.

The state duration in nagios shows that the host hasn't changed from UP in days, however I just got a page a few minutes ago that it was UP.

I tired a newer version of check_icmp, but that didn't help.

The OS is RHEL5.2, all updates.

Might be related, might not, but I'm not getting any alerts for services, even ones that are red right now.

All services and host are set to email 24/7, on up, down, and recovery.
0
Comment
Question by:arrkerr1024
  • 3
  • 3
6 Comments
 
LVL 14

Expert Comment

by:Deepak Kosaraju
ID: 22889880
Can you copy you contants.cfg template and Service template for host checks and service checks.
0
 
LVL 14

Author Comment

by:arrkerr1024
ID: 22890465
here it is.
define host {
        name                            linux-server
        process_perf_data               0
        retain_status_information       1
        flap_detection_enabled          1
        retain_nonstatus_information    1
        active_checks_enabled           1
        passive_checks_enabled          1
        check_period                    24x7
        obsess_over_host                0
        check_freshness                 0
        check_command                   check-host-alive
        max_check_attempts              3
        check_interval                  0
        event_handler_enabled           0
        notifications_enabled           1
        notification_interval           60
        notification_period             24x7
        notification_options            d,u,r
        contact_groups                  unix
        register                        0
}
define host {
        host_name                       serverXX
        alias                           serverXX
        address                         x.x.x.x
        use                             linux-server
}
define service {
        service_description             nrpe - Total Zombie Processes
        use                             unix-service
        host_name                       serverXX
        check_command                   check_nrpe!check_zombie_procs
}
define service {
        service_description             icmp - PING
        use                             generic-service
        host_name                       serverXX
        check_command                   check_alive
}
define contact {
        contact_name            xxx mailbox
        use                             24-7_Admins
        alias                           shared mailbox
        email                          xxx@yyy.com
}
 
define contact {
        name                            24-7_Admins
        host_notification_period        24x7
        service_notification_period     24x7
        host_notification_options       d,u,r
        service_notification_options    c,w,r
        host_notification_commands      host-notify-by-email
        service_notification_commands   host-notify-by-email
        register                        0
}

Open in new window

0
 
LVL 14

Expert Comment

by:Deepak Kosaraju
ID: 22890834
service_notification_commands   host-notify-by-email
can you copy your command definition for above.By default it will be as follows
and for service notification use the below
Following are the standard macros for nagios.
#Host Notifications:
# 'host-notify-by-email' command definitiondefine command{        command_name    host-notify-by-email
        command_line    /usr/bin/printf "%b" "***** Nagios 3.0.3 *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nSta
te: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ aler
t - Host $HOSTNAME$ is $HOSTSTATE$" $CONTACTEMAIL$
        }
 
#Service Notification:
# 'notify-by-email' command definition
define command{        command_name    notify-by-email        command_line    /usr/bin/printf "%b" "***** Nagios 3.0.3 *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
        }

Open in new window

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 14

Author Comment

by:arrkerr1024
ID: 22895317
This is nagios 2 - same command but slightly different text.
# 'host-notify-by-email' command definition
define command {
        command_name                    host-notify-by-email
        command_line                    /usr/bin/printf "%b" "***** Nagios  *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$
}
 
# 'notify-by-email' command definition
define command {
        command_name                    service-notify-by-email
        command_line                    /usr/bin/printf "%b" "***** Nagios  *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}

Open in new window

0
 
LVL 14

Accepted Solution

by:
arrkerr1024 earned 0 total points
ID: 22899032
Oh sheesh, I found it:
 service_notification_commands   host-notify-by-email
should be
service_notification_commands   service-notify-by-email
0
 
LVL 14

Expert Comment

by:Deepak Kosaraju
ID: 22899423
How can he close, in one way my comments helped him to think of his mistake.....I told him use different command_line specification for notification
one is host-notify-by-email
service-notify-by-email
and I deserve point for my help and time...
0

Featured Post

New Tabletop Appliances Blow Competitors Away!

WatchGuard’s new T15, T35 and T55 tabletop UTMs provide the highest-performing security inspection in their class, allowing users at small offices, home offices and distributed enterprises to experience blazing-fast Internet speeds without sacrificing enterprise-grade security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Quality of Service (QoS) options are nearly endless when it comes to networks today. This article is merely one example of how it can be handled in a hub-n-spoke design using a 3-tier configuration.
Use of TCL script on Cisco devices:  - create file and merge it with running configuration to apply configuration changes
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses
Course of the Month20 days, 2 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question