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_mc.exp

Rating
0 votes
Favoured:
0
Current Version
0.1
Last Release Date
2014-08-29
Compatible With
  • Nagios 2.x
  • Nagios 3.x
License
GPL
Hits
12886
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
This plugin checks media converter interfaces on Allied Telesis hardware, such as AT-MCF2000. It uses a serial connection to the management card, while usual scenarii rather use SNMP through Ethernet connection to the management card.
This plugin requires Expect, works on NetBSD and should work on Linux.

Usage:
check_mc-0.1.exp
[-u|--login login]
[-p|--password password]
[-l|--tty terminal_line]
[-s|--speed terminal_speed]
[-E|--online path_list]
[-F|--100Mb path_list]
[-G|--1Gb path_list]
[-d|--debug file]
[-h|--help]

Default values for login, password and terminal_speed match factory defaults on AT S97 management application ('manager', 'friend', 115200). Default value for line is /dev/ttyS0.

-E stands for 'Ethernet' or 'Enabled'
-F stands for 'FastEthernet'
-G stands for 'GigabitEthernet'

A path_list is of the form: chassis_id/module_id/interface_id. chassis_id should always be 0 where no stacking is used; module_id refers to converters blade (1 is left blade, 2 is right blade); interface_id refers to individual converters. These are AT conventions. The script extends path_list according to usual conventions; thus:
0-3/1,2/1-4,6,8-12 refers to interfaces 1 to 4, 6 and 8 to 12 of modules (blades) 1 and 2 on chassis 0 to 3. Most real-life usage would not be that complex, though.

The script checks for minimal requirements on rate. If a particular converter should be running at 100Mb/s, the script will issue an alert if either or both of copper and fiber sides are down or running at 10Mb/s, and will remain silent if either or both side are running at least at 100Mb/s.

Examples:
check_mc.exp -l /dev/ttyUSB0 -F 0/2/1-11
will check that the converters 1-11 of right (2) blade of the device connected on /dev/ttyUSB0 are all running at least at 100Mb/s (FastEthernet)

When an alarm is raised, the report yields information about faulty side (copper, fiber, both...).

The debug mode enables expect debugging; special value '-' allows debug messages to be displayed on stdout.

This script should also provide a good starting point for anyone willing to develop a tiny plugin with expect.