[Nagiosplug-help] Output of check_http not consistent

Olivier 'Babar' Raginel nagios at babar.us
Wed May 23 06:49:48 CEST 2007


On Tue, May 22, 2007 at 09:51:50PM -0400, Thomas Guyot-Sionnest wrote:
> On 22/05/07 11:40 AM, Ingo Lantschner wrote:
> > So first the standard map-file *does* get confused, since it is  
> > searching for a line starting with "HTTP" - a pattern which does not   
> > always fit as we can see. And second: Are you sure, that the time in  
> 
> If you get the data from Nagios there's a macro that gives you only the
> perfdata part. If you have no choice but use the full output, then you
> should discard anything before the first pipe (including the pipe
> itself) and any whitespace after it. The perfdata specifications are
> explained in details here:
> 
> http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN202

I think he's talking about some external tool, like nagiosgraph, which 
runs some code when some patterns are matched.
The problem is to figure out what kind of data you're receiving. As you 
cn only check output and perfdata, you have to find some regexp which 
matches your check_http but nothing else.
>From what I guess, he's referring about the default map file which comes 
with nagiosgraph:
http://nagiosgraph.cvs.sourceforge.net/nagiosgraph/nagiosgraph/map?revision=1.10&view=markup&pathrev=HEAD

  170 # Service type: unix-www
  171 #   ouput:HTTP OK HTTP/1.1 200 OK - 1456 bytes in 0.003 seconds
  172 /output:HTTP.*?(\d+) byte.*?([.0-9]+) sec/
  173 and push @s, [ http,
  174                [ bps, GAUGE, $1/$2 ] ];

Thus his question is more for nagiosgraph's support than here.
As you don't have "bytes" when you get a 302, it won't match.
Yes, this should be changed anyway do get values from perfdata and not 
from output.
Makes me wonder if there is an easy way to check the command name 
launched in a perfdata plugin... Would be much simpler.

-- 
Babar.




More information about the Help mailing list