Cisco

Check NTP on MSFC and Switch - SNMP v1, v2c, v3

This script checks NTP on MSFC and Switch (tested on Cisco MSFC 6513, Switch 3560 and 3750).

Modules included :

Mode 1 - Association

NTP association status

check_cisco_ntp.sh -H hostname -V version -M asso [-C|-l|-u|-a|-d|-h]

Parameters

-H Hostname (IP adresse or DNS name)
-V Version (1|2c|3)
-M Mode (asso)

Optional

-C Community (name) *** Use on Version 1|2 ***
-l Login (NoAuthNoPriv | AuthNoPriv | AuthPriv) *** Use on Version 3 ***
-u Username *** Use on Version 3 ***
-a Password *** Use on Version 3 ***
-d Debug mode
-h Help (print command usage, and quit)

Sample commands

# ./check_cisco_ntp.sh -H 192.168.0.1 -V 1 -M asso -C Public
OK - Node status : noWarning - Source status : 10.0.0.1 (client mode) : OK | ok=1

# ./check_cisco_ntp.sh -H 192.168.0.1 -V 3 -l AuthNoPriv -u user -a password -M asso
OK - Node status : noWarning - Source status : 10.0.0.1 (client mode) : OK | ok=1

#./check_cisco_ntp.sh -h
Display help

# ./check_cisco_ntp.sh xxxxxx -d
Enable debug mode