cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

OneAgent Custom Host Properties

leon_vanzyl
Helper

I have to set a custom property on 5000+ hosts, rather than manually setting the property in hostcustomproperties.conf or executing --set-host-property on each host, is there a way to automate it across all hosts ?

6 REPLIES 6

Julius_Loman
Leader

As far as I know, only tags can be applied to entities via Environment APIs, not properties.

Other solution I think would be to deploy a OneAgent extension (but this still requires pushing the extension to the host by yourself) that will set properties for entities, either host or processes.

TEMPEST a.s., Slovakia, Dynatrace Master Partner

Yeah, this was the other option I considered, but the effort would be more than just executing it on every host...

Agreed. If you don't want to use tags instead of properties, then the only way is to execute something on the hosts via other means. With 5000 hosts I assume you already have some configuration management tools in place and it should not be that hard.

TEMPEST a.s., Slovakia, Dynatrace Master Partner

r_weber
Pro

@Leon Van Z. do you have any other system/config management tools in place to manage these hosts? e.g. Ansible or Puppet?
When I manage custom properties I used to generate the hostcustomproperties.conf via puppet, based on config settings made in puppet facts. Similar to what you could do with Ansible (e.g. execute oneagentctl).

The oneAgent on a host API unfortunately doesn't allow to set properties 😞

Certified Dynatrace Master, Dynatrace Partner - 360Performance.net

Yup it can be done with Ansible , but is there a plan to do it via the API?

ChadTurner
Guru

If you don't have Puppet or Ansible You can use a CSV template that lists the host name, then you can set the custom meta data via the columns. Say Row One has the following columns, Host | Environment | Team | Application.

Then Row two you put in the data so HOST 1 | PROD | WebDev | Easy Travel

And Row 3 for your other hosts : HOST 2 | DR | AppDev | Easier Travel

And so on for your X amount of hosts.

And then within your script, upon install the CSV gets uploaded and as it deploys to Host 1, it looks at the settings and applies the metadata.

Once that is all said and done, you can then create auto tagging rules that looks at that data and list the values as tags for better sorting and rule capabilities.


-Chad