check_iftraffic.php script

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
orani
Posts: 169
Joined: Wed May 06, 2015 3:33 pm

check_iftraffic.php script

Post by orani »

I try to use this script. It runs fine but i got an error that the interface is down (but it isnt)

any ideas??
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_iftraffic.php script

Post by rkennedy »

Can you show us the full service definition and command definition for the related service? This should help identify what's going on.
Former Nagios Employee
orani
Posts: 169
Joined: Wed May 06, 2015 3:33 pm

Re: check_iftraffic.php script

Post by orani »

[root@nagios-core-network libexec]# ./check_iftraffic.php
USAGE:
check_iftraffic.php -H <IP or Hostname> -C <Community> -i <IF name>
-I <InBandwidth> -O <OutBandwidth> -w <Warning>
-c <Critical> -u <Units to Convert to>
--totals <units>
--from-units <Units received from SNMP>
--counters <32/64>

[root@nagios-core-network libexec]# ./check_iftraffic.php -H 10.0.3.1 -C 0@5@_P@bl1c -i port3
Timeout: No Response from 10.0.3.1
No log handling enabled - turning on stderr logging
.1.3.6.1.2.1.2.2.1.8.: Unknown Object Identifier (Index out of range: (ifIndex))
ERROR: Interface "port3" is DOWN!
[root@nagios-core-network libexec]# ./check_iftraffic.php -H 10.0.3.1 -C 0@5@_P@bl1c -i 23
Timeout: No Response from 10.0.3.1
No log handling enabled - turning on stderr logging
.1.3.6.1.2.1.2.2.1.8.: Unknown Object Identifier (Index out of range: (ifIndex))
ERROR: Interface "23" is DOWN!
[root@nagios-core-network libexec]#
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: check_iftraffic.php script

Post by tgriep »

It looks like the plugin in not getting ant response from the device at all and it could be caused by the special characters in the command. Try adding single quotes around them and see if that works.

Code: Select all

/check_iftraffic.php -H 10.0.3.1 -C '0@5@_P@bl1c' -i port3
Be sure to check out our Knowledgebase for helpful articles and solutions!
orani
Posts: 169
Joined: Wed May 06, 2015 3:33 pm

Re: check_iftraffic.php script

Post by orani »

Same results:

[root@nagios-core-network libexec]# ./check_iftraffic.php -H 10.0.3.1 -C '0@5@_P@bl1c' -i port3
Timeout: No Response from 10.0.3.1
No log handling enabled - turning on stderr logging
.1.3.6.1.2.1.2.2.1.8.: Unknown Object Identifier (Index out of range: (ifIndex))
ERROR: Interface "port3" is DOWN!
[root@nagios-core-network libexec]# ./check_iftraffic.php -H 10.0.3.1 -C '0@5@_P@bl1c' -i 23
Timeout: No Response from 10.0.3.1
No log handling enabled - turning on stderr logging
.1.3.6.1.2.1.2.2.1.8.: Unknown Object Identifier (Index out of range: (ifIndex))
ERROR: Interface "23" is DOWN!
[root@nagios-core-network libexec]#
orani
Posts: 169
Joined: Wed May 06, 2015 3:33 pm

Re: check_iftraffic.php script

Post by orani »

Please close that post.

I found an other script and finaly worked perfect for me...

The script is at the exchange named bandwidth3


thank you all
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_iftraffic.php script

Post by rkennedy »

Glad to hear you were able to resolve this. Closing it out.

Feel free to make a new thread if you run into issues in the future.
Former Nagios Employee
Locked