Giter Site home page Giter Site logo

service-watchdog's Introduction

service-watchdog

Linux watchdog service that monitors uptime of other Linux system services.
The service will check and attempt to restart a service if it's down.

The following parameters are configurable via config file watchdog.cfg

  • Which system service to monitor.
  • The email address to notify issues.
  • Intervals between checks of a given service.
  • Number of restarts to try when service is down.
  • Intervals between restarts.

Dependencies

  • Daemon installed on your system.
  • Mail Transfer Agent must be running for sending emails.

Installation

git clone [email protected]:J00MZ/service-watchdog.git
cd service-watchdog
chmod +x watchdog.sh watchdogsd
mv watchdog.sh watchdog.cfg /home/<USER>
sudo mv watchdogsd /etc/init.d

Then run:
sudo service watchdogsd start

Configuration

Set the following in watchdog.cfg to your desired configuration.

  • SERVICE_NAME - default: sshd service
  • CHECK_INTERVAL - default: 60 seconds between checks
  • MAX_ATTEMPTS - default: 5 restart attempts
  • STARTUP_INTERVAL - default: 15 seconds between each restart
  • ADMIN_EMAIL - default: example email

To save updated changes run:
sudo service watchdogsd restart

Logging

Service logs activity to /var/log/watchdog_check.log
The logfile used is also configurable in watchdog.cfg file

service-watchdog's People

Contributors

j00mz avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

kdtiankong

service-watchdog's Issues

work in ethos 1.2.9 ?

Can I use your script at ethos? Does it support version 1.2.9? Do I need to purchase hardware?

create auto installer script

Add a script that auto installs the service.
The current commands described in the README can mostly be used for this.

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.