Pandora FMS community forums
TCP receive - Printable Version

+- Pandora FMS community forums (https://pandorafms.org/forum)
+-- Forum: Pandora FMS (https://pandorafms.org/forum/forum-3.html)
+--- Forum: General monitoring discussion (https://pandorafms.org/forum/forum-6.html)
+--- Thread: TCP receive (/thread-8096.html)



TCP receive - cdstg - 10-15-2016

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


Re: TCP receive - enrique_m - 10-20-2016

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.


Re: TCP receive - cdstg - 10-21-2016

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








Re: TCP receive - enrique_m - 10-21-2016

Good trick cdstg!

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

Kind regards,
Enrique.


Re: TCP receive - cdstg - 10-24-2016

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













Re: TCP receive - enrique_m - 10-24-2016

Hello cdstg,

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

Kind regards,
Enrique.