Skip to content

Instantly share code, notes, and snippets.

@deckerego
Created September 23, 2015 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deckerego/c31fca80c53db97b7555 to your computer and use it in GitHub Desktop.
Save deckerego/c31fca80c53db97b7555 to your computer and use it in GitHub Desktop.
Monit 5.8 configuration to re-start network interfaces when they lose their link
check host gateway with address 192.168.1.1
start "/usr/sbin/service networking start"
stop "/usr/sbin/service networking stop"
if failed icmp type echo count 5 with timeout 10 seconds
then restart
if 4 restarts within 5 cycles
then exec /sbin/reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment