<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>Blank graph with custom script</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<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>
</BODY>
</HTML>