<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=942463510-30012006><FONT face=Arial color=#0000ff
size=2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=942463510-30012006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=942463510-30012006><FONT face=Arial color=#0000ff size=2>change
the command_line in misccommand to:</FONT></SPAN></DIV>
<DIV><SPAN class=942463510-30012006><FONT face=Arial color=#0000ff
size=2>/usr/local/nagios/nagiosgraph/insert.pl
"$LASTSERVICECHECK$||$HOSTNAME$||$SERVICEDESC$||$SERVICEOUTPUT$||$SERVICEPERFDATA$"</FONT></SPAN></DIV>
<DIV><SPAN class=942463510-30012006><FONT face=Arial color=#0000ff size=2>You
now have '\t' (tab) in your output for fieldseperator, this must bi
"||"</FONT></SPAN></DIV>
<DIV><SPAN class=942463510-30012006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=942463510-30012006><FONT face=Arial color=#0000ff
size=2>Mels</FONT></SPAN></DIV>
<DIV><SPAN class=942463510-30012006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=942463510-30012006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
nagios-users-admin@lists.sourceforge.net
[mailto:nagios-users-admin@lists.sourceforge.net] <B>On Behalf Of </B>Toto
Capuccino<BR><B>Sent:</B> Sunday, January 29, 2006 6:51 PM<BR><B>To:</B>
nagios-users@lists.sourceforge.net<BR><B>Subject:</B> Re: [Nagios-users]
Graphing values from nagios<BR><BR></FONT></DIV>On Nagios 1.3<BR>Well, i put
the right location of nagiosgraph.conf both in show.cgi and
insert.pl.<BR>My hosts.cfg has <SPAN
style="FONT-WEIGHT: bold">proceess_perf_data 1<BR></SPAN>nagios.cfg has<SPAN
style="FONT-WEIGHT: bold"> <SPAN
style="FONT-WEIGHT: bold">process_performance_data=1 </SPAN></SPAN>and<SPAN
style="FONT-WEIGHT: bold"><SPAN style="FONT-WEIGHT: bold">
service_perfdata_command=process-service-perfdata<SPAN
style="FONT-WEIGHT: bold"> <BR><BR></SPAN></SPAN></SPAN>I have searched for a
perfdata.log file but i dont have one<SPAN style="FONT-WEIGHT: bold"><SPAN
style="FONT-WEIGHT: bold"><SPAN style="FONT-WEIGHT: bold"><SPAN
style="FONT-WEIGHT: bold">. </SPAN><BR></SPAN></SPAN></SPAN>I put debug mode
to 5 and when i simply run insert.pl i dont get any ouptut.<BR><BR>Here's my
map file :<BR># Service type: ping<BR># output:PING OK - Packet
loss = 0%, RTA = 0.00 m<BR>/output:PING.*?(\d+)%.+?([.\d]+)\sms/ <BR>and push
@s, [
ping,<BR>
[ losspct, GAUGE, $1
],<BR>
[ rta, GAUGE, $2/1000 ] ];<BR><BR># Service type:
unix-disk<BR># ouput:DISK OK - free space: / 12372 mB (77%
inode=96%): /raid 882442 mB (88% inode=91%): <BR># perfdata:
/=12372mB;14417;15698;96;16019
/raid=882441mB;999780;999780;91;999780<BR>/output:DISK/ and do {<BR> my
@_pct = /: (\/.*?) .*?(\d+)% inode=(\d+)%/g;<BR> while ( my($_d,$_b,$_i)
= splice @_pct,0,3 ) {<BR> my @_s;<BR>
/perfdata:.*$_d=(\d+)\w*?;(\d+);(\d+);(\d+);(\d+)/;<BR> push
@s, [
$_d,<BR>
[ free, GAUGE, $1*1024**2
],<BR>
[ user, GAUGE, $2*1024**2
],<BR>
[ root, GAUGE, $3*1024**2 ],
<BR>
[ max, GAUGE, $5*1024**2
],<BR>
[ blockpct, GAUGE, $_b
],<BR>
[ inodepct, GAUGE, $_i ] ];<BR> }<BR>};<BR><BR># Service type:
unix-dns<BR># output:DNS OK - 0.008 seconds response time (
test.test.1M IN A192.169.0.47)<BR>#
perfdata:time=8260us;;;0<BR>/output:DNS.*?([.0-9]+) sec/<BR>and push @s, [
dns,<BR>
[ response, GAUGE, $1 ] ];<BR><BR><BR># Service type:
unix-load<BR># output: OK - load average: 0.66, 0.70,
0.73<BR># perfdata:load1=0;15;30;0 load5=0;10;25;0
load15=0;5;20;0<BR>/output:CPU Load ([.0-9]+) (10 min average) ([.0-9]+) (60
min average) ([.0-9]+) (1440 min average) /<BR>and push @s, [
load,<BR>
[ avg1min, GAUGE, $1 ],
<BR>
[ avg10min, GAUGE, $2
],<BR>
[ avg60min, GAUGE, $3 ] ];<BR># Service type: unix-smtp<BR>#
output:SMTP OK - 0.187 sec. response time<BR>/output:SMTP.*?([-.0-9]+)
sec/<BR>and push @s, [ smtp,
<BR>
[ response, GAUGE, $1 ] ];<BR><BR>and here is the output in nagios web
interface <BR>
<UL>
<LI>for ping--> PING OK - Packet loss = 0%, RTA = 1.09 ms <BR>
<LI>for dns --> DNS OK: 0.240 seconds response time <A
href="http://www.yahoo.com">www.yahoo.com</A> returns <A
href="http://68.142.226.46">68.142.226.46</A>,<A
href="http://68.142.226.50">68.142.226.50</A>,<A
href="http://68.142.226.54">68.142.226.54</A>,<A
href="http://68.142.226.55">68.142.226.55</A>,<A
href="http://68.142.226.34"> 68.142.226.34</A>,<A
href="http://68.142.226.37">68.142.226.37</A>,<A
href="http://68.142.226.42">68.142.226.42</A>,<A
href="http://68.142.226.43">68.142.226.43</A>
<LI>for CPU-Load--> CPU Load 0% (10 min average) 0% (60 min
average) 1% (1440 min average) </LI></UL>nagiosgraph.log gives
<BR><BR>Sun Jan 29 18:47:21 2006 INSERT debug: Config
logfile:/usr/local/nagios/nagiosgraph/nagiosgraph.log<BR>Sun Jan 29 18:47:21
2006 INSERT debug: Config rrddir:/usr/local/nagios/nagiosgraph/rrd <BR>Sun Jan
29 18:47:21 2006 INSERT debug: Config
mapfile:/usr/local/nagios/nagiosgraph/map<BR>Sun Jan 29 18:47:21 2006 INSERT
debug: Config rrdtool:/usr/bin/rrdtool<BR>Sun Jan 29 18:47:21 2006 INSERT
debug: perfdata: 1138556838\tnlamssv01\tCpu-load\tCPU Load 0% (10 min average)
0% (60 min average) 0% (1440 min average)\t 10 min avg
Load=0%;80;95;0;100 60 min avg Load=0%;80;95;0;100 1440 min avg
Load=0%;80;95;0;100 <BR>Sun Jan 29 18:47:21 2006 INSERT info: Input
lastcheck:1138556838\tnlamssv01\tCpu-load\tCPU Load 0% (10 min average) 0% (60
min average) 0% (1440 min average)\t 10 min avg
Load=0%;80;95;0;100 60 min avg Load=0%;80;95;0;100 1440 min avg
Load=0%;80;95;0;100 <BR>Sun Jan 29 18:47:21 2006 INSERT info: Input
hostname:<BR>Sun Jan 29 18:47:21 2006 INSERT info: Input perfdata:<BR>Sun Jan
29 18:47:21 2006 INSERT info: Input servicedescr:<BR>Sun Jan 29 18:47:21 2006
INSERT info: Input output: <BR>Sun Jan 29 18:47:21 2006 INSERT debug: Config
logfile:/usr/local/nagios/nagiosgraph/nagiosgraph.log<BR>Sun Jan 29 18:47:21
2006 INSERT debug: Config rrddir:/usr/local/nagios/nagiosgraph/rrd<BR>Sun Jan
29 18:47:21 2006 INSERT debug: Config
mapfile:/usr/local/nagios/nagiosgraph/map <BR>Sun Jan 29 18:47:21 2006 INSERT
debug: Config rrdtool:/usr/bin/rrdtool<BR>Sun Jan 29 18:47:21 2006 INSERT
debug: perfdata: 1138556834\tfrparsv03\tPING\tPING OK - Packet loss = 0%, RTA
= 166.40 ms\t<BR>Sun Jan 29 18:47:21 2006 INSERT info: Input
lastcheck:1138556834\tfrparsv03\tPING\tPING OK - Packet loss = 0%, RTA =
166.40 ms\t<BR>Sun Jan 29 18:47:21 2006 INSERT info: Input hostname:<BR>Sun
Jan 29 18:47:21 2006 INSERT info: Input perfdata:<BR>Sun Jan 29 18:47:21 2006
INSERT info: Input servicedescr:<BR>Sun Jan 29 18:47:21 2006 INSERT info:
Input output: <BR>Sun Jan 29 18:47:21 2006 INSERT debug: Config
logfile:/usr/local/nagios/nagiosgraph/nagiosgraph.log<BR>Sun Jan 29 18:47:21
2006 INSERT debug: Config rrddir:/usr/local/nagios/nagiosgraph/rrd<BR>Sun Jan
29 18:47:21 2006 INSERT debug: Config
mapfile:/usr/local/nagios/nagiosgraph/map <BR>Sun Jan 29 18:47:21 2006 INSERT
debug: Config rrdtool:/usr/bin/rrdtool<BR>Sun Jan 29 18:47:21 2006 INSERT
debug: perfdata: 1138556840\tnlamssv01\tFREE SPACE D\tD:\ - total: 123.24 Gb -
used: 80.73 Gb (66%) - free 42.51 Gb (34%)\t D:\ Used
Space=80.73Gb;110.92;117.08;0.00;123.24<BR>Sun Jan 29 18:47:21 2006 INSERT
info: Input lastcheck:1138556840\tnlamssv01\tFREE SPACE D\tD:\ - total: 123.24
Gb - used: 80.73 Gb (66%) - free 42.51 Gb (34%)\t D:\ Used Space=
80.73Gb;110.92;117.08;0.00;123.24<BR>un Jan 29 18:48:11 2006 INSERT debug:
Config logfile:/usr/local/nagios/nagiosgraph/nagiosgraph.log<BR>Sun Jan 29
18:48:11 2006 INSERT debug: Config rrddir:/usr/local/nagios/nagiosgraph/rrd
<BR>Sun Jan 29 18:48:11 2006 INSERT debug: Config
mapfile:/usr/local/nagios/nagiosgraph/map<BR>Sun Jan 29 18:48:11 2006 INSERT
debug: Config rrdtool:/usr/bin/rrdtool<BR>Sun Jan 29 18:48:11 2006 INSERT
debug: perfdata: 1138556885\tusminsv03\tSMTP\tSMTP OK - 0.419 sec. response
time\ttime=0.419194s;;;0.000000<BR>Sun Jan 29 18:48:11 2006 INSERT info: Input
lastcheck:1138556885\tusminsv03\tSMTP\tSMTP OK - 0.419 sec. response
time\ttime=0.419194s;;;0.000000<BR>Sun Jan 29 18:49:21 2006 INSERT debug:
Config rrdtool:/usr/bin/rrdtool <BR>Sun Jan 29 18:49:21 2006 INSERT debug:
perfdata: 1138556953\tsacapsv01\tDNS\tDNS OK: 0.617 seconds response time <A
href="http://www.yahoo.com">www.yahoo.com</A> returns <A
href="http://68.142.226.55">68.142.226.55</A> ,<A
href="http://68.142.226.32">68.142.226.32</A>,<A
href="http://68.142.226.42">68.142.226.42</A>,<A
href="http://68.142.226.45">68.142.226.45</A>,<A
href="http://68.142.226.46">68.142.226.46</A>,<A href="http://68.142.226.52">
68.142.226.52</A>,<A
href="http://68.142.226.53">68.142.226.53</A>,68.142.226.54\ttime=0.617490s;;;0.000000<BR>Sun
Jan 29 18:49:21 2006 INSERT info: Input
lastcheck:1138556953\tsacapsv01\tDNS\tDNS OK: 0.617 seconds response time <A
href="http://www.yahoo.com">www.yahoo.com</A> returns <A
href="http://68.142.226.55">68.142.226.55</A>,<A
href="http://68.142.226.32">68.142.226.32</A>,<A
href="http://68.142.226.42">68.142.226.42</A>,<A href="http://68.142.226.45">
68.142.226.45</A>,<A href="http://68.142.226.46">68.142.226.46</A>,<A
href="http://68.142.226.52">68.142.226.52</A>,<A
href="http://68.142.226.53">68.142.226.53</A>,68.142.226.54\ttime=0.617490s;;;0.000000<BR><BR><BR><BR></BLOCKQUOTE></BODY></HTML>