Ran into an issue with the check_http plugin.
/usr/local/nagios/libexec/check_http -H "website.com"
No route to host
HTTP CRITICAL - Unable to open TCP socket
If I take out the website name, and put in the IP, it works.
HTTP OK: HTTP/1.1 301 Moved Permanently - 299 bytes in 0.375 second response time |time=0.374855s;;;0.000000 size=299B;;;0
It had been working, but the server needed to be upgraded. It was rhel 6.10, it's sitting on rhel 7.9, for now, but will get moved to 8.9 soon.
Still using iptables, though I'll probably change it to firewalld. Ntp checks in ok.
I don't have an issue using the IP, other than if the IP changes in the future. So, this is mostly academic.
Thanks!
check_http error
Re: check_http error
@vinmansbrew,
It would seem you are likely having an issue with DNS if the website name doesn't work, but the IP address does. Try running dig or nslookup with the "website.com". If it returns the IP address, then you know DNS is working and if not, then it isn't.
You can also try using ping on another website and its IP address to see if it's a more general issue
i.e.
It would seem you are likely having an issue with DNS if the website name doesn't work, but the IP address does. Try running dig or nslookup with the "website.com". If it returns the IP address, then you know DNS is working and if not, then it isn't.
You can also try using ping on another website and its IP address to see if it's a more general issue
i.e.
Code: Select all
ping 8.8.8.8
ping google.com
April: Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
-
- Posts: 26
- Joined: Wed Jan 22, 2020 5:26 pm
Re: check_http error
Well, I can dig and nslookup, so dns should be ok.
I didn't think that would be the issue, since it resolved fine, before the upgrade from rhel 6 to 7.
Core version is 4.5. I supposed it could just be a plugin config. Not entirely sure how to check plugin version.
I didn't think that would be the issue, since it resolved fine, before the upgrade from rhel 6 to 7.
Core version is 4.5. I supposed it could just be a plugin config. Not entirely sure how to check plugin version.
Re: check_http error
Yes I Facing Thise Problem