Giter Club home page Giter Club logo

monexec's Introduction

Monexec

MONitoring EXEcutables

GitHub release license

It’s tool for controlling processes like a supervisord but with some important features:

  • Easy to use - no dependencies. Just a single binary file pre-compilled for most major platforms
  • Easy to hack - monexec can be used as a Golang library with clean and simple architecture
  • Integrated with Consul - optionally, monexec can register all running processes as services and deregister on fail
  • Optional notification to Telegram
  • Supports gracefull and fast shutdown by signals
  • Developed for used inside Docker containers
  • Different strategies for processes
  • Support template-based email notification
  • Support HTTP notification
  • REST API (see swagger.yaml)
  • Web UI (if REST API enabled)

screencapture-127-0-0-1-9000-2018-06-28-20_46_16

Installing

Precompilled binaries: release page

From source (required Go toolchain):

go get -v -u github.com/reddec/monexec/...

Documentation

Usage: https://reddec.github.io/monexec/

API: Godoc

Examples

See documentation for details https://reddec.github.io/monexec/

Run from cmd

monexec run -l srv1 --consul -- nc -l 9000

Run from config

monexec start ./myservice.yaml

Notifications

Add notification to Telegram

telegram:
  # BOT token
  token: "123456789:AAAAAAAAAAAAAAAAAAAAAA_BBBBBBBBBBBB"
  services:
      # services that will be monitored
      - "listener2"
  recipients:
      # List of telegrams chat id
      - 123456789
  template: |
    *{{.label}}*
    Service {{.label}} {{.action}}
    {{if .error}}⚠️ *Error:*  {{.error}}{{end}}
    _time: {{.time}}_
    _host: {{.hostname}}_

Email

Add email notification

email:
  services:
    - myservice
  smtp: "smtp.gmail.com:587"
  from: "[email protected]"
  password: "xyzzzyyyzyyzyz"
  to:
    - "[email protected]"
  template: |
    Subject: {{.label}}

    Service {{.label}} {{.action}}

HTTP

Add HTTP request as notification

http:
  services:
    - myservice
  url: "http://example.com/{{.label}}/{{.action}}"
  templateFile: "./body.txt"

monexec's People

Contributors

morya avatar reddec avatar

Watchers

 avatar  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.