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.
I have a script that I can run locally and get the proper return. When I try to run it using check_nrpe, either on the system itself or from the Nagios server, I get an improper response.
This is the response running locally:
./check_redis.sh
REDIS Sentinel 16379 on dencita1 is active and PONG was the response
REDIS Nuxeo 6379 on dencita1 is active and PONG was the response
This is the response when running with nrpe:
./check_nrpe -H localhost -c check_redis
REDIS Sentinel 16379 on dencita1 not active and did not PONG
Not too familiar with REDIS or checks against, it, looks like it is submitting something to port 26379 and getting a invalid response, which the plugin is correctly handling and exiting with a 3. Also, you are checking against the local nagios server, is that also where you have your REDIS server? I would think your nrpe check from nagios would look similar to:
The redis server and the Nagios server are different systems.
It doesn't matter if I run the check_nrpe command from the redis server or the Nagios server, I get the same response, which is invalid.
When running through nrpe it finds the proper port but when it reports back it is saying that the port is not active which is not true. You can see from the two different responses that one says that port 16379 is active and it received the proper PONG response, the other says that the same port is not active and did not PONG.
The line which was checking port 26379 is commented out.
Do you see both lines on the "details" page for the object in question?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
You need to use a \n in your output to nagios, not an actual newline or second echo. Using \n will be replaced internally with a newline for pretty output but will not cause Core to think the second line is intended as long output. You will probably want to store your results in a variable and do a single echo at the end instead of multiple echos.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.