aorfanos / monitfiles

A generic setup for monit, with slack integration via webhooks. Designed to provide feedback similar to Nagios.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Monitfiles

This repo contains the Monit files I use for monitoring and reactive maintenance, plus some functions that allow Monit to integrate with Slack, offering readily available feedback to the team.

DISCLAIMER: This product is not maintained to be production-ready -- that being said, if you like the project and I can help with your issue drop me a question.

Dependencies

OS

Debian Jessie or newer

Packages

  • monit
  • mtr (optional, used in my reports)
  • curl

other

  • Slack

Setup

  • Download
git clone https://github.com/aorfanos/monitfiles.git
  • Setup a Slack incoming webhook
  • Create the file slack-webhook-url at /etc/monit and copy/paste the URL of the Slack Integrated Webhook in it
  • Run installer (this will set up the Slack webhooks)
./installer.sh
  • Move the files that apply to you to conf.d (or any other dir monitrc reads)
  • Check and reload monit
monit -t
Control file syntax OK

monit reload

You should shortly see messages like the following coming up on Slack!

Notifications

You can find more info regarding the notifications here.

TODO: Doc for writing own checks

Some info on the kind of curl requests Monit sends, and how to use the scripts to write your own system/process/fs/net checks.

About

A generic setup for monit, with slack integration via webhooks. Designed to provide feedback similar to Nagios.


Languages

Language:Shell 100.0%