Welcome to Pandora FMS Community › Forums › Community support › Can I check http and smtp remotely?
-
Can I check http and smtp remotely?
Posted by x_vag on January 26, 2007 at 17:21Hello,
I’m trying to find a way to check http and smtp status remotely.
I prefer not to install agent on this machines and I would like to use a linux agent that already exists on other machine.
Have you any idea how that can be done?Regards,
Vagelis.x_vag replied 18 years ago 3 Members · 4 Replies -
4 Replies
-
::
Hello Vagelis,
each of these servers can be addressed manually by
telnet server.net 80 for http requests
resp.
telnet server.net 25 for sendmailYou can write a script sending a valid request,
like HELO in respect to http or smtp and analyzing the echo
from the server.
You can check if there is an answer and if the answer is as expected.The RFCs of http and sendmail explain what to send and what to expect.
Regards,
Reiner -
::
Hello,
I’m trying to find a way to check http and smtp status remotely.
I prefer not to install agent on this machines and I would like to use a linux agent that already exists on other machine.
Have you any idea how that can be done?Regards,
Vagelis.You can use remote_tcp module, using only a “port” open check or using the challenge / response to check protocol.
^M is a macro used in challenge/response to send a carriage return (this is documented in Pandora docs).
For example, to check http
port 80
send GET / HTTP/1.0^M^M
expect OKto check SMTP, first make a telnet to server on port 25, and check string returned, for example in my server it says:
220 endor ESMTP Postfix (GNU/Linux)
So configure a tcp check in Pandora console similar to
port 25
send ^M
receive 220 endor ESMTP PostfixMaking this you dont need to use agents, only remote monitoring.
Wish this helps 🙂
-
-
::
ok… I found a way to check smtp and http status…
I wrote one script for each status…
For smtp status is the following:
#!/usr/bin/expect -f
spawn telnet yourdomain.com 25
send “quitr”
expect eofand with the next module I can get a number (220) needed in order to use it in alert (min/max values)…
module_begin
module_name testmail
module_type generic_data
module_exec testmail | head -6 | tail -1 | cut -b -3
module_description mail_status
module_endWith http status things are similar, but instead of port 25 you must telnet port 80, and also find the correct “combination” with head, tail and cut commands to get a number…
I hope this help somebody…
Vagelis.