Skip to content

feenes/timon

Repository files navigation

Overview

Timon is a an implementation of a low resource low performance monitoring system.

https://travis-ci.org/feenes/timon.svg?branch=master

It has mainly been implemented as a programming exercise, which started when I noticed, that our monitoring system at work (Shinken a Python fork of nagios) was using way too many resources and was just complete overkill for our modest monitoring requirements.

I'm sure there's other solutions, which will be more complete, more compatible, more efficient, more whatever. But here my attempt on a simple monitoring solution using few resources, but still being implemented in a high level language (Python3 with asyncio)

Objectives

  • when idle 0 memory footprint (crontab driven) or low memory footprint (one bash / or python process only) while idle
  • asynchronous efficient implementation, but allow threads/subprocesses
  • configurable/skalable to adapt to resources available and amount of services to monitor
  • easy to install (just clone or pip install)
  • easy to configure (one yaml file)
  • easy to enhance (simple python module import)

Getting Started

Installation

With pip ::
pip install timon

Commands

  • timon config: compiles/parses/checks config
  • timon run: runs monitoring (one shot or loop)
  • timon status: displays timon status

Configuration

The config file format is not documented, but here at least one config_example

For Probe Developpers

Timon Probe Scripts

Probe scripts are command line scripts, that can be called with some parameters, and that return a status message on stdout.

A status must start with one of the following words:

<STATUS> message

Some functionality is probed: - OK: the probed item is working as expected - WARNING: the probe item is not working as expected, but not in a critical state - ERROR: the probed item is not working as expected and in a critical state - UNKNOWN: the item's state could not be retrieved

The exit code of a script depend on the status: pls check (timon/scripts/flags.py

  • OK: exit code 0
  • WARNING: exit code 1
  • ERROR: exit code 2
  • UNKNOWN: exit code 3

For Developpers

More information about the web front ends generic_frontend_info an be found at webif1_frontend_info

Compiling the web front end

You will require a working node environment. You might for example use nodeenv or nvm:

nodeenv example:

pip install -e .
# TODO: next two lines should be integrated into a build script
pip install nodeenv
nodeenv -p -n 12.22.12
# now build
timon_build webif all

Testing / Running the web front end(s)

Who's using timon