Git Product home page Git Product logo

slagios's Introduction

Very simple program that can run some nagios plugins on a schedule and notify to slack when their state change.

Running

The program is configured solely through environment variables:

To set up a check export:

SLAGIOS_check_<check_name>=<check_comand>

where <check_name> could be something like "01" for the first check, "02" for the second etc. But <check_name> can be any string as long as it unique to a check.

Optionally set the check and recheck interval for a check:

SLAGIOS_interval_<check_name>=<check_interval>
SLAGIOS_rinterval_<check_name>=<check_interval>

Use the same <check_name> as for the check command you want to change.

The default check interval is 60s, but this can be changed by setting:

SLAGIOS_interval=<check_interval>

The default recheck interval is 60s, but this can be changed by setting:

SLAGIOS_rinterval=<check_interval>

<check_interval> is in nano seconds, but takes any string parseable by go's time.ParseDuration function. Eg. 30s, 1min etc.

A Slack webhook URL is required if you want to send state changes to Slack:

SLAGIOS_webhook=<url>

To enable a slash command create a slash command in a Slack App to <slash_cmd>, point i to the exposed port (port 80 internally), and set the following environment variable with you Slack App signing key key:

SLAGIOS_signingkey=<signing_secret>
SLAGIOS_slashcmd=<slash_cmd>

To run the docker image create a file containing environment variables as described above, and run:

docker run --name slagios --rm --env-file env -p 8000:80 jbros/slagios

Building

To build the docker image:

docker build -t jbros/slagios .

slagios's People

Contributors

jbro avatar bullestock avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

bullestock

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.