Skip to main content

falkp.no/blog

Check Commander - Curses interface for Checkmk

A curses interface for checkmk. I named it Checkmk Commander, but Check Commander is easier to say.

logo

I use Checkmk daily. A few common tasks are acknowledging, downtiming and reinventorizing hosts and services. In the web UI this takes lots of clicks and time. So I wrote this client to optimize my workflow.

check commander screenshot

Example workflow in web UI:

  • A new service has been detected on host1, thus I have to reinventorize it.
  • Click on host name.
  • Click WATO
  • Click services
  • Click “fix all missing/vanished”, wait.
  • Click “1 change”
  • Click “Activate affected”, wait.

The same in Check Commander:

Checkmk Plugins, part 1

Some of my checkmk plugins, Webchecks, Blacklist and SQL Dump. Easy deployments.

# Blacklist

If you have a server which is sending mail, drop this check in place. It will check the host it’s running from against a bunch of blacklists. No configuration needed.

checkmk-blacklist:

One positive

# Webchecks

Easy and expansive check of web services. It will:

  • Follow redirects
  • Check (configurable) status code
  • If ssl, check cert and chain. Check remaining time.
  • Configurable string check.
  • If URL contains dev, stage or such, complain if the site isn’t robots-blocked. Else, complain if the site is robots-blocked.
  • Find URLs to check from apache or nginx config.

checkmk-webchecks:

Argos, GNOME Shell extensions

Argos is a free GNOME version of BitBar. Both lets you run any script to create an icon in the panel (or Mac OS X Menu Bar). You can see lots of plugins here: BitBar plugins.

One renegade host

This screenshot shows the hosts file, opened from the argos extension. The extension is shown as a notebook icon with the number of unknown entries.

It complains on forgotten entries in your /etc/hosts file. See Argos-hosts for more info.

Graphing X Aircontrol from Trox Technik

Modern buildings have advanced HVAC systems, but they keep the data for themselves. Let’s fight that. =)

Temperature, CO2, airflow.

I got access to an X Aircontrol from Trox Technik, ZoneMaster HVAC system. It has a web server, so I started playing to see what data could be extracted.

I ended up with this script xaircontrol, which can send data to Grafana via Collectd.

We’ve used it to make some sweet floorplans.

Floorplan

Non-invasive graphing of energy usage

“If you can’t measure it, you can’t improve it.”

Reducing energy usage is hard if you can’t see it. Here’s a cheap way to graph home or office energy usage.

By reading data from the energy meter, one can get super accurate, real-time usage data.

Energy graph

I’ve used:

You need some familiarity with all of the above to set this up.