Hey guys,
Wondering if someone would be willing to try this script and post the results. I tried it in the lab, but results are pretty basic, since its just the lab. dos2unix and chmod needed to run it.
Lab:
[Expert@CP-GW:0]# ./cp_flap_watch.py --history 168
Detected interface flaps in the last 168 hour(s):
Interface Down Up Last Event (local time) Last State Bond(s)
--------------------------------------------------------------------------------------
No link up/down events found in the selected time window.
[Expert@CP-GW:0]# ./cp_flap_watch.py --history 10000
Detected interface flaps in the last 10000 hour(s):
Interface Down Up Last Event (local time) Last State Bond(s)
--------------------------------------------------------------------------------------
No link up/down events found in the selected time window.
[Expert@CP-GW:0]# ./cp_flap_watch.py -h
usage: cp_flap_watch.py [-h] (--history HOURS | --live)
Detect and display interface flaps (link up/down) on a Check Point (Gaia) firewall.
options:
-h, --help show this help message and exit
--history HOURS Scan /var/log/messages* and summarize events in the last N HOURS
--live Follow /var/log/messages and show events as they occur
[Expert@CP-GW:0]#
*************************
This may take some time...
[Expert@CP-GW:0]# ./cp_flap_watch.py --live
Following /var/log/messages for link up/down events (Ctrl+C to stop)...
^CTraceback (most recent call last):
File "/var/log/scripts/./cp_flap_watch.py", line 193, in <module>
main()
File "/var/log/scripts/./cp_flap_watch.py", line 190, in main
follow()
File "/var/log/scripts/./cp_flap_watch.py", line 168, in follow
time.sleep(0.5)
KeyboardInterrupt
[Expert@CP-GW:0]#
Best,
Andy