Code Monkey home page Code Monkey logo

uptime-mon's Introduction

Uptime Monitor

uptime-mon is a small application written in Go that contacts your HTTP services and ensures they're working correctly. It sends a request and checks that the response matches the criteria you set based on a combination of request time, status code, headers and body content. Tests can be made over IPv4, IPv6 or both, and alerting is via Slack.

Usage

uptime-mon loads its configuration settings by looking for a config.yml file in either /etc/uptime-mon/, $HOME/.config/uptime-mon/ or the current working directory in that order of precedence. An example of a config file is included below:

settings:
  slack-webhook: https://hooks.slack.com/services/foo/bar

tests:
  - name: Google homepage
    url: https://www.google.co.uk/
    method: GET
    max-response-time: 3000
    status-code: 200
    header-regexps:
      Content-Type: text\/html; charset=ISO-8859-1
      Set-Cookie: .*
    content-regexp: Google Search
    network: tcp4

The contents of headers are matched based on standard regular expressions, ditto the response body. Note that sometimes you may need to use quotation marks to force the YAML parser to interpret a particular value as a string. The network field allows you to specify whether you want to run the test over IPv4 (tcp4), IPv6 (tcp6), both (both) or use Happy Eyeballs (leave blank).

Installation

Pre-built binaries for a variety of operating systems and architectures are available to download from GitHub Releases. If you wish to compile from source then you will need a suitable Go toolchain installed. After that just clone the project using Git and run Make! Cross-compilation is easy in Go so by default we build for all targets and place the resulting executables in ./bin:

git clone https://github.com/CHTJonas/uptime-mon.git
cd uptime-mon
make clean && make all

Copyright

uptime-mon is licensed under the BSD 2-Clause License.

Copyright (c) 2021 Charlie Jonas.

uptime-mon's People

Contributors

chtjonas avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

kekewind

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.