Page 1 of 1

check_iftraffic.php script

Posted: Wed Sep 21, 2016 9:48 am
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??

Re: check_iftraffic.php script

Posted: Wed Sep 21, 2016 11:42 am
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.

Re: check_iftraffic.php script

Posted: Wed Sep 21, 2016 12:42 pm
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]#

Re: check_iftraffic.php script

Posted: Wed Sep 21, 2016 4:47 pm
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

Re: check_iftraffic.php script

Posted: Sat Sep 24, 2016 12:25 am
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]#

Re: check_iftraffic.php script

Posted: Sat Sep 24, 2016 2:46 am
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

Re: check_iftraffic.php script

Posted: Mon Sep 26, 2016 11:11 am
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.