Skip to main content

omdclient

omdclient provides a suite of command-line tools to interact with the APIs associated with the check_mk/Open Monitoring Distribution tool suite.

WATO APIs

WATO is used to create, remove, and modify entries within the OMD user suite. This is documented at:

http://mathias-kettner.com/checkmk_wato_webapi.html

omd-activate

Activates changes made by the API user.

omd-bulkimport

Takes a list of hosts on STDIN and adds them to a specific folder in OMD.

omd-host-crud

Creates/Reads/Updates/Deletes entries from an existing monitoring interface.

omd-host-tag

update/remove a given host tag in OMD

omd-reinventory

Reinventory a host in OMD.

Multisite/Nagios

https://mathias-kettner.de/checkmk_multisite_automation.html

omd-nagios-ack

Acknowledges host/service alerts from the command-line.

omd-nagios-downtime

Schedules host/service downtimes from the command-line.

omd-nagios-hostlist

Print a list of all hosts in the given nagios instance.

omd-nagios-hosts-with-problem

Print a list of hosts that are currently exhibiting a specific problem.

omd-nagios-report

Prints a human-readable report on current host and service alerts.

Setup / How To Use

/etc/omdclient/config.yaml

You'll have to populate this file on your own:

server: 'xxxxxx.example'
site: 'xxxxxx'
user: 'xxxx-api'
apikey: 'xxxxxx'

If you set the 'OMDCONFIG' environment variable you can point at different configs, e.g.:

OMDCONFIG=/tmp/myconfig.yaml omd-activate

Configuration of 'expanded views'

The report scripts depend on 'expanded view' versions of the hostproblems and svcproblems views, which add comments. In order to add these, you generally have to:

  1. Edit view hostproblems - it's a default view, so you'll go to 'clone'.
    • Change the name from hostproblems to hostproblems_expanded.
    • Update the list of columns to read:
      1. Hostname
      2. Host icons
      3. Host state
      4. Output of host check plugin
      5. Number of services in state OK
      6. Number of services in state WARN
      7. Number of services in state UNKNOWN
      8. Number of services in state CRIT
      9. Number of services in state PENDING
      10. The age of the current host state
      11. Host comments
    • (newer versions) set to 'public' and 'hidden'.
    • Save.
  2. Edit the view svcproblems and created svcproblems_expanded, same as above but just add the column Service Comments.

In newer versions of check_mk, you may also need to make these views Public (check Visibility / Make this view available for other users / Publish to all users). Also, the hostproblems base view may have changed: I have for hostproblems_expanded:

(Thanks to Christian Bryn - https://github.com/epleterte - for the docs!)

How To Build

There is a Makefile.bak and a *.spec file that mirrors my local build process for RPMs, if this matches your requirements; just run make -f Makefile.bak build-nomock.

Otherwise, you may want to just follow the general instructions in *.spec. Scripts from usr/bin/* go into your path; create /etc/omdclient/config.yaml as described above; make man pages with pod2man if you're ambitious; and run python setup.py install to install the python library.

Debian

make -f Makefile.deb build

That should build a full .deb package.

Release files for omdclient 1.4.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for omdclient 1.4.3
File Size Uploaded
omdclient-1.4.3.tar.gz 23.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for omdclient 1.4.3
File Interpreter ABI Platform
omdclient-1.4.3-py3-none-any.whl Python 3 none any Details

Total release size: 81.0 kB

Release files / omdclient-1.4.3.tar.gz

Download URL omdclient-1.4.3.tar.gz
Size 23.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a1b247613858dad046b87eb1a535873df49e599a7ace3a3d4132912adc7be33f
BLAKE2b-256 checksum
How to use checksums
402e08ef075877ef68c24bbf62448456ad4733f298448051d8cfb641a4159a05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

Release files / omdclient-1.4.3-py3-none-any.whl

Download URL omdclient-1.4.3-py3-none-any.whl
Size 58.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8257164d7d6ff0a176b4c1b46413e41fe1ff526413f4abb8cfcce4388d4a4ad1
BLAKE2b-256 checksum
How to use checksums
fe2fc48dc85b07183f1272ed95070e7a1c549ce6ee7099a6b8a688e810ab4b55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

Release history Release notifications | RSS feed

This release

1.4.3 This release

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.3.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page