Can't get check_http to work with a non standard https only port.
Can I please get some advice or guidance about how to resolve this issue so I can monitor a service and its output? Currently my host and services configuration is working. It is just the http portion that I am having trouble with.
Use case:
We have an emulator running on a linux box. The emulator accepts REST requests. it uses port 4567 and accepts only https requests. I want to use Nagios to verify the emulator is up and is serving the right info.
Problem:
All my attempts with check_http result in failure. Output below.
Diagnostic output below: The target device running the emulator is 10.141.82.120
Nagios configuration Info:
Last Updated: Tue Jun 25 16:17:53 UTC 2024
Nagios® Core™ 4.5.3 - www.nagios.org
Logged in as admin
Fail:
./check_http -I 10.141.82.120 -p 4567
HTTP CRITICAL - Invalid Status Line ()
Fail:
./check_http -I 10.141.82.120 -u /config -p 4567
HTTP CRITICAL - Invalid Status Line ()
Fail, https only:
curl http://10.141.82.120:4567/
curl: (1) Received HTTP/0.9 when not allowed
Successful GET to /: (With this output I know the emulator is running)
curl -k https://10.141.82.120:4567/
Hello, this is ############## emulator version 1.2.2-480ad7d65dcea03181efff38513fd9c6a98c0522!
Successful GET to the URI /config: (With this output I know the emulator is running and is serving the correct info)
curl -k https://10.141.82.120:4567/config
{"###":[{"######":"test75026f7aec24b2781d5287a6f2141e8","###":"8e1412f6a7825d1872b42cea7f62057tset"
Can't get check_http to work with a non standard https only port.
Re: Can't get check_http to work with a non standard https only port.
Hi @rfrance, thanks for reaching out.
I think you need to use the -S flag to specify connecting with https.
The documentation for check_http may also be helpful. Man page for check_http
I think you need to use the -S flag to specify connecting with https.
Code: Select all
./check_http -I 10.141.82.120 -p 4567 -S
./check_http -I 10.141.82.120 -u /config -p 4567 -S
Please let us know if you have any other questions or concerns.
-Laura
-Laura
Re: Can't get check_http to work with a non standard https only port.
That was it!
Thank you!
I've been hunting and searching for days. I did go through the docs for the plugin and did not pick up on the function of the -S option. My miss.
Thank you!
I've been hunting and searching for days. I did go through the docs for the plugin and did not pick up on the function of the -S option. My miss.
Re: Can't get check_http to work with a non standard https only port.
Please let us know if you have any other questions or concerns.
-Laura
-Laura