Skip to content

Extremely simple Nagios/Icinga2 NRPE-based server monitor -- ideal for monitoring your monitor server in a small setup.

License

Notifications You must be signed in to change notification settings

stirlab/poor-mans-nagios

Repository files navigation

Poor Man's Nagios

Extremely simple Nagios/Icinga2 NRPE-based server monitor -- ideal for monitoring your monitor server in a small setup.

Overview

After having set up a small server farm monitored using Icinga2, I found myself in need of a simple way to monitor the monitoring server itself.

Not wanting to install and configure an entire second Icinga2 instance just to perform one simple monitoring action, I wrote this instead.

It implements a simple checking algorithm with a failure threshold, and sends alert emails via the local SMTP server.

Works for me.

This humble library provides the following:

  • A base PoorMansNagios class, which handles the monitoring checks and alerting
  • PoorMansMailer class, which handles sending alert emails
  • poor-mans-nagios-cli.py: Wraps the base class for calling from CLI
  • poor-mans-nagios.service: Example systemd service file.

Setup

Written in pure Python, 3.x required.

Dependencies

The library does its work by leveraging the Nagios NRPE framework, so that will need to be properly installed/configured. This library needs access to the check_nrpe binary, and the monitored server needs a running NRPE daemon with a check configured.

You'll also need a running SMTP server, such as Postfix, capable of sending emails it receives locally.

Configuration

  • Copy config.sample.yaml to config.yaml
  • Edit to taste

The sample file is well-commented.

Usage

Execute poor-mans-nagios-cli.py --help for help.

About

Extremely simple Nagios/Icinga2 NRPE-based server monitor -- ideal for monitoring your monitor server in a small setup.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages