Pandora FMS Community

Can I check http and smtp remotely?

x_vag · 26 ene 2007, 17:21 · 5 mensajes · 74 visitas

  1. Inicio del debate

    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.

  2. Hello Vagelis, each of these servers can be addressed manually by telnet server.net 80 for http requests resp. telnet server.net 25 for sendmail You 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

  3. 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 OK to 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 Postfix Making this you dont need to use agents, only remote monitoring. Wish this helps :-)

  4. Thanks nil... Your advice is very usefull! I'm working on this now...

  5. 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 eof and 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_end With 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.

Entra en tu cuenta para publicar.