<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">You dont give an example of the script output; possibly it is not quite correct? It should be 4 lines; the 3rd and 4th can be blank if you want, the first two must contain ONLY
a nmber.<br>
<br>
You are using the 'gauge' option - if this counter returns a constantly increasing value, you should not use this, in order to convert to a rate.<br>
<br>
Possibly the returned value is out of range, or is generating a range too small to register, or has a syntax problem?<br>
<br>
Try running MRTG interactively and see if it produces any useful error messages relating to this target.<br>
<br>
Steve<br>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px"><strong>Steve Shipway</strong></div>
<div style="font-family:Tahoma; font-size:13px">University of Auckland ITS</div>
<div style="font-family:Tahoma; font-size:13px"><em>UNIX Systems Design Lead</em></div>
<div style="font-family:Tahoma; font-size:13px"><a href="mailto:s.shipway@auckland.ac.nz">s.shipway@auckland.ac.nz</a></div>
<div style="font-family:Tahoma; font-size:13px">Ph: +64 9 373 7599 ext 86487</div>
<div style="font-family:Tahoma; font-size:13px"><em></em> </div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF354352"><font color="#000000" face="Tahoma" size="2"><b>From:</b> mrtg-bounces+s.shipway=auckland.ac.nz@lists.oetiker.ch [mrtg-bounces+s.shipway=auckland.ac.nz@lists.oetiker.ch] on behalf of Lists [lists@murrell.ca]<br>
<b>Sent:</b> Friday, 1 June 2012 7:19 p.m.<br>
<b>To:</b> mrtg@lists.oetiker.ch<br>
<b>Subject:</b> [mrtg] Blank graph with custom script<br>
</font><br>
</div>
<div></div>
<div>
<p><font size="2">I am using a custom perl script to query an MS Exchange server using check_nt for SMT traffic. I run the script manually and it returns two numbers, one on each line. The first is bytes received and the other is bytes sent. I have run the
script a few times and can see the numbers change.<br>
<br>
When I added the config to my .cfg file, it creates the image files and .log file, but the numbers in the log file are all 0s. I am including my script and snippet from my .cfg file below.<br>
<br>
--- SCRIPT ---<br>
#!/usr/bin/perl<br>
<br>
# Replace '/usr/lib/nagios/plugins/check_nt' with the localtion where your check_nt binary is located<br>
<br>
$sent = `/usr/lib/nagios/plugins/check_nt -H $ARGV[0] -p 12489 -v COUNTER -l "\\MSExchangeTransport SmtpSend(_Total)\\Bytes Sent Total"`;<br>
chomp $sent;<br>
$receive = `/usr/lib/nagios/plugins/check_nt -H $ARGV[0] -p 12489 -v COUNTER -l "\\MSExchangeTransport SmtpReceive(_Total)\\Bytes Received Total"`;<br>
chomp $receive;<br>
<br>
print $sent . "\n"<br>
. $receive .<br>
"\n";<br>
--- SCRIPT ---<br>
<br>
--- mrt.cfg ---<br>
### Exchange 2007 Stats: SMTP Traffic<br>
Target[rcav-ex01.msexchange.smtptraffic]: `/etc/mrtg/scripts/exchange2007_SMTP_traffic.pl rcav-ex01`<br>
MaxBytes[rcav-ex01.msexchange.smtptraffic]: 125000000<br>
Title[rcav-ex01.msexchange.smtptraffic]: RCAV-EX01 SMTP Traffic<br>
PageTop[rcav-ex01.msexchange.smtptraffic]: <h1>SMTP Traffic</h1><br>
Options[rcav-ex01.msexchange.smtptraffic]: gauge,nopercent,growright<br>
#Unscaled[rcav-ex01.msexchange.smtptraffic]: dwym<br>
kMG[rcav-ex01.msexchange.smtptraffic]: KB,MB,GB<br>
YLegend[rcav-ex01.msexchange.smtptraffic]: Kilobytes<br>
ShortLegend[rcav-ex01.msexchange.smtptraffic]:<br>
#Kilo[rcav-ex01.msexchange.smtptraffic]: 1024<br>
Legend1[rcav-ex01.msexchange.smtptraffic]: Total Bytes Sent<br>
Legend2[rcav-ex01.msexchange.smtptraffic]: Total Bytes Sent<br>
LegendI[rcav-ex01.msexchange.smtptraffic]: Total Bytes Received<br>
LegendO[rcav-ex01.msexchange.smtptraffic]: Total Bytes Received<br>
--- mt.cfg ---<br>
<br>
The script, as you can see, takes as its only argument, the server to check. As I mentioned, I can run that exact line from the CLI and it returns values.<br>
<br>
Any ideas what might the issue be? Thanks, in advance.<br>
<br>
-Alan<br>
<br>
</font></p>
</div>
</div>
</div>
</body>
</html>