Giter Site home page Giter Site logo

go-monitor-1's Introduction

Go Report Card

Simple server monitoring in Go

go-monitor is simple server monitoring written in Go. I was on the lookout for a tool which allowed me to monitor a list of services and notify me through SMS or email. Everything I found seemed a bit too complex and so go-monitor was born.

TL;DR

go-monitor monitors a list of services as specified by the user and then notifies one or more users through SMS of any services that are down.

We use MessageBird as an SMS delivery service. SMS can be exchanged for a number of other services through MessageBird.

Config is read through a yaml file. Users can specify how often they are notified of a given service being down through the defaultttl value in the config.

By default, processes are checked every 60 seconds. This can be increased or decreased depending on the importance of services.

This program is intended for use on Unix systems.

Installation

  1. go get github.com/ksred/go-monitor

  2. Install dependencies: godep restore (If you are unfamiliar with Godeop see here)

  3. Update go-monitor.yml.sample to include the configuration options desired.

  4. Rename config to go-monitor.yml.

  5. bash install.sh will build the program and add it as a service.

How it works

We use a Go to push this onto the server:

ps aux | grep PROCESS_NAME

We then read the number of lines returned. Super simple.

Additions

Down the line it would be nice to have server monitoring in addition to process monitoring:

  • CPU
  • Disks (usage, read/write)
  • Memory

This could further be extended into network monitoring. Someday.

License

MIT

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.