Nagios not sending notification for URL

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Nagios not sending notification for URL

Post by RIDS_I2MP »

Hello Team,

We are monitoring a URL through Nagios, this URL opens up with a pop-up asking for login credentials.

http://10.144.223.76/

When we configured URL monitoring for this, it was throwing error with error code 401.
So, we have changed its definition by adding error code 401 as exception.

Command view: $USER1$/check_http -H $HOSTADDRESS$ $ARG1$ -t 30
$ARG1$: -f ok -I 10.144.223.76 -u '/' -p 80 -e 401

After making above changes, we were able to monitor the URL. We also tested it once by bringing down the URL manually for few mins and Nagios triggered alert for the same.

Yesterday, the URL went down as service was in hung state, but Nagios did not send any alert for it.

The URL was generating below error code:
"Request timed out waiting to execute" with error code 503.

The problem is, why Nagios did not capture that error and did not send the alert.

Kindly, look into this issue on priority and let us know what we are missing here.
Thanks & Regards,
I2MP Team.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Nagios not sending notification for URL

Post by cdienger »

Do you see any mention of this service's problem under Home > Monitoring Process > Event Log? If not, it's entirely possible that the check didn't actually fail for some reason(caching proxies, route, etc...) on the XI server as the check_http command should return CRITICAL for a 503 message. To verify I ran:

/usr/local/nagios/libexec/check_http -H httpstat.us -f ok -I 23.99.0.12 -u '/503' -p 80 -e 401 -v
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: Nagios not sending notification for URL

Post by RIDS_I2MP »

Hello,

Thanks for the reply!!

Yes i can see log entry for that duration as below:

2019-02-04 12:27:29HOST ALERT: 10.144.223.76;UP;SOFT;3;HTTP WARNING: HTTP/1.1 401 Unauthorized - 1915 bytes in 2.911 second response time
Host Down2019-02-04 12:26:42HOST ALERT: 10.144.223.76;DOWN;SOFT;2;CRITICAL - Socket timeout after 10 seconds
Host Down2019-02-04 12:25:54HOST ALERT: 10.144.223.76;DOWN;SOFT;1;CRITICAL - Socket timeout after 10 seconds


Actually, the service running on the host went into hung state for some time and this URL was not accessible for that duration.
The URL took time to show the error code, I mean, it was loading for some time and then it threw the error code 503.

We can see that Nagios captured "Socket timeout after 10 seconds" error, but the question is why we did not receive alert for that error as well.

Please let us know how we can get alerts.
Thanks & Regards,
I2MP Team.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Nagios not sending notification for URL

Post by cdienger »

The timeout messages occur twice and are both in SOFT states. Notifications are not sent for SOFT states and it looks like the service came back up before it could reach a HARD state.

If you would like to see notifications sent earlier then you'll need to lower the value for the max reties on the service. This will allow the status to go into a HARD state quicker which then triggers a notification.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
RIDS_I2MP
Posts: 751
Joined: Thu Mar 13, 2014 9:25 am

Re: Nagios not sending notification for URL

Post by RIDS_I2MP »

Hello,

Thank you so much for explaining the scenario.

We are good with it now, we can close the topic :)
Thanks & Regards,
I2MP Team.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios not sending notification for URL

Post by scottwilkerson »

RIDS_I2MP wrote:Hello,

Thank you so much for explaining the scenario.

We are good with it now, we can close the topic :)
Great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked