1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

Update in: 25 June 2019


This is a generic script to parse a command output on a Cisco device via Telnet. Could be used to check version, to check power supply status, etc.

This script needs several parameters:

cisco_check_command.pl <ip_address> <password> <timeout> <command> <output>


cisco_check_command.pl pass1234 5 "show version" "12.1(22)EA3"
cisco_check_command.pl pass2335 2 "show env power" "Internal POWER supply is OK"

Will return 0 or 1 depending if response is as expected (as given in the 5th parameter).

Could be modified to work on other kind of equipment, always using telnet. Also could be adapted to work as a remote plugin.



(Visited 342 times, 1 visits today)