Checkmk goes Ansible

@edit: This post was transferred from my private account (@thorian93) to my work account (@robin.gierse) with my consent. Keep this in mind when reading.

Hello guys!

Disclaimer: I know I am not the first one to build Ansible roles for Checkmk, I have seen the posts here and found some roles in the Galaxy already. This is merely my humble approach to the subject.

As it came up during the Checkmk Conference No. 7, I want to outline my thoughts on the matter and see who wants to participate and what we can do.

I started creating two Ansible roles for Checkmk just before the conference:

Links

They are in a very early maturity state, I am considering them alpha at best.

My intention behind this post is the following: I want to start a community driven project which revolves around Ansible. This can include roles, collections but also modules. I would love to see the community work together to build an ecosystem in Ansible around Checkmk.

For starters these are some ideas where to start:

Ideas
  • Collaborate on the two existing roles to improve them
  • Create additional roles if use cases come up
  • Create native Ansible Modules that handle e.g.:
    • Host Management
    • Checkmk Management (Like Sites, Rulesets etc.)

Personally I will focus on role development and maybe collections as that is what I do. If someone is knowledgeable about creating Ansible Modules please raise a hand, then we can connect.

Maybe we can start something that helps everyone regardless of the edition and environment they are using Checkmk in.

I appreciate all input!

16 Likes

Awesome idea. I would like to learn and contribute here.

1 Like

Hi @thorian93
I like this idea. I have some ansible stuff on myself here. Maybe I can add it to your ones.
I’ll contact you directly.

2 Likes

@davidwayne: Do you have any knowledge regarding Ansible or Python? Because we definitly need Python programmers for the Ansible modules.
For the Ansible roles and general stuff I am happy to help and educate however I can. :slight_smile:

Hi @thorian93,

There are some early implementations in a project we had some years ago. You will find them in our official git repository: cmk_host_registration

Unfortunately our official project is on hold due to other priorities. But feel free, to use this code as inspiration, if you like. As I am very limited in my (free)time (two small kids at home…), I most likely cannot participate in your project - but I may have some space here and there to answer open questions. Just write me a private message. :slight_smile:

1 Like

Hi,

I guess you checked what already exists.
What is missing from Chris Lingberghs projects?

Regards,
Simon

1 Like

Briefly: I did not go through them entirely. So I cannot say how good they are.

My intend here is - primarily - to get the community together to work on this topic.

If Chris feels like joining the efforts that’d be awesome.

I appreciate your efforts - but wouldn’t it be better then that you try Chris’ roles first and find out if they are already fulfilling your requirements?
I have used both of Chris’ Checkmk Ansible roles (server/client) for a customer project; they worked flawlessly. Chris releases frequently and responds to pull requests. What more could I want?
Please get me right: I just want to point you to the risk of reinventing the wheel.

1 Like

@thorian93 In Checkmk context, I have done some bits and pieces in Ansible and Puppet. Also, I am not a developer but with my day to day dealing with Checkmk in multiple environments, I can fix things.

Pingback: Checkmk_ansible_modules - #8 by DerD

Just to assure you this is not dead: As these things go, just after being thrilled by the positive feedback regarding this around the last Conference and starting this post, I got a lot of stuff going on. That’s why there is so little activity here. But I will be back! :wink:

As soon as anything starts moving again I will update here.

Thanks for all the feedback and interest shown here and elsewhere!

4 Likes

Hey folks!
I know, it has been a while, and I apologize for playing dead.
It’s-a-me @thorian93’s alter ego @robin.gierse. :slight_smile:
Some of you might be aware, that I joined the tribe in the end of last year. Due to that, I am acting under this new account as the tribe employee in contrast to purely private usage of @thorian93. The career change had a little impact on the time at my disposal, but also opened up new opportunities.

But that’s enough about my person, you are here for Ansible!

Without further ado, let me announce the first release of our brand-new Ansible collection to the Ansible Galaxy! :tada:

A few disclaimers are due though first: This is a purely open source, non-commercial side project. Meaning: a few of the tribe members are working part-time on this. We try to keep up, but please be merciful, in case we cannot uphold your expectations. Furthermore, there will be no commercial support from tribe29. But of course and as always: The community is here, and we will work issues opened in the GitHub repository.
Also, please be aware that this a very basic release and we want to features as we go. But we are sure you will already find value in it. :slight_smile:

Now after that legal-ish talk, here are the links to the content.
Enjoy, share, provide feedback!
Thanks in advance for everyone using, contributing and sharing!

Ansible Galaxy: tribe29.checkmk

6 Likes

The newest release of our collection containing the brand-new downtime module just hit the Galaxy! :tada:
Huge shout out to @lgetwan for his continuing efforts! :clap: :medal:
Also, a big shout out to @Gaida_Oliver for laying the groundwork on the downtime module! :clap:

5 Likes

New bug fix release. :rocket:

3 Likes

Whoop whoop! :tada:
We now got an agent and a server role in an official release:

I am aware, that there already was a discussion on why to reinvent the wheel, when there already is something out there. In this case, plain and simple, we as the tribe provide basic roles to users and customers which also help us in our daily work. So if you like them and want to use them: Great! :blush:
If you have some you like better: Go for it, we do not take that personally. :wink:

3 Likes

New version! :partying_face:

GitHub collaborator diademiemi added support for RedHat derivatives to the server role and improved the overall RedHat experience in the roles. She also added the possibility to automatically add hosts to Checkmk during agent installation. Shout out to you! :open_hands:

4 Likes

Any plan to add support for MS Agents? Unfortunatly 90% of our hosts are MS Windows…

Plans? Yes. A timetable? Not at all.
We do not have easy access to Windoze boxes, so anyone who wants to give it a shot, have at it! :muscle:

The Checkmk Ansible Collection v0.6.0 is here! :rocket:
Introducing upgrade management for Checkmk sites!
Huge shout out to diademiemi once again! :partying_face:

We are on fire this week! :fire:
The next release with loads of improvements to the agent role is out just now. :robot:

Also, don’t miss our next Community Call! I will be discussing the Checkmk Ansible Collection and you will have the opportunity to listen in, ask questions and give feedback. Looking forward to seeing you there! :hugs:

1 Like