Curses interface to Checkmk Raw.
Project description
Check Commander
Check Commander is an efficient curses interface for the monitoring software Checkmk.
Most day-to-day activities like time limited acknowledgement, downtime, reinventorize, look up server in a wiki, copy alert text for a ticket system and SSH in to servers can be done with a few keypresses. See screenshots to understand what it's about.
Screenshots
SSH to selected host (which opens a new terminal, in this case a new split in tilix):
Acknowledge an alert and display help:
Show details for an alert:
Getting Started
Prerequisites
- An up to date Checkmk instance.
- Linux, MacOS. (not tested on other platforms yet)
- Python 3.6 or later
- PIP (for easy installation)
Installation
From PIP:
$ pip3 install --upgrade --user checkmk-commander
Run command: chkcom
. It usually ends up in
Linux:
~/.local/bin (installed with --user)
MacOS:
~/Library/Python/<version>/bin
Configuration
You need a "machine" account for your Checkmk instance. A normal user won't work. See Checkmk user config.
You will be asked for configuration details on first run, and a config will be created at
Linux:
~/.config/check-commander.ini
MacOS:
~/Library/Application Support/check-commander.ini
Example basic config:
host = http://omd.lxd/test/
username = automation
secret = long-random-string
How an ssh connection is opened can be changed. Suggested alternatives (put one in config file):
Linux:
terminal_command = x-terminal-emulator -e ssh HOSTNAME
terminal_command = tmux split-window -v -c "$PWD" ssh HOSTNAME
terminal_command = tmux new-window -c "#{pane_current_path}" ssh HOSTNAME
These should open default terminal, split your current tmux tab and open new tmux tab respectively.
MacOS:
terminal_command = open ssh://HOSTNAME
How a wiki is opened can be changed. Suggested alternatives (put one in config file):
Linux:
wiki_command = x-www-browser "https://wiki.example.com/?search=HOSTNAME"
wiki_command = /usr/bin/firefox -new-tab "https://wiki.example.com/?search=HOSTNAME"
MacOS:
wiki_command = open "https://wiki.example.com/?search=HOSTNAME"
How the checkmk website is opened can be changed. Suggested alternatives (put one in config file):
Linux:
browser_command = x-www-browser "https://wiki.example.com/?search=HOSTNAME"
browser_command = /usr/bin/firefox -new-tab "https://wiki.example.com/?search=HOSTNAME"
MacOS:
browser_command = open "https://wiki.example.com/?search=HOSTNAME"
Refresh delay in seconds can be set thus:
delay = 5
Hot-keys
Press ? in app to get an overview.
Support
Open a gitlab issue if you hit a bug or need help.
Implementation details
Uses CheckMK's web API.
Functionality copy to clipboard requires python module cliboard. You will be notified to install it.
Does not read your ssh config or keys, just asks OS to open an ssh connection in a new terminal if you ask for it.
No tracking or nastyness.
Known bugs
- Calling a reschedule may give the error "ERROR - you did an active check on this service - please disable active checks". Not sure why this happens.
- If a non-OMD site is connected to your "distributed monitoring", calling WATO commands on it will return 200 and an error. The WATO command will not be run.
Development
Tests can be run with tox
. Static tests have been done with prospector.
Inspirations and thanks
- Icon made by RallyPointComic
- Thanks to Frank for lots of suggestions and feedback.
- Thanks to Scott Hansen for testing and feedback.
- Thanks to Truls for testing and feedback.
- https://github.com/aranair/rtscli/
- https://forum.checkmk.com/t/writing-to-nagios-cmd-in-distributed-monitoring/17616
- https://checkmk.com/cms_legacy_multisite_automation.html
What users say
- "Herregud så mye bedre dette er enn å kuke i webinterface"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file checkmk-commander-1.5.1.tar.gz
.
File metadata
- Download URL: checkmk-commander-1.5.1.tar.gz
- Upload date:
- Size: 72.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 902f4e7db99c139ca378ff176ea3db21a7cc91edb6776c960f2f91078962dcf5 |
|
MD5 | 878e010c53b6947f033b1b2007096da1 |
|
BLAKE2b-256 | 58b3f16cf8540c26d7eba8468d3beea709d2f053d13cff793c901086ef4dd862 |