[Nagiosplug-devel] A different ping

Rodger Allen r.allen at awayweb.com
Fri Dec 20 17:09:15 CET 2002


Karl DeBisschop wrote:
> 
>>This plugin will attempt to connect on a designated tcp port, and will
>>return CRITICAL if it fails, but, importantly, it will return OK if the
>>connection is refused.  If the machine is refusing connections, it means
>>that at least the IP stack is alive.
>>
>>There is also a switch "-w" that will issue a WARNING if the plugin
>>receives a connection refused, which some may also find useful, but
>>should not be used in a host check command.
> 
> 
> Since this shares most of its code with check_tcp, it seems to me that
> another approach might be implmenting it as another mode for the
> existing plugin. Have you considered that approach? Might it be viable?
> 
> The benefit would be less installed footprint and less code to maintain.

The plugin arose out of looking into the check_ssh plugin, and the code 
more or less just happened.  It was adequate for our task (getting an OK 
on refused connections), so left it there.

Afterwards, I did take a look at the check_tcp plugin, and in particular 
the netutils.* files, and realized that, as you say, this is the better 
place for it, but was a little intimidated, thinking I would have to 
pass parameters down in the my_connect function and worried that this 
would break many other things.

I've taken another look this morning, and it isn't as bad as all that. 
Second sight and a kick in the pants are a wonderful thing, and I have 
just made some changes to the relevant files to incorporate this into 
check_tcp plugin.

So use/don't use the other submission at your pleasure, and I'll post 
the patches for check_tcp/netutils in a day or so, as the SO is calling 
out to go Xmas shopping right now.


regards
Rodger




-- 
Rodger Allen - Security Consultant     | "te occidere possunt sed
r.allen at awayweb.com                    | te edere non possunt nefas
Mob: +61 402 209 256                   | est" DFW
GPG fingerprint = 958F 256F 5327 D14E 49EA 0681 05E6 2EC3 62E8 793F
Thawte fingerprint = 96:09:A2:3B:67:9F:B4:AE:C8:50:BC:2F:31:00:AB:14





More information about the Devel mailing list