We've moved to a new support system!
The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.
Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users
After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.
gormank wrote:I'd try running the check_ping command from the shell as defined in the command and see what happens. If check_http fails you might try check_icmp.
You may also post the service and command definitions for http and ping as well.
gormank wrote:I'd try running the check_ping command from the shell as defined in the command and see what happens. If check_http fails you might try check_icmp.
You may also post the service and command definitions for http and ping as well.
atc0005 wrote:One approach that has worked well for me in the past when troubleshooting service checks is to run them as the same user account that executes the plugin and also run the commands with the same arguments as the Nagios instance.
1) Login to Nagios Core system/console
2) sudo --login --user nagios
3) /usr/local/nagios/libexec/check_http -H snapgeek.com
4) ping snapgeek.com
5) nmap -sT -p 80,443 snapgeek.com
6) nmap -sT -Pn -p 80,443 snapgeek.com
The last command disables using ping to determine if the host is up before attempting to connect to the ports. If you don't have nmap installed it's worth installing on the Nagios box for this and future troubleshooting tasks.
Based on what you've noted, it may be that 80/tcp (non-https) is the default for check_http and you don't have that port exposed to Nagios.
$ /usr/local/nagios/libexec/check_http -H snapgeek.com
CRITICAL - Socket timeout
$ /usr/local/nagios/libexec/check_http -H google.com
HTTP OK: HTTP/1.1 301 Moved Permanently - 547 bytes in 2.574 second response time |time=2.573851s;;;0.000000 size=547B;;;0
$ nmap -sT -p 80,443 snapgeek.com
Starting Nmap 7.80 ( https://nmap.org ) at 2022-03-11 11:30 CST
Nmap scan report for snapgeek.com (99.198.101.250)
Host is up (0.019s latency).
rDNS record for 99.198.101.250: fastcomet
PORT STATE SERVICE
80/tcp open http
443/tcp open https
Nmap done: 1 IP address (1 host up) scanned in 15.08 seconds
t3dus wrote:port 443 is open on host. I have another nagios server which can use the same checks on my website
atc0005 wrote:t3dus wrote:port 443 is open on host. I have another nagios server which can use the same checks on my website
Is the output you provided from the nagios server reporting "CRITICAL - Socket timeout", or from the second nagios server that you mentioned?
Do you get the same results when running "host snapgeek.com" from each nagios server?
Users browsing this forum: No registered users and 15 guests