Claudio:<br />
I have not used mrtg to analyze switch performance, but I have looked at it carefully and likely will use it soon.<br />
<br />
As I understand it, below is the data flow involving the switch, mrtg, and Nagios:<br />
<br />
switch <-----> mrtg -----> mrtg log file <----- check_mrtg <----> nagios<br />
<br />
ie: mrtg runs independent of Nagios and queries the switch status and logs the result. Then Nagios, through the plugin, reads the log and reports the results.<br />
<br />
There error you get is: "<span class="Apple-style-span" style="color: #333333; font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif; font-size: 13px; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial,serif; line-height: normal; border-collapse: collapse;">Unable to open MRTG log file"</span></span> <br />
<br />
The check_mrtg plugin runs as the OS user Nagios. Therefore, I suspect that if you look at the permissions on the mrtg log file, the Nagios user or group does not have read, nor does public.<br />
<br />
Just my thoughts. Hope it helps.<br />
<br />
Stewart<br />
<p>Stewart St. Dennis<br />
CTO, ZAXIA<br />
</p>
<br />
<br />
-----Original Message-----<br />
From: "Claudio Santander" <claudio.santander@gmail.com><br />
Sent 8/26/2010 4:22:07 PM<br />
To: nagiosplug-help@lists.sourceforge.net<br />
Subject: [SPAM]??[Nagiosplug-help] problem with mrtgtraf and Return code of 127<br />
<br />
<span class="Apple-style-span" style="color: #333333; font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif; font-size: 13px; line-height: 18px;">hi guy`s<br style="margin: 0px; padding: 0px;" />
i have a problem with my nagios core,<br style="margin: 0px; padding: 0px;" />
<br style="margin: 0px; padding: 0px;" />
my problem is this:</span>
<div><span class="Apple-style-span" style="color: #333333; font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif; font-size: 13px; line-height: 18px;"><br />
</span></div>
<div><font class="Apple-style-span" color="#333333" face="'Lucida Grande', 'Trebuchet MS', Verdana, Helvetica, Arial, sans-serif"><span class="Apple-style-span" style="line-height: 18px;"><br />
</span></font></div>
<div><span class="Apple-style-span" style="color: #333333; font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif; font-size: 13px; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial,serif; line-height: normal; border-collapse: collapse;"><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 11px;"><span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-size: 13px;">
<table class="status" style="font-family: arial,serif; background-color: white; color: black; font-size: 8pt; padding: 2px;" width="100%" border="0">
<tbody>
<tr>
<td class="statusEven" style="font-family: arial,serif; font-size: 8pt; background-color: #c4c2c2;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="LEFT">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="statusEven" style="font-family: arial,serif; font-size: 8pt; background-color: #c4c2c2;" valign="middle" align="left"><a href="http://192.168.200.202/nagios/cgi-bin/extinfo.cgi?type=1&host=globalsw" title="192.168.200.254">globalsw</a></td>
</tr>
</tbody>
</table>
</td>
<td valign="middle" align="right">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td valign="middle" align="center"><a href="http://192.168.200.202/nagios/cgi-bin/extinfo.cgi?type=1&host=globalsw"><img src="http://192.168.200.202/nagios/images/logos//base/switch40.gif" alt="" title="" style="border-style: none;" height="20" width="20" border="0" /></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td class="statusEven" style="font-family: arial,serif; font-size: 8pt; background-color: #c4c2c2;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="LEFT">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="statusEven" style="font-family: arial,serif; font-size: 8pt; background-color: #c4c2c2;" valign="middle" align="LEFT">
<a href="http://192.168.200.202/nagios/cgi-bin/extinfo.cgi?type=2&host=globalsw&service=PING">PING</a></td>
</tr>
</tbody>
</table>
</td>
<td class="statusEven" style="font-family: arial,serif; font-size: 8pt; background-color: #c4c2c2;" align="RIGHT">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td class="statusOK" style="font-family: arial,serif; font-size: 8pt; background-color: #33ff00;">
OK</td>
<td class="statusEven" style="font-family: arial,serif; font-size: 8pt; background-color: #c4c2c2;" nowrap="nowrap">08-26-2010 16:14:56</td>
<td class="statusEven" style="font-family: arial,serif; font-size: 8pt; background-color: #c4c2c2;" nowrap="nowrap">
0d 1h 33m 49s</td>
<td class="statusEven" style="font-family: arial,serif; font-size: 8pt; background-color: #c4c2c2;">1/3</td>
<td class="statusEven" style="font-family: arial,serif; font-size: 8pt; background-color: #c4c2c2;" valign="middle">
ECO OK - Paquetes perdidos = 0%, RTA = 0.70 ms </td>
</tr>
<tr>
<td><br />
</td>
<td class="statusBGUNKNOWN" style="font-family: arial,serif; font-size: 8pt; background-color: #ffda9f;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="LEFT">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="statusBGUNKNOWN" style="font-family: arial,serif; font-size: 8pt; background-color: #ffda9f;" valign="middle" align="LEFT">
<a href="http://192.168.200.202/nagios/cgi-bin/extinfo.cgi?type=2&host=globalsw&service=Port+1+Bandwidth+Usage">Port 1 Bandwidth Usage</a></td>
</tr>
</tbody>
</table>
</td>
<td class="statusBGUNKNOWN" style="font-family: arial,serif; font-size: 8pt; background-color: #ffda9f;" align="RIGHT">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td class="statusUNKNOWN" style="font-family: arial,serif; font-size: 8pt; background-color: #ff9900;">
UNKNOWN</td>
<td class="statusBGUNKNOWN" style="font-family: arial,serif; font-size: 8pt; background-color: #ffda9f;" nowrap="nowrap">08-26-2010 16:16:35</td>
<td class="statusBGUNKNOWN" style="font-family: arial,serif; font-size: 8pt; background-color: #ffda9f;" nowrap="nowrap">
1d 3h 21m 32s</td>
<td class="statusBGUNKNOWN" style="font-family: arial,serif; font-size: 8pt; background-color: #ffda9f;">3/3</td>
<td class="statusBGUNKNOWN" style="font-family: arial,serif; font-size: 8pt; background-color: #ffda9f;" valign="middle">
check_mrtgtraf: Imposible abrir el archivo de registro MRTG </td>
</tr>
<tr>
<td><br />
</td>
<td class="statusBGCRITICAL" style="font-family: arial,serif; font-size: 8pt; background-color: #ffbbbb;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="LEFT">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="statusBGCRITICAL" style="font-family: arial,serif; font-size: 8pt; background-color: #ffbbbb;" valign="middle" align="LEFT">
<a href="http://192.168.200.202/nagios/cgi-bin/extinfo.cgi?type=2&host=globalsw&service=Port+1+Link+Status">Port 1 Link Status</a></td>
</tr>
</tbody>
</table>
</td>
<td class="statusBGCRITICAL" style="font-family: arial,serif; font-size: 8pt; background-color: #ffbbbb;" align="RIGHT">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td class="statusCRITICAL" style="font-family: arial,serif; font-size: 8pt; background-color: #f83838;">
CRITICAL</td>
<td class="statusBGCRITICAL" style="font-family: arial,serif; font-size: 8pt; background-color: #ffbbbb;" nowrap="nowrap">08-26-2010 16:08:14</td>
<td class="statusBGCRITICAL" style="font-family: arial,serif; font-size: 8pt; background-color: #ffbbbb;" nowrap="nowrap">
1d 3h 20m 31s</td>
<td class="statusBGCRITICAL" style="font-family: arial,serif; font-size: 8pt; background-color: #ffbbbb;">3/3</td>
<td class="statusBGCRITICAL" style="font-family: arial,serif; font-size: 8pt; background-color: #ffbbbb;" valign="middle">
(Service Check Timed Out) </td>
</tr>
<tr>
<td><br />
</td>
<td class="statusBGCRITICAL" style="font-family: arial,serif; font-size: 8pt; background-color: #ffbbbb;">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td align="LEFT">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="statusBGCRITICAL" style="font-family: arial,serif; font-size: 8pt; background-color: #ffbbbb;" valign="middle" align="LEFT">
<a href="http://192.168.200.202/nagios/cgi-bin/extinfo.cgi?type=2&host=globalsw&service=Uptime">Uptime</a></td>
</tr>
</tbody>
</table>
</td>
<td class="statusBGCRITICAL" style="font-family: arial,serif; font-size: 8pt; background-color: #ffbbbb;" align="RIGHT">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td class="statusCRITICAL" style="font-family: arial,serif; font-size: 8pt; background-color: #f83838;">
CRITICAL</td>
<td class="statusBGCRITICAL" style="font-family: arial,serif; font-size: 8pt; background-color: #ffbbbb;" nowrap="nowrap">08-26-2010 16:13:31</td>
<td class="statusBGCRITICAL" style="font-family: arial,serif; font-size: 8pt; background-color: #ffbbbb;" nowrap="nowrap">
1d 3h 19m 30s</td>
<td class="statusBGCRITICAL" style="font-family: arial,serif; font-size: 8pt; background-color: #ffbbbb;">3/3</td>
<td class="statusBGCRITICAL" style="font-family: arial,serif; font-size: 8pt; background-color: #ffbbbb;" valign="middle">
(Service Check Timed Out) </td>
</tr>
</tbody>
</table>
</span></span></font></span></span></div>
<div><span class="Apple-style-span" style="color: #333333; font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif; font-size: 13px; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial,serif; line-height: normal; border-collapse: collapse;"><br />
</span></span></div>
<div><span class="Apple-style-span" style="color: #333333; font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif; font-size: 13px; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial,serif; line-height: normal; border-collapse: collapse;">this is the log`s nagios.log</span></span></div>
<div><span class="Apple-style-span" style="color: #333333; font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif; font-size: 13px; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial,serif; line-height: normal; border-collapse: collapse;"><br />
</span></span></div>
<div><span class="Apple-style-span" style="color: #333333; font-family: 'Lucida Grande','Trebuchet MS',Verdana,Helvetica,Arial,sans-serif; font-size: 13px; line-height: 18px;"><span class="Apple-style-span" style="font-family: arial,serif; line-height: normal; border-collapse: collapse;">
<div>
[1282848497] SERVICE ALERT: globalsw;Port 1 Bandwidth Usage;UNKNOWN;SOFT;2;check_mrtgtraf: Unable to open MRTG log file</div>
<div><span class="Apple-style-span" style="font-size: small;">
<div>[1282852763] SERVICE NOTIFICATION: claudio;globalsw;Port 1 Link Status;CRITICAL;notify-service-by-email;(Service Check Timed Out)</div>
<div>[1282852763] SERVICE NOTIFICATION: nagiosadmin;globalsw;Port 1 Link Status;CRITICAL;notify-service-by-email;(Service Check Timed Out)</div>
</span></div>
</span></span></div>
<div><font class="Apple-style-span" color="#333333" face="arial, serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br />
</span></font></div>
<div><font class="Apple-style-span" color="#333333" face="arial, serif"><span class="Apple-style-span" style="border-collapse: collapse;">my script is hosted in:</span></font></div>
<div><font class="Apple-style-span" color="#333333" face="arial, serif"><span class="Apple-style-span" style="border-collapse: collapse;"> /usr/local/nagios/libexec/</span></font><span class="Apple-style-span" style="font-family: arial,serif; border-collapse: collapse; color: #333333;">check_mrtgtraf</span></div>
<div><span class="Apple-style-span" style="font-family: arial,serif; border-collapse: collapse; color: #333333;"> </span></div>
<div><span class="Apple-style-span" style="font-family: arial,serif; border-collapse: collapse; color: #333333;">permisionss</span></div>
<div><font class="Apple-style-span" color="#333333" face="arial, serif"><span class="Apple-style-span" style="border-collapse: collapse;">-rwxrwxrwx 1 nagios nagios 56631 2010-08-19 16:19 check_mrtgtraf</span></font></div>
<div><font class="Apple-style-span" color="#333333" face="arial, serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br />
</span></font></div>
<div><font class="Apple-style-span" color="#333333" face="arial, serif"><span class="Apple-style-span" style="border-collapse: collapse;">Regards.</span></font></div>
<div><font class="Apple-style-span" color="#333333" face="arial, serif"><span class="Apple-style-span" style="border-collapse: collapse;">Claudio</span></font></div>
<pre>------------------------------------------------------------------------------<br />
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program<br />
Be part of this innovative community and reach millions of netbook users <br />
worldwide. Take advantage of special opportunities to increase revenue and <br />
speed time-to-market. Join now, and jumpstart your future.<br />
<a href="http://p.sf.net/sfu/intel-atom-d2d" target="_blank">http://p.sf.net/sfu/intel-atom-d2d</a></pre>
<pre>_______________________________________________<br />
Nagiosplug-help mailing list<br />
Nagiosplug-help@lists.sourceforge.net<br />
<a href="https://lists.sourceforge.net/lists/listinfo/nagiosplug-help" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagiosplug-help</a><br />
::: Please include plugins version (-v) and OS when reporting any issue. <br />
::: Messages without supporting info will risk being sent to /dev/null<br />
</pre>