Discussion:
[Check_mk (english)] Approach to configuring CheckMK via puppet
Scharfenberg, Carsten
2018-10-04 12:43:10 UTC
Permalink
Hi all,

I have some questions concerning configuring CheckMk via puppet. Some of them more general while others are quite specific.
This one question is dealing with the general approach how to this.
I hope there's somebody out there to share his/her experience with me.

I see several approaches to configure CheckMk via puppet:
1. Taking full control over the files managed by WATO. The result would be that WATO is not usable anymore because all changes get overwritten by puppet. Also I need to replicate all WATO settings with puppet right from the beginning. So this approach seems to be somewhat unfortunate.
2. Having some files configured with WATO, others with puppet. E.g. all hosts and inventory checks would be managed by puppet, whereas additional active checks and users are managed by WATO. This requires that possible sets of changes are disjunct concerning the config files (i.e. I can add active checks using WATO without affecting config files that are managed by puppet). I'm not sure if this is the case.
3. Allowing all files to be configured by WATO and puppet simultaneously. For most software packages this is possible using puppets Augeas feature. Unfortunately CheckMk config files are python source code and I did could find an Augeas lens to deal with python code. I've also tried to use the CheckMK Web-API to achieve this. Again I've encountered the same problem: some web requests use python source code in their body. So I have no solution to implement this approach. I will write a second more detailed question about how to use the CheckMk Web API from puppet/ruby.
4. Having puppet manage its own tree of configuration files (living in etc/check_mk/conf.d/puppet or similar). I haven't tried out this approach. I'm completely unsure how puppet and WATO settings will interact with each other in this case. Would it be possible to add a host via puppet and then add a service to this host via WATO? (There are a lot more questions like this).

I would be happy if someone who has experience with one or the other approach contacted me.
Also, maybe there are approaches that I haven't thought about.

Thanks and Best regards,
Carsten
Robert Sander
2018-10-04 20:51:55 UTC
Permalink
Hi,
Post by Scharfenberg, Carsten
This one question is dealing with the general approach how to this.
You should really look into the WATO API to configure Check_MK.
Even Puppet should be able to use that.

I have made an example shell script that can be run on a freshly
deployed host to download the agent from the bakery, register the agent
updater and add the host to the monitoring configuration:

https://github.com/HeinleinSupport/check_mk/blob/master/helper/deploy_checkmk.sh

Regards
--
Robert Sander
Heinlein Support GmbH
Schwedter Str. 8/9b, 10119 Berlin

http://www.heinlein-support.de

Tel: 030 / 405051-43
Fax: 030 / 405051-19

Zwangsangaben lt. §35a GmbHG:
HRB 93818 B / Amtsgericht Berlin-Charlottenburg,
Geschäftsführer: Peer Heinlein -- Sitz: Berlin
Scharfenberg, Carsten
2018-10-12 08:06:46 UTC
Permalink
Hi Robert,

thanks for your answer.
I've already tried using the CheckMK Web API.
Unfortunately there are service methods that use Python code objects in the response body. I don't know how to process them from puppet.
Please also refer to my other request titled "How to consuming the CheckMk Web API from Ruby" (oops, typo in the title...)

Regards,
Carsten

-----Ursprüngliche Nachricht-----
Von: checkmk-en [mailto:checkmk-en-***@lists.mathias-kettner.de] Im Auftrag von Robert Sander
Gesendet: Donnerstag, 4. Oktober 2018 22:52
An: checkmk-***@lists.mathias-kettner.de
Betreff: Re: [Check_mk (english)] Approach to configuring CheckMK via puppet

Hi,
Post by Scharfenberg, Carsten
This one question is dealing with the general approach how to this.
You should really look into the WATO API to configure Check_MK.
Even Puppet should be able to use that.

I have made an example shell script that can be run on a freshly deployed host to download the agent from the bakery, register the agent updater and add the host to the monitoring configuration:

https://github.com/HeinleinSupport/check_mk/blob/master/helper/deploy_checkmk.sh

Regards
--
Robert Sander
Heinlein Support GmbH
Schwedter Str. 8/9b, 10119 Berlin

http://www.heinlein-support.de

Tel: 030 / 405051-43
Fax: 030 / 405051-19

Zwangsangaben lt. §35a GmbHG:
HRB 93818 B / Amtsgericht Berlin-Charlottenburg,
Geschäftsführer: Peer Heinlein -- Sitz: Berlin

Loading...