Home Directory Plugins Network and Systems Management check_cisco_ifs - via SSH or Telnet

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

check_cisco_ifs - via SSH or Telnet

Current Version
0.3
Last Release Date
2011-07-18
License
GPL
Hits
96195
Files:
FileDescription
check_cisco_ifs.plThe check Cisco interfaces plugin
CiscoIOS.pmCiscoIOS Perl module - a set of functions for performing operations on Cisco boxes
CiscoIOS.pm.oldOlder version of the module. Use this if you have a very old version of Net::Appliance::Session
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
check_cisco_ifs - via SSH or Telnet
This plugin allows monitoring of 1 or more interfaces of Cisco equipments.
Supports both SSH and Telnet.
It was tested on 4500 switches but should work properly on any IOS based equipment.
The plugin will return 0 [OK] if all given I/Fs are up, 1 [WARNING] if one of more are down and 2 [CRITICAL] if all are down.

The plugin depends on the CiscoIOS Perl module [also supplied] which has a few other useful functions for operations on Cisco boxes.
This plugin allows monitoring of 1 or more interfaces of Cisco equipments.
Supports both SSH and Telnet.
It was tested on 4500 switches but should work properly on any IOS based equipment.
The plugin will return 0 [OK] if all given I/Fs are up, 1 [WARNING] if one of more are down and 2 [CRITICAL] if all are down.

The plugin depends on the CiscoIOS Perl module [also supplied] which has a few other useful functions for operations on Cisco boxes.

Usage example:

$ ./check_cisco_ifs.pl '172.25.0.12' 'GigabitEthernet2/10,GigabitEthernet2/11' 'cisco' 'cisco' 'cisco' 'SSH' status

OUTPUT:
Analyzing IOS query results: 'GigabitEthernet2/10 is up, line protocol is up (connected)
WARNING: found 1 I/Fs down: 'GigabitEthernet2/11 is down, line protocol is down (notconnect)

RC: 1


CHANGELOG:
Ver 0.3, Mar 26, 2013:
Net::Appliance::Session changed significantly since the version this was written with:
- Replaced call for input_log() with set_global_log_at()
- Don't drop to priv mode unless needed, previously done in ios_connect(). In order to keep the API as is, the argument for priv passwd is still required but - you can pass whatever string you want there.
- childpid() was dropped from Session's API, terminate_session() only calls close() now and it seems to be fine.
Reviews (1)
byjpsantos, May 20, 2013
Hi all!

I'm running Fedora 17 and when I try to run this script it give me error on perl:

./check_cisco_ifs.pl r3602 GigabitEthernet4/16 user pass yes SSH debug
Attribute (transport) is required at /usr/lib/perl5/vendor_perl/Moose/Meta/Attribute.pm line 514
Moose::Meta::Attribute::initialize_instance_slot('Moose::Meta::Attribute=HASH(0xa34ebd0)', 'Moose::Meta::Instance=HASH(0xa34ebe0)', 'Net::Appliance::Session=HASH(0x98d8378)', 'HASH(0x98d8278)') called at /usr/lib/perl5/vendor_perl/Class/MOP/Class.pm line 525
Class::MOP::Class::_construct_instance('Moose::Meta::Class=HASH(0x9eab6a0)', 'HASH(0x98d8278)') called at /usr/lib/perl5/vendor_perl/Class/MOP/Class.pm line 498
Class::MOP::Class::new_object('Moose::Meta::Class=HASH(0x9eab6a0)', 'HASH(0x98d8278)') called at /usr/lib/perl5/vendor_perl/Moose/Meta/Class.pm line 274
Moose::Meta::Class::new_object('Moose::Meta::Class=HASH(0x9eab6a0)', 'HASH(0x98d8278)') called at /usr/lib/perl5/vendor_perl/Moose/Object.pm line 28
Moose::Object::new('Net::Appliance::Session', 'Host', 'r3602', 'Transport', 'SSH') called at CiscoIOS.pm line 29
CiscoIOS::ios_connect('r3602', 'user', 'pass', 'yes', 'SSH', undef) called at ./check_cisco_ifs.pl line 63

Do you know any workaround for this?

Regards
J.
Owner's reply

Hello João,

As per our mail correspondances, I just uploaded a new version of CiscoIOS.pm, please use this one.

Thanks,