Automatic assignment of host tags using API?

Hi community,

I haven’t worked with the HTTP-API yet and I’m not sure if I misunderstand the documentation here

So, in a first step, I want to define (introduce) a new host tag “location” in WATO with its selection options ‘munich’, ‘essen’ and ‘berlin’.

In a second step, I have a list of (monitored) hosts (e.g. in csv) with a second column including the relevant selection option for “location”, for example

grafik

I wonder how to assign / append this information automatically to the relevant hosts in checkmk by using the API (HTTP-API in this case as we are not using 2.0.0 yet).

  • Is this done by using the option “set_hosttag”? In the docu example it seems “set” is used for “define / introduce” a new host tag in general, but not “assign a given selection option to a specific host”?
  • Is there a possibility to combine this procedure with my input csv containing the data?

THX for helping answers!

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.