[Check_mk (english)] How do I import custom config settings without using WATO?

Arno Wijnhoven arnow at vsnsystemen.nl
Mon Feb 25 08:56:02 CET 2019


Hi Ron,

--- Only use this solution as a last resort, this is not upgrade proof!!! Best test it thoroughly if you’re going down this route! ---

Not sure about all .mk-files, but I’m editing ‘rules.mk’ (‘ /omd/sites/<sitename>/etc/check_mk/conf.d/wato/<subfoldername>/rules.mk ’) using a python script.
This script is ran by cron every hour. This script adds SSL checks for different sites. Now a user can upload a plain text file with just the URLs and the script generates ‘rules.mk’ based off of those URLs.

This works without OMD restart on 1.4.0p36 Raw (CentOS 7).
Unfortunately this needs to be checked after every update of Check_MK / OMD – if the structure of the files changes, my script will mess it up.
So far so good though.

Arno.

From: checkmk-en <checkmk-en-bounces at lists.mathias-kettner.de> On Behalf Of Ron Wurzberger
Sent: donderdag 21 februari 2019 18:19
To: checkmk-en at lists.mathias-kettner.de
Subject: [Check_mk (english)] How do I import custom config settings without using WATO?

I have a series of custom host tags, rules, host groups, and so on, that I want to import into every OMD site I have. Is there a way to import them directly into an OMD site without using WATO to manually enter them?
1) Can I use a Python script to modify a configuration file (i.e. hosttags.mk<http://hosttags.mk>)? If so, what must I do to get the OMD instance to load the added settings?
2) Can I place my customized settings in a separate file (i.e. for host tags, can I create a file called 'custom_hosttags.mk<http://custom_hosttags.mk>') and simply add it to the configuration folder for each site? If so, what must I do to get the OMD instance to load the new configuration file?
3) Is there a existing tool that comes with OMD whereby I can import my custom settings?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mathias-kettner.de/pipermail/checkmk-en/attachments/20190225/530ac198/attachment.html>


More information about the checkmk-en mailing list