Jimdo / periodicnoise

Powerful wrapper for periodic tasks like cron jobs
MIT License
27 stars 5 forks source link

periodicnoise

![Gitter](https://badges.gitter.im/Join Chat.svg)

NOTE: Work in progress at the moment.

Powerful wrapper for periodic tasks (e.g. controlled by cron), which:

Build Status

LICENSE

BSD

documentation

package documentation at go.pkgdoc.org

quick usage

TODO

monitoring configuration

To enable passive monitoring, you have to configure a command to be executed for each type of monitoring result. Those commands can be either configured in the global configuration file /etc/periodicnoise/config.ini or in the user-specific configuration file $HOME/.config/periodicnoise/config.ini (the user-specific settings overwrite the global settings).

Here is a sample configuration:

[monitoring]
OK       = printf "somehost.example.com;%(event);0;%(message)\n" |/usr/sbin/send_nsca -H nagios.example.com -d ";"
WARNING  = printf "somehost.example.com;%(event);1;%(message)\n" |/usr/sbin/send_nsca -H nagios.example.com -d ";"
CRITICAL = printf "somehost.example.com;%(event);2;%(message)\n" |/usr/sbin/send_nsca -H nagios.example.com -d ";"
UNKNOWN  = printf "somehost.example.com;%(event);3;%(message)\n" |/usr/sbin/send_nsca -H nagios.example.com -d ";"

Note that following strings will be expanded at runtime:

build and install

install from source

Install Go 1, either from source or with a prepackaged binary.

Then run

go get github.com/Jimdo/periodicnoise
go get github.com/Jimdo/periodicnoise/cmd/pn

safely execute /bin/true two times

$GOPATH/bin/pn /bin/true & $GOPATH/bin/pn /bin/true

safely execute /bin/false two times

$GOPATH/bin/pn /bin/false & $GOPATH/bin/pn /bin/false

LICENSE

BSD

documentation

Instead of writing logging, locking, timeout and load scattering scripts at the 4th company now, I decided to build an open source tool for it.

problems solved

contributing

Contributions are welcome. Please open an issue or send me a pull request for a dedicated branch. Make sure the git commit hooks show it works.

git commit hooks

enable commit hooks via

    cd .git ; rm -rf hooks; ln -s ../git-hooks hooks ; cd ..

Bitdeli Badge