Monitor THANKS telnet response of web server
Monitor THANKS telnet response of web server
Hello,
I need some help figuring out how we would monitor the response to a telnet THANKS command. See details below:
If our mail and web servers are both responding, we still need to know if the LISTSERV application is responding. We can check that with a connection to port 2306 and a simple THANKS command:
-> telnet listserv.org 2306
Trying 167.154.x.x...
Connected to listserv.org.
Escape character is '^]'.
thanks
You're welcome!
quit
Connection closed by foreign host.
Would it be possible to create a check that does this? Thank you.
I need some help figuring out how we would monitor the response to a telnet THANKS command. See details below:
If our mail and web servers are both responding, we still need to know if the LISTSERV application is responding. We can check that with a connection to port 2306 and a simple THANKS command:
-> telnet listserv.org 2306
Trying 167.154.x.x...
Connected to listserv.org.
Escape character is '^]'.
thanks
You're welcome!
quit
Connection closed by foreign host.
Would it be possible to create a check that does this? Thank you.
Re: Monitor THANKS telnet response of web server
Looks like this might be just the thing:
https://exchange.nagios.org/directory/P ... et/details
Let us know if that works for you!
--Jeffrey
https://exchange.nagios.org/directory/P ... et/details
Let us know if that works for you!
--Jeffrey
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Monitor THANKS telnet response of web server
Is there anyway someone could help me figure out how to write the command for this check_telnet plugin?
It doesn't have a help section written into it.
I just need to be able to send a statement (like THANKS) and check for a response "YOU'RE WELCOME". I'm not sure where to even start.
Thank you!
It doesn't have a help section written into it.
I just need to be able to send a statement (like THANKS) and check for a response "YOU'RE WELCOME". I'm not sure where to even start.
Thank you!
Re: Monitor THANKS telnet response of web server
I think I found a better solution: the check_tcp plugin, which lets you specify a thing to say and an thing to expect to receive, just like you want.
So for you, you'd want to do:
...or whatever the case of the "You're welcome" response is.
Sorry for the misstep--let me know if this one is better!
--Jeffrey
Code: Select all
[root@jpd-nagiosxi-one libexec]# ./check_tcp -H localhost -p 25 -s "helo localhost" -e 220
TCP OK - 0.001 second response time on localhost port 25 [220 jpd-nagiosxi-one.localdomain ESMTP Postfix]|time=0.000897s;;;0.000000;10.000000So for you, you'd want to do:
Code: Select all
./check_tcp -H listserv.org -p 2306 -s thanks -e YOUSorry for the misstep--let me know if this one is better!
--Jeffrey
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Monitor THANKS telnet response of web server
Do I need to include any quotations or any other characters in the send string and the expect string? I'm getting a timeout when I run this.
I have verified that I can run telnet on port 2306 from the XI server to the host in question. Furthermore, I'm able to send 'thanks' and receive 'You're welcome!' back.
When I try to run check_tcp from my XI server with the variables I think are correct all I get is a blank line response.
See attached image.
I have verified that I can run telnet on port 2306 from the XI server to the host in question. Furthermore, I'm able to send 'thanks' and receive 'You're welcome!' back.
When I try to run check_tcp from my XI server with the variables I think are correct all I get is a blank line response.
See attached image.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Monitor THANKS telnet response of web server
That's not a blank response, you have an unterminated quote since you didn't wrap the response in double quotes
change
to
change
Code: Select all
You're welcome!Code: Select all
"You're welcome!"Re: Monitor THANKS telnet response of web server
Ok, when I do that it times out.
Also, XI keeps adding a a backslash between the e and the !, like this "You're welcome\!". Is that normal/expected?
Also, XI keeps adding a a backslash between the e and the !, like this "You're welcome\!". Is that normal/expected?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Monitor THANKS telnet response of web server
Does it timeout from the command line?rferebee wrote:Ok, when I do that it times out.
All ! must be escaped because the Nagios Core configuration uses it as a delimiter to separate commands from argumentsrferebee wrote:Also, XI keeps adding a a backslash between the e and the !, like this "You're welcome\!". Is that normal/expected?
Re: Monitor THANKS telnet response of web server
Yes, the error is CRITICAL - Socket timeout.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Monitor THANKS telnet response of web server
Just curious, do you get a valid result when just checking the port without the send/expect strings?
Code: Select all
./check_tcp -H 167.154.10.63 -p 2306