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.

check_mk API

https://docs.checkmk.com/latest/en/rest_api.html

This interface has been standard since about check_mk 2.0. It's more powerful and more complex than their old WATO API.

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.

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

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.

Also possible to do it all with pipx:

pipx install .
pipx runpip omdclient install -r requirements.txt

Debian

make -f Makefile.deb build

That should build a full .deb package.

Metadata

Release files for omdclient 2.0.0

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 2.0.0
File Size Uploaded Provenance Actions
omdclient-2.0.0.tar.gz 23.2 kB Without provenance Details for omdclient-2.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 78.2 kB

Release files / omdclient-2.0.0.tar.gz

Download URL omdclient-2.0.0.tar.gz
Size 23.2 kB
Tags Source
SHA-256 checksum
How to use checksums
24f43e396f26f923318cc48324a4754d881d07567bcfaebdac8b8fbacca170fa
BLAKE2b-256 checksum
How to use checksums
1e34b7316728a6526570b6e4a36a6171b7aa51ce86175d513431ebcf9c08c409
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

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

Download URL omdclient-2.0.0-py3-none-any.whl
Size 55.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
142dd2948931ae450caeccb0856709471c5846e34a2db5ba84c25489250acfde
BLAKE2b-256 checksum
How to use checksums
d682f2b5c7d6eb06a66d097530650570e725fbe33eabf48b47c0807ea7b72a2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for omdclient 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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