check_http - long response time

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Post Reply
stevanovic
Posts: 1
Joined: Fri Jul 21, 2023 6:59 am

check_http - long response time

Post by stevanovic »

Hello,

I have a problem with http(s) checks.
I am using Nagios Core(version 4.4.9) with check_http plugin version 2.3.3 for monitoring websites on the web server.
A few weeks ago issues started with long response times for some websites (not all sites on that server).
Nagios reporting critical error for response time longer than 15 seconds.
After 1-2 minutes error state is going back to OK and response time of a website is about 0.012 seconds.

Errors looks like this:
HTTP CRITICAL: HTTP/1.1 302 Found - 563 bytes in 17.173 second response time

Things I've tried but didn't fix the issue:
-adding -f follow
-adding -N ( for content)
-updating nagios and all plugins on the newest version
-checking firewall on both servers

Nagios and the web server are in the same location, so it is unclear why it reports high response times or what else could be done to stop these errors
Butters
Posts: 7
Joined: Mon Aug 14, 2023 5:38 am

Re: check_http - long response time

Post by Butters »

have you tried mtr the target host if you see any drops/loss?
is there any name resolution problems in place ?
when you run it manually is it always responding slow?
User avatar
swolf
Developer
Posts: 302
Joined: Tue Jun 06, 2017 9:48 am

Re: check_http - long response time

Post by swolf »

Hi @stevanovic, thanks for reaching out.

Similar to what @Butters said, I wouldn't assume that check_http is wrong here - it's much more likely that your web server has some increased load or background job that contends for systems resources, slowing down your requests. I would try to confirm the behavior out-of-band first.

If the degraded performance window is only 1-2 minutes it's a little harder, but I would just have a terminal open on the Nagios Core server that runs curl in a loop, and reports the current timestamp and how long it took to make whatever specific request. You should then be able to figure out if you can correlate degraded performance via cURL to degraded performance via nagios. If those timestamps match, it's definitely something outside of the Nagios Core server.

Hopefully that helps. Please let us know if you have any futher questions or concerns.

-Sebastian Wolf
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy
Post Reply