Thanks Patrick,<br><br>I have been able to get the check_iftraffic.pl to give me some values, but I think these values are not correct and/or - I am missing something important.<br><br><br>Thanks for your help.<br><br>Alex
<br><br><div><span class="gmail_quote">On 10/11/07, <b class="gmail_sendername">Patrick Proy</b> <<a href="mailto:patrick@proy.org">patrick@proy.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>Didn't follow everything about this post, but to disable the embeded Perl,<br>just add "/usr/bin/perl" (depending on your Linux install) before the script<br>in your command.cfg file.<br><br>Patrick
<br><a href="http://nagios.manubulon.com">http://nagios.manubulon.com</a><br><br>________________________________<br><br>De : <a href="mailto:nagios-users-bounces@lists.sourceforge.net">nagios-users-bounces@lists.sourceforge.net
</a><br>[mailto:<a href="mailto:nagios-users-bounces@lists.sourceforge.net">nagios-users-bounces@lists.sourceforge.net</a>] De la part de Alex<br>Dehaini<br>Envoyé : jeudi 11 octobre 2007 19:09<br>À : <a href="mailto:nagios-users@lists.sourceforge.net">
nagios-users@lists.sourceforge.net</a><br>Objet : Re: [Nagios-users] check_iftraffic.pl plugin<br><br><br>Frederik,<br><br>I run the plugin from the command line. How do I disable the embedded perl<br>intepreter. Can you furnish me with your syntax on how you used this plugin.
<br><br>Thanks<br><br><br>On 10/11/07, Vanhee Frederik <<a href="mailto:fvanhee@gmail.com">fvanhee@gmail.com</a>> wrote:<br><br> Alex Dehaini wrote:<br> > Thanks Marc,<br> ><br> > I got the plug in from
<a href="http://www.nagiosexchange.org">www.nagiosexchange.org</a><br> > <<a href="http://www.nagiosexchange.org">http://www.nagiosexchange.org</a> >, sorry I didn't specify that<br>earlier<br> >
<br> > I gave the traffic files in /tmp nagios group and user ownership<br>and<br> > after that, I ran the following command as the nagios user and<br>this is<br> > the result I got<br> >
<br> > nagios@snmp:/usr/local/nagios/libexec$ ./check_iftraffic.pl -H<br> > <a href="http://41.211.0.42">41.211.0.42</a> <<a href="http://41.211.0.42">http://41.211.0.42</a>> -C britania -i eth0 -b 100 -u m
<br> > Total RX Bytes: 1395.95 MB, Total TX Bytes: 2173.82 MB<br>Average<br> > Traffic: 0.00 kB/s (0.0%) in, 0.00 kB/s (0.0%) out|<br>inUsage=0.0,85,98<br> > outUsage=0.0,85,98 inAbsolut=1429448 outAbsolut=2225990
<br> > nagios@snmp:/usr/local/nagios/libexec$ ./check_iftraffic.pl -H<br> > <a href="http://41.211.0.42">41.211.0.42</a> <<a href="http://41.211.0.42">http://41.211.0.42</a>> -C britania -i eth0 -b 100 -u m
<br> > Use of uninitialized value in scalar chomp at ./check_iftraffic.pl<br><br> > line 185, <FILE> line 1.<br> > Total RX Bytes: 1395.99 MB, Total TX Bytes: 2173.86 MB<br>Average
<br> > Traffic: 4.12 kB/s (0.0%) in, 4.12 kB/s (0.0%) out|<br>inUsage=0.0,85,98<br> > outUsage=0.0,85,98 inAbsolut=1429448 outAbsolut=2225990<br> > nagios@snmp:/usr/local/nagios/libexec$ ./check_iftraffic.pl -H
<br> > <a href="http://41.211.0.42">41.211.0.42</a> <<a href="http://41.211.0.42">http://41.211.0.42</a>> -C britania -i eth0 -b 100 -u m<br> > Use of uninitialized value in scalar chomp at ./check_iftraffic.pl
<br><br> > line 185, <FILE> line 1.<br> > Total RX Bytes: 1396.02 MB, Total TX Bytes: 2173.89 MB<br>Average<br> > Traffic: 3.60 kB/s (0.0%) in, 3.64 kB/s (0.0%) out|<br>inUsage=0.0
,85,98<br> > outUsage=0.0,85,98 inAbsolut=1429493 outAbsolut=2226035<br> ><br> > I reckon this means that the plug in is working when ran from the<br> > nagios plugin directory via the command line. However, the UNKNOWN
<br> > error still remains as reported from the the web cgi.<br> ><br> > Am I missing something?<br> ><br> > Alex<br> ><br> ><br> ><br> >
<br> > On 10/11/07, *Marc Powell* <<a href="mailto:marc@ena.com">marc@ena.com</a> <mailto:<a href="mailto:marc@ena.com">marc@ena.com</a> >><br>wrote:<br> ><br> ><br> ><br>
> > -----Original Message-----<br> > > From: <a href="mailto:nagios-users-bounces@lists.sourceforge.net">nagios-users-bounces@lists.sourceforge.net</a><br> > <mailto:<a href="mailto:nagios-users-bounces@lists.sourceforge.net">
nagios-users-bounces@lists.sourceforge.net</a>><br> > [mailto:<a href="mailto:nagios-users-">nagios-users-</a> <mailto: nagios-users-<br><mailto:<a href="mailto:nagios-users-">nagios-users-</a>> >
<br> > > <a href="mailto:bounces@lists.sourceforge.net">bounces@lists.sourceforge.net</a><br> > <mailto:<a href="mailto:bounces@lists.sourceforge.net">bounces@lists.sourceforge.net</a> >] On Behalf Of Alex
<br>Dehaini<br> > > Sent: Thursday, October 11, 2007 10:17 AM<br> > > To: <a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a><br> > <mailto:
<a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a>><br> > > Subject: [Nagios-users] check_iftraffic.pl plugin<br> > ><br> > > Hi Guys,
<br> > ><br> > > I need some help on how to use the check_iftraffic.pl plug<br>in. I<br> > want<br> > > nagios to notify me if any of my servers reach a<br>
150kbits/sec on<br> > their<br> > > NIC. This is what I have done so far.<br> > ><br> > > 1. I downloaded the plug in and gave it the appropriate<br> > ownership and
<br> > > permissions.<br> ><br> > When asking questions about a non-standard plugin, it's very<br> > helpful to<br> > provide specific details about where you got it from. How do
<br>we<br> > know the<br> > check_iftraffic.pl that google tells us about as the top hit<br>is<br> > the same<br> > one you're using?<br> ><br> >
<br> ><br> > > UNKNOWN 10-11-2007 15:10:44 0d 0h 2m 22s 3/6<br>(No<br> > output!)<br> ><br> > "NO output!" typically means the plugin is reporting errors.
<br> ><br> > > Can anyone please assist me. When I run this from the plug<br>in<br> > directory, I<br> > > get results, forexample<br> > ><br> > > snmp:/usr/local/nagios/libexec# ./check_iftraffic.pl -H
<br> > <a href="http://41.211.0.42">41.211.0.42</a> <<a href="http://41.211.0.42">http://41.211.0.42</a>> -C<br> > > community -i eth0 -b 100 -u m<br> > > Total RX Bytes:
1381.80 MB, Total TX Bytes: 2155.67<br>MB<br>Average<br> > Traffic:<br> > > 10.23 kB/s (0.1%) in, 12.45 kB/s ( 0.1%) out|<br>inUsage=0.1,85,98<br> > > outUsage=0.1,85,98 inAbsolut=1410835 outAbsolut=2202385
<br> ><br> > This implies a permissions issue. Testing as root isn't useful<br>since<br> > nagios isn't running the plugin as root. Do the same test<br>again,<br> > except
<br> > as the nagios user. I'll bet you get different and more<br>informative<br> > results.<br> ><br> ><br> ><br> > I'm going to take a very arbitrary guess and assume that I'm
<br> > looking at<br> > the same plugin as you. It uses a temporary file, hard-coded<br>as<br> > /tmp/traffic. Based on your test above, that file is almost<br>certainly<br> > owned by root and probably isn't modifiable by the nagios
<br>user. Change<br> > ownership/permissions of the file or remove it entirely, then<br>test<br> > again<br> > as the nagios user.<br> ><br> > --<br> > Marc
<br> ><br> ><br> ><br>-------------------------------------------------------------------------<br> > This SF.net email is sponsored by: Splunk Inc.<br> > Still grepping through log files to find problems? Stop.
<br> > Now Search log events and configuration files using AJAX and a<br> > browser.<br> > Download your FREE copy of Splunk now >><br><a href="http://get.splunk.com/">http://get.splunk.com/
</a><br> > < <a href="http://get.splunk.com/">http://get.splunk.com/</a>><br> > _______________________________________________<br> > Nagios-users mailing list<br> >
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br> > <mailto:<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a>><br> >
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br> > ::: Please include Nagios version, plugin version (-v) and OS<br>when<br>
> reporting any issue.<br> > ::: Messages without supporting info will risk being sent to<br> > /dev/null<br> ><br> ><br> ><br> ><br> > --
<br> > Alex Dehaini<br> > Developer<br> > Site - <a href="http://www.alexdehaini.com">www.alexdehaini.com</a> < <a href="http://www.alexdehaini.com">http://www.alexdehaini.com</a><br><<a href="http://www.alexdehaini.com">
http://www.alexdehaini.com</a>> ><br> > Email - <a href="mailto:alexdehaini@gmail.com">alexdehaini@gmail.com</a> <mailto:<a href="mailto:alexdehaini@gmail.com">alexdehaini@gmail.com</a>><br> >
<br>------------------------------------------------------------------------<br> ><br> ><br>-------------------------------------------------------------------------<br> > This SF.net email is sponsored by: Splunk Inc.
<br> > Still grepping through log files to find problems? Stop.<br> > Now Search log events and configuration files using AJAX and a<br>browser.<br> > Download your FREE copy of Splunk now >>
<a href="http://get.splunk.com/">http://get.splunk.com/</a><br> ><br>------------------------------------------------------------------------<br> ><br> > _______________________________________________
<br> > Nagios-users mailing list<br> > <a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br> > <a href="https://lists.sourceforge.net/lists/listinfo/nagios-users">
https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br><<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>><br> > ::: Please include Nagios version, plugin version (-v) and OS when
<br>reporting any issue.<br> > ::: Messages without supporting info will risk being sent to<br>/dev/null<br> Hello Alex,<br><br> I think I know what the problem is; your plugin is supposed to give
<br><br> only one line of output (unles you use Nagios 3).<br> However, upon your execution, the first line of output is :<br><br> "Use of uninitialized value in scalar chomp at ./check_iftraffic.pl
<br>line<br> 185, <FILE> line 1."<br><br> So I think there is a problem with the plugin or the perl<br>interpreter.<br> Do you use the embedded perl interpreter ?<br> I use the same plugin from NagiosExchange but don't experience any
<br> problems with it. I always disable the embedded perl interpreter in<br>Nagios.<br><br> Good luck,<br><br> Frederik<br><br><br><br><br><br><br><br><br><br><br><br>--<br>Alex Dehaini<br>Developer<br>
Site - <a href="http://www.alexdehaini.com">www.alexdehaini.com</a><br>Email - <a href="mailto:alexdehaini@gmail.com">alexdehaini@gmail.com</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>Alex Dehaini<br>Developer
<br>Site - <a href="http://www.alexdehaini.com">www.alexdehaini.com</a><br>Email - <a href="mailto:alexdehaini@gmail.com">alexdehaini@gmail.com</a>