"Git version control for WATO" - what about versioning other facilities like web settings and reports?

Checkmk 1.6

Just activated the git version control setting and figured out (seems obvious now) that it does only do strictly just the WATO config in etc/check_mk and does not include, say, var/check_mk/web where all the views and reports are stored. Is there a way to hook check_mk to version these, or should I just do a periodic cron job?

It occurred to me that I could symlink it into the etc/check_mk dir just so git could see it, but it would still only trigger a commit as part of WATO changes I presume, with an irrelevant commit message, and thus it’s not really an upgrade on the cron job concept.

I would also recommend to use a cron job here. There are too many changes inside the var/check_mk/web folder that a commit with every change would lead to some thousand commits every day.

I strongly recommend not to do that! You might break Checkmk in some unforseeable way, if there is an unexpected folder (read symlink) there. Probably nothing will break immediately, but ultimately you might get hit by that.

First I want to stress that that setting only creates a local git repository. You might want to create a cronjob, which pushes this changes to a remote server like a GitLab instance.

Second I think your idea won’t make it into the product, as there is little demand and it can be overwhelming to some people. On the other hand I see no problem in you creating your own commit cronjobs, that just run say hourly and commit all changes in the directories you deem interesting.

Yeah, I’m quite familiar with git in other contexts. In this case I’ve got a post-commit hook to push to our git repos, works pretty tidily.

Sounds quite good!

If you implement something for your initial query please let us know, there might be others interested in implementing something similar themselves.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.