Host groups/service groups have disappeared

CMK version: Checkmk Managed Services Edition 2.4.0p8

OS version: Ubuntu 24.04.3 LTS

Error message: Host groups/service groups have disappeared, but no real error

Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)

Hey,

my host groups / service groups have “disappeared.” They are not visible in the GUI or in etc/check_mk/conf.d/wato/groups.mk. (only one service group is still there)

However, monitoring continues to work and still uses the previously created groups, e.g., previously created views filtered by a host group are working, or notification rules for which a service group was saved continue to send notifications.

Here is an example of a Service Group assignment rule that still has an old service group stored. When I edit it, Check_MK jumps to the service group that has not disappeared.

image

When I want to use a new rule that requires a host group, Check_MK complains that there are no host groups.

I wonder where they have gone and how I can get them back, or whether I can simply create new ones with the same old names, or whether that would break something.

Best regards,

Kevin

Hi Kevin,

this sounds like a weird bug that would best be addressed with checkmk support (where you can also safely share config files and if you use MSP you probably have support)

Do you have “Use GIT version control for Setup” enabled in the global settings? than you could use “git blame groups.mk” to see when the file was changed and also restore it to its previous glory :slight_smile:

Gerd

1 Like

Hey,

unfortunately, we do not use a GIT setup for this system.

I checked the logs to see if someone had manually deleted the groups or if they had been removed by “something” else, but I haven’t found anything yet. The strange thing is, as already described, that everything continues to work as before, which is why it went unnoticed. A few days ago, I wanted to create a new host group and then saw that everything was gone.

I will contact support.

Just a quick addition as I just noticed I have the same issue.

I didn’t catch it until today when I needed to update a rule for a service group membership and couldn’t save the rule. When I went to either service or host groups in the WebUI, it’s empty. However the Monitor > Service/Host Groups are still populating and work when selected or used in dashboards.

I manually recreated the service groups since I had an immediate need and could click on ‘rules’ to see the unique IDs in the rules display.

My use case is after a recent migration from 2.3.0p38.cme - > 2.3.0p42.cme → 2.4.0p21.cme on RHEL9.

I’ll also reach out to support for the host groups as well but just posting for general awareness to the community.

Sincerely,
Scotsie

PS: @KevinKanz if you hear from support a cause, I’d love to know what you’re told.

I need to start remembering to check Werks…
This might be the fix for this issue but I haven’t applied it yet.

Sincerely,

Scotsie

Hello Kevin,

I have this same problem.
Apparently the groups got deleted when updating from 2.3 to 2.4. We are now on 2.4p20, and run into trouble updating to p22. The groups are already gone (we had quite some goups, to regulate in and out of office time notifications), and I can’t see any way of restoring them, appart from rebuilding from scratch. Did you get a reply from support, with a way to restore this ?

The only way to restore such lost groups is a site backup from before the problematic update.
From this backup you can fetch the group definition and use this on your current system.

The file you need to search for in your backups is the “groups.mk”.

1 Like

Thank you for the fast reply Andreas!
I should be able to do it with this info.

Hey, sorry for the late reply.

I had to wait for a tape to arrive at our data center so I could restore the correct backup.
Finally, I restored the “groups.mk” from /omd/sites/etc/check_mk/conf.d/wato/ from backup in and restarted Check_MK. I then created a new test host group and applied the pending changes so that they would be synchronized with the connected slave servers.

The groups are now back, and Check_MK can recognize them all again. When I try to edit new or old rules, Check_MK no longer displays the error message “You have not defined any groups yet…”, but recognizes the old groups again.

BG Kevin

1 Like