Copy tags to another site

Hallo,
is there a way to transfer tags from one site to another by a simple copy etc…
Or is there an alternative using commandline or api?
Thanks for a hint.

Ralf

Hello,
you can copy the tags.mk file from etc/check_mk/conf.d/wato and from etc/check_mk/multisite.d/wato to the new site directories.

Karl

1 Like

You can use web api for that for more info: https://checkmk.de/cms_web_api_references.html#Hosttagbefehle

  1. you have to use get to old site, you will get all tags
  2. use get to new site you will get configuration_hash key
  3. copy the output from the step 1 and paste it in the set method with the configuration_key of step 2

if you have more than the default tags on new site you have to merge them with the output of the step 1, if not you can just copy and paste

2 Likes