Pandora FMS community forums

Full Version: TCP receive
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to use a reflex in the ftp receive?
The reason is many of the http servers we are monitoring are not returning a 200 some are sending 30x so I would like to check for 200 or 300


Thanks
Hello cdstg,

You can't use regular expresions in TCP receive as it's supposed to be the "conversation" between the server and the target port. A solution could be develop your own server plugin to have the behaviour desired.

Kind regards,
Enrique.
Ok I fixed it you can do this

make the module
Remote TCP network agent, alphanumeric data (remote_tcp_string)

set the TCP send
HEAD / HTTP/1.0^M^M
yes head else you will get the whole page and as this data saves it will creat a lot of data so head is the answer


no TCP Receive

Then in the Warning status
HTTP\/\d\.\d\s*40\d

Critical
HTTP\/\d\.\d\s*50\d

So 40X will issue warn
50x will issue Cirtical


You will also need to do a port check else this will go to unknown if the web server is down





Good trick cdstg!

Thanks for post your solution, it may help other users.

Kind regards,
Enrique.
Actually I looked at the network server Perl code and you can do a regex on the TCP receive for a Boolean module
so you can simply make the http check as

Network type proc

TCP send
HEAD / HTTP/1.0^M^M 
But good to change the standard one in  Pandora to HEAD rather than GET as you do not need to get he whole page anyway

and on TCP Receive
HTTP\/\d\.\d\s*[234]0\d

This means you will get a Cirtical for 500 and no conenction
20X 30X 40X will all report ok










Hello cdstg,

Apologies for my confusion. I'm glad you were able to solve it.

Kind regards,
Enrique.