Code Monkey home page Code Monkey logo

ping-watchdog's Introduction

ping-watchdog

Simple Python 3 watchdog script that reboots a machine if pinging a specific host fails. You can customize the following settings in the config file:

[ping]
host = 127.0.0.1  # host to ping 
attempts = 4      # how many failed ping attemps are allowed
timeout = 2       # each ping timeout in seconds
retries = 2       # how many ping retries 
retry_wait = 60   # wait, in seconds, before each new ping retry

[reboot]
max_reboots_per_day = 3
reboot_cmd_nix = sudo /sbin/shutdown --no-wall --reboot +2  # unix like reboot command 
reboot_cmd_win = shutdown /r /t 120  # windows reboot command 

[pushover]
pushover_user_key = 
pushover_api_token = 

[log]
log_file = ping-watchdog.log
log_max_size = 2097152  # empty log file if larger than this (bytes). 0 to disable

ping-watchdog's People

Contributors

bgeneto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.