<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
OK. So to make more sense of the whole thing, the only thing that
is taken into account is the actual numerical value? In other
words, it's automatically parsed? This is what I wasn't sure of. <br>
<br>
Here is the entry in the mapfile I was using:<br>
<br>
<br>
<br>
I guess the reason I'm having issues with this is the following
snippet from the nagiosgraph.log:<br>
<br>
Fri May 10 12:57:51 2013 insert.pl warn output/perfdata not
recognized:<br>
hostname:mymachine<br>
servicedesc:Apache Processes<br>
output:PROCS OK: 11 processes with args apache<br>
perfdata:<br>
<br>
the problem is there is no perfdata and the rrd file isn't being
populated, (and obviously, no graph). I'm attributing this to the
fact that the map file entry is wrong. This is really where my
problem lies. Am I looking in the wrong place?<br>
<br>
Thanks.<br>
<br>
<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 5/10/2013 5:11 PM, Claudio Kuenzler
wrote:<br>
</div>
<blockquote
cite="mid:CAF-yqgiw6aJ_w_quRdzRk-6PTcaW+_JfzVFkbAU6sdCui9J0kA@mail.gmail.com"
type="cite"><br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
The output for one query would be:<br>
<br>
PROCS OK: 11 processes with args 'apache'<br>
</blockquote>
<div><br>
</div>
<div>Well first of all you'd have to make sure that nagiosgraph
also takes the output in account. </div>
<div>It's always better to do that with perfdata...</div>
<div><br>
</div>
<div>You have the choice to also take the output as source to
parse, although I strongly recommend to use perfdata. That's
what it is for.</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
What would the map rule look like that would do the following?<br>
<br>
1. Begin with "PROCS OK:"<br>
2. End with "args 'apache'"<br>
3. Extract only the numeric value before the word processes? </blockquote>
<div><br>
</div>
<div>
<div>The regex would look something like this:</div>
</div>
<div><br>
</div>
<div>/output:PROCS.*:(\d+) processes.*/ </div>
<div><br>
</div>
<div>assuming that you don't care about the args and the status
(OK, WARNING, CRITICAL) part. </div>
<div>Only the digit (11) would be taken out of the output in
this case.</div>
</div>
</blockquote>
<br>
</body>
</html>