Create a ICMP monitor and take action on your device given the status of the monitor.
#Step 1
Copy files over to /mnt/flash on your Arista EOS device
- monitor-ip.py
- show-icmp-monitor.py
- icmp-monitor-tasks.sh
#Step 2
Configure the following event-handlers for each script. The first is to run on boot, the second exposes a new show command to the cli.
Event-Handler for Monitor Script
Event-Handler for cli show commands
#Kick off Manually
If device is already online follow these steps to kick off manually.
- copy .sh & .py files to /mnt/flash/
- ensure root password is configured
- aaa root secret "INSERTYOURPASSWORD"
- from cli prompt, type in keyword bash
- su to root user, use root password
- kick off monitor script manually and set to run in background
- /mnt/flash/monitor-ip.py -r 0.0.0.0/0 -n 10.1.1.2 -m 10.1.1.2 -s et1 &
- Wait for 10 seconds and issue the command to ensure script is running
- ps -ef | grep monitor-ip
- run the following command to expose the show command via the cli
- /mnt/flash/icmp-monitor-tasks.sh
- logout and end ssh session
- ssh back in and verify with following show commands:
- show icmp monitor
- bash ps -ef | grep monitor-ip