Nagios flooding with "Host UP" alerts

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.
LVL 14
arrkerr1024Asked:
Who is Participating?
 
arrkerr1024Connect With a Mentor Author Commented:
Oh sheesh, I found it:
 service_notification_commands   host-notify-by-email
should be
service_notification_commands   service-notify-by-email
0
 
Deepak KosarajuDevOps EngineerCommented:
Can you copy you contants.cfg template and Service template for host checks and service checks.
0
 
arrkerr1024Author Commented:
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
Get Cisco Certified in IT Security

There’s a high demand for IT security experts and network administrators who can safeguard the data that individuals, corporations, and governments rely on every day. Pursue your B.S. in Network Operations and Security and gain the credentials you need for this high-growth field.

 
Deepak KosarajuDevOps EngineerCommented:
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
 
arrkerr1024Author Commented:
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
 
Deepak KosarajuDevOps EngineerCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.