[Nagiosplug-devel] Sending newlines for check_tcp

Ton Voon ton.voon at altinity.com
Thu Mar 23 08:02:19 CET 2006


Hi!

Wanted some opinions about a bug raised by Sebastian Wiesinger at  
http://sourceforge.net/tracker/index.php? 
func=detail&aid=1292404&group_id=29880&atid=397597. He is complaining  
that he can't specify a newline when sending data for check_tcp. His  
suggestion is to escape various characters (\n, \r, \t), so then you  
can precisely define what to send.

I applied a patch yesterday suggested by John Rouillard (https:// 
sourceforge.net/tracker/index.php? 
func=detail&aid=1346104&group_id=29880&atid=397599) where there are  
some new options to specify what goes at the end of a the send and  
quit strings. However, his patch makes for some very complicated  
command options, such as:

   check_tcp -ln -s send -lb -q quit -H localhost -p 3333

so send="send\n" and quit="quit\r\n".

I prefer Sebastian's escaping characters idea, but it would mean that  
backwards compatibility would be broken since current commands with - 
s send would mean send="send" with this hypothetical patch.

Any opinions?

Ton

http://www.altinity.com
T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon






More information about the Devel mailing list