Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 819 Bytes

File metadata and controls

17 lines (12 loc) · 819 Bytes

simple-ansible-inventory-from-check-mk

Provides simple dynamic inventory host info from check-mk to ansible. It also supports multisite and ssl.

mk-inv.py is based on omd.py by Ravi Bhure

Usage: mk-inv.py [-h] (--list | --host HOST | --hostgroup HOSTGROUP | --hostgroups) [--fields FIELDS] [--filtergroup FILTERGROUP] socketurls [socketurls ...]

Example: mk-inv.py --hostgroups tcp:local-server.example.com:6557 ssl:remote-server.example.com:6557

This will provide a json dump of the members of all hostgroups monitored by local-server.example.com and remote-server.example.com. It will connect to the remote server via ssl.

I use the --hostgroups option exclusively to separate different servers into different groups in my ansible playbooks.