Skip to main content

omdclient check_mk + WATO/OMD interface

Project description


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


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


Activates changes made by the API user.


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


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


update/remove a given host tag in OMD


Reinventory a host in OMD.



Acknowledges host/service alerts from the command-line.


Schedules host/service downtimes from the command-line.


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


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


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

Setup / How To Use


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 - - 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 install to install the python library.


make -f Makefile.deb build

That should build a full .deb package.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

omdclient-1.4.1.tar.gz (22.8 kB view hashes)

Uploaded Source

Built Distribution

omdclient-1.4.1-py3-none-any.whl (55.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page