How to Repair Tag Groups? You can not override the builtin tag group "agent"

CMK version: 2.1.0p2
OS version: Debian 10

Error message: Cannot Edit / Repair Tag Groups

I added a tag to the builtin agent tag group (looong time ago I guess) to integrate a custom Fujitsu Eternus Script.

Problem right now is, I cant add/ modify new custom tag groups and I cant remove the one custom tag from “agent” group.

The Warning in Tag Overview
You have customized the tag group(s) agent in your tag configuration. In current Checkmk versions these are builtin tag groups which can not be customized anymore. Your customized tag group will work for the moment, but needs to be migrated until 1.7. With 1.7 it won’t work anymore.

Trying to modify anyhting (custom tag groups oder trying to “fix” agent group) gives

You can not override the builtin tag group “agent”.

Anyway to fix that?

Thanks

You will have to very carefully change the config files in $OMD_ROOT/etc/check_mk.

Thanks for the tip.
I tried removing the tag from /etc/check_mk/conf.d/wato/tags.mk and restarting the site but it does not disappear in gui. Same Problem.
Any more / other files?

thanks

There is also $OMD_ROOT/etc/check_mk/multisite.d/wato/tags.mk.

Thanks, by editing both files I am able to remove the custom added tag to agent tags group but it doenst solve the issue unfortunately.
Same warning persists and still unable to create any new tags and/ or groups

anyone else who could possibly help with this?
Tried “simply” deleting the customized agent tag group, writing down rules n such and cleaning up later, but cant do that either. → crashes with : internal error : agent
crash dump would be available.

created a testing clone.
after deleting absolutely everything from the site. hosts,folders, rules.
I could delete the customized agent tag group and it was fixed.
which is a great solution…

I had the same issue with but with “snmp” giving the error instead of “agent”. I resolved my issue on CME 2.1.0p9. WATO, prior to 2.1, let me mistakenly add a tag with snmp as the id. When that happened, it took my custom tag config and overwrote the existing snmp tag. This caused the system fail on any future attempts to add any tag. I think it was looking in both tags.mk files and would see that the existing tags in the file did not match the expected tags. Probally because the builtin tags are stored somewhere else and cause a duplicate error of some sort? I compared a fresh checkmk-free setup to my production checkmk enterprise edition. Compared the tag files and noticed that anything to do with an snmp tag was not present in those files. On the fresh checkmk, no snmp tags were defined. So, I deleted any tags associated with snmp only on my production server. You have to carefully edit the tags.mk files to mirror each other and make sure that the code ends properly in the file after editing the tags. A sample of my setup is below from one of my tags.mk files. It worked for us. After editing and a core restart, the snmp tag was set back to its default as shown in the picture below and could add a tag called test. The below code and screenshot was taken after the fix.
tag_config.update({'tag_groups': [{'id': 'criticality', 'title': 'Criticality', 'tags': [{'id': 'prod', 'title': 'Productive system', 'aux_tags': []}, {'id': 'critical', 'title': 'Business critical', 'aux_tags': []}, {'id': 'test', 'title': 'Test system', 'aux_tags': []}, {'id': 'offline', 'title': 'Do not monitor this host', 'aux_tags': []}]}, {'id': 'networking', 'title': 'Networking Segment', 'tags': [{'id': 'lan', 'title': 'Local network (low latency)', 'aux_tags': []}, {'id': 'wan', 'title': 'WAN (high latency)', 'aux_tags': []}, {'id': 'dmz', 'title': 'DMZ (low latency, secure access)', 'aux_tags': []}]}, {'id': 'slack_channel', 'title': 'Slack Channel', 'tags': [{'id': 'none', 'title': 'none', 'aux_tags': []}, {'id': 'slack_tdualerts', 'title': 'tdualerts', 'aux_tags': []}, {'id': 'slack_wirelessalerts', 'title': 'wirelessalerts', 'aux_tags': []}, {'id': 'slack_corealerts', 'title': 'corealerts', 'aux_tags': []}, {'id': 'slack_fiberalerts', 'title': 'fiberalerts', 'aux_tags': []}, {'id': 'slack_cablealerts', 'title': 'cablealerts', 'aux_tags': []}, {'id': 'slack_pbxalerts', 'title': 'pbxalerts', 'aux_tags': []}, {'id': 'slack_voicealerts', 'title': 'voicealerts', 'aux_tags': []}, {'id': 'slack_poweralerts', 'title': 'poweralerts', 'aux_tags': []}, {'id': 'slack_testalerts', 'title': 'testalerts', 'aux_tags': []}, {'id': 'slack_pathalerts', 'title': 'pathalerts', 'aux_tags': []}]}, {'id': 'call_profile', 'title': 'Call Notification Profile', 'tags': [{'id': 'none', 'title': 'none', 'aux_tags': []}, {'id': 'callprofile_3', 'title': 'TDU', 'aux_tags': []}, {'id': 'callprofile_1', 'title': 'Path', 'aux_tags': []}, {'id': 'callprofile_4', 'title': 'Voice', 'aux_tags': []}, {'id': 'callprofile_5', 'title': 'Core', 'aux_tags': []}]}, {'id': 'smf_test', 'title': 'test to see if fixed', 'tags': [{'id': 'test_1', 'title': 'Test1', 'aux_tags': []}, {'id': 'test_2', 'title': 'Test2', 'aux_tags': []}], 'topic': 'Tags'}], 'aux_tags': []})

Once I deleted the following from the files, it’s back to working again :slight_smile: . Can be verified by checking if the agent section is back to “(builtin)” and therefore cannot be changed.

{'id': 'agent', 'title': 'Agent type', 'tags': [{'id': 'cmk-agent', 'title': 'Normal Checkmk agent, or special agent if configured', 'aux_tags': ['tcp']}, {'id': 'all-agents', 'title': 'Contact Check_MK agent and all enabled datasource programs', 'aux_tags': ['tcp']}, {'id': 'special-agents', 'title': 'Use all enabled datasource programs', 'aux_tags': ['tcp']}, {'id': 'no-agent', 'title': 'No agent', 'aux_tags': []},]}, 

Might be that you’ve got the Legacy options for the dropdown too, then you should make sure to include that as well.

My agent-tag-group had been “modified” and was editable. I had the mentioned error-message and could not add any tags to any group.

I removed my broken agent-tag-group from both of the config-files and restarted omd. agent is now being reported as built-in and am now able to create my new tags.

1 Like

Same issue, I run omd stop, then removed “agent” section in $OMD_ROOT/conf.d/wato/tags.mk and $OMD_ROOT/multisite.d/wato/tags.mk, then omd start and… it worked!
Many thanks to @r.sander

1 Like

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.