Quick Email Alert Notifications

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Quick Email Alert Notifications

Postby rlinux57 » Thu Sep 27, 2018 5:35 am

Hi Team,

I want to know what settings I have to use in order get to quick email alerts if hosts gets down and service gets critical or warning. Or if it gets socket timeout etc ? Kindly mention the settings here.
I am using nagios core Version 4.4.2

Regards,
rlinux57
rlinux57
 
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Re: Quick Email Alert Notifications

Postby scottwilkerson » Thu Sep 27, 2018 11:18 am

The fastest alerts would be up to 1 minute, if you set the following in the object definitions

Code: Select all
check_interval 1
max_check_attempts 1
retry_interval 1
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 14065
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Quick Email Alert Notifications

Postby rlinux57 » Thu Sep 27, 2018 2:32 pm

I have set:
max_attempts 3 (for host)
max_attempts 5 (for services)
Actually when my node goes down, I got"SERVICE ALERT" and "Warning: Return code of 255 for check of service" of some services. Moreover, I didn't get any "HOST ALERT" warning or critical. I don't know why ?
rlinux57
 
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Re: Quick Email Alert Notifications

Postby scottwilkerson » Thu Sep 27, 2018 3:07 pm

We would need to see all the relevant configurations for the hosts and included templates as well as the associated contact definitions and defined commands in order to evaluate why there were no host notifications.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 14065
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Quick Email Alert Notifications

Postby rlinux57 » Fri Sep 28, 2018 5:18 am

I have sent detail in private message to you and hide all sensitive information.
rlinux57
 
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Re: Quick Email Alert Notifications

Postby scottwilkerson » Fri Sep 28, 2018 7:53 am

received, waiting on a few additional details. We can continue via PM
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 14065
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Quick Email Alert Notifications

Postby scottwilkerson » Fri Sep 28, 2018 1:42 pm

I setup all the configs you sent me and there were no services defined.

That said, I did re-read your previous message.

rlinux57 wrote:Actually when my node goes down, I got"SERVICE ALERT" and "Warning: Return code of 255 for check of service" of some services. Moreover, I didn't get any "HOST ALERT" warning or critical. I don't know why ?


Are you saying you are getting an email notification or just an alert in the UI/Log? Because getting alerted in the UI/Log is standard behavior, only the email notification would be suppressed if the host was down.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 14065
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Quick Email Alert Notifications

Postby rlinux57 » Fri Sep 28, 2018 2:37 pm

Service has defined in that file, I mean to say HOST DOWN Alert and Notification has not generated, When Host gets down.
rlinux57
 
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Re: Quick Email Alert Notifications

Postby scottwilkerson » Fri Sep 28, 2018 2:51 pm

rlinux57 wrote:Service has defined in that file, I mean to say HOST DOWN Alert and Notification has not generated, When Host gets down.


I am seeing both the host down alerts and the notifications in my /usr/local/nagios/var/nagios.log

Code: Select all
[1538159800] HOST ALERT: linux-01;DOWN;SOFT;1;check_icmp: Failed to resolve IP-ADDRESS
[1538159815] HOST ALERT: linux-02;DOWN;SOFT;1;check_icmp: Failed to resolve IP-ADDRESS
[1538159836] HOST ALERT: linux-03;DOWN;SOFT;1;check_icmp: Failed to resolve IP-ADDRESS
[1538159924] HOST NOTIFICATION: nagiosadmin;linux-01;DOWN;notify-host-by-email;check_icmp: Failed to resolve IP-ADDRESS
[1538159924] HOST NOTIFICATION: john;linux-01;DOWN;notify-host-by-email;check_icmp: Failed to resolve IP-ADDRESS
[1538159924] HOST ALERT: linux-01;DOWN;HARD;3;check_icmp: Failed to resolve IP-ADDRESS
[1538159932] HOST NOTIFICATION: nagiosadmin;linux-02;DOWN;notify-host-by-email;check_icmp: Failed to resolve IP-ADDRESS
[1538159932] HOST NOTIFICATION: john;linux-02;DOWN;notify-host-by-email;check_icmp: Failed to resolve IP-ADDRESS
[1538159932] HOST ALERT: linux-02;DOWN;HARD;3;check_icmp: Failed to resolve IP-ADDRESS
[1538159954] HOST NOTIFICATION: nagiosadmin;linux-03;DOWN;notify-host-by-email;check_icmp: Failed to resolve IP-ADDRESS
[1538159954] HOST NOTIFICATION: john;linux-03;DOWN;notify-host-by-email;check_icmp: Failed to resolve IP-ADDRESS
[1538159954] HOST ALERT: linux-03;DOWN;HARD;3;check_icmp: Failed to resolve IP-ADDRESS
[1538160104] HOST NOTIFICATION: nagiosadmin;linux-01;DOWN;notify-host-by-email;check_icmp: Failed to resolve IP-ADDRESS
[1538160104] HOST NOTIFICATION: john;linux-01;DOWN;notify-host-by-email;check_icmp: Failed to resolve IP-ADDRESS
[1538160112] HOST NOTIFICATION: nagiosadmin;linux-02;DOWN;notify-host-by-email;check_icmp: Failed to resolve IP-ADDRESS
[1538160112] HOST NOTIFICATION: john;linux-02;DOWN;notify-host-by-email;check_icmp: Failed to resolve IP-ADDRESS
[1538160134] HOST NOTIFICATION: nagiosadmin;linux-03;DOWN;notify-host-by-email;check_icmp: Failed to resolve IP-ADDRESS
[1538160139] HOST NOTIFICATION: john;linux-03;DOWN;notify-host-by-email;check_icmp: Failed to resolve IP-ADDRESS
[1538160284] HOST NOTIFICATION: nagiosadmin;linux-01;DOWN;notify-host-by-email;check_icmp: Failed to resolve IP-ADDRESS
[1538160284] HOST NOTIFICATION: john;linux-01;DOWN;notify-host-by-email;check_icmp: Failed to resolve IP-ADDRESS


additionally, after adding the missing services (sorry about that, had to fix hostgroups to get them added), I can see the logs for them as well

Code: Select all
[1538164055] SERVICE ALERT: linux-01;Memory - Usage;WARNING;HARD;1;(No output on stdout) stderr: Could not resolve hostname IP-ADDRESS: Name or service not known
[1538164072] SERVICE ALERT: linux-02;Memory - Usage;WARNING;HARD;1;(No output on stdout) stderr: Could not resolve hostname IP-ADDRESS: Name or service not known
[1538164087] SERVICE ALERT: linux-03;Memory - Usage;WARNING;HARD;1;(No output on stdout) stderr: Could not resolve hostname IP-ADDRESS: Name or service not known
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 14065
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: Quick Email Alert Notifications

Postby rlinux57 » Sat Sep 29, 2018 12:34 am

Then What's missing ?
rlinux57
 
Posts: 324
Joined: Mon Dec 08, 2014 12:03 am

Next

Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot] and 22 guests