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

Is it possible to pass a tag name(s) during agent install?

tom_lagona1
Participant

I'm looking for a way to have application teams automatically get their hosts tagged by passing an argument or something during their agent install process. Is there an extra parameter they can pass when running the installer?

7 REPLIES 7

nj_njoku
Inactive

Hey Tom,

There is no parameter for tagging when running the installer in the command line. You do have other options though.

1. You can define an environment variable on the host/process level that get passed as a tag. See link on how this is done.

2. You can create Automatic tagging rules in the Settings -> Tags -> Automatically applied tags section and any host that matches the rules created there is automatically tagged. See link

Hope This Helps

NJ

Hi NJ,

I saw the documentation for #1 but this doesn't get the
host tagged if I'm understanding correctly. At the end of that page it
states, "This feature is currently only available for processes that are
deep monitored via Dynatrace OneAgent."

I know I could set up
automatic tagging to tag any host that has the process tag I'm looking
for but that requires a manual change which I'm trying to avoid.

Thanks for the help!

Tom

I believe that just means if you're trying to set an environment variable for a process group it will only work if they are deep monitored. It should still be usable at the host level though, see one of the first lines:

"You can define an environment variable called DT_TAGS on the process or host level."

Thanks, James. I'll try to get an app team to do some testing today.

Do you know of any examples for linux? I have to provide exact steps for the team to follow but since I don't have access to the box I'm not positive on what to provide.

Once the environment variable is set, I'm assuming the OneAgent would need to be restarted if it's already running?

NJ might have some experience with that, I haven't personally done it yet so couldn't say with certainty if there are any gotchas or anything. What I would do is just look up the standard way to set such variables on Linux go from there. I bet the OneAgent needs to be restarted to pick up the environment variables but again can't say for sure.

James

gautier_begin
Advisor

Hello Tom,

We are currently using automatically applied tags on hosts and that's working fine. Please, have a look to the links provided by Ugochukwu upper, especially the second one, "automated approach" part of the article. Many other possibilities than using the hostname or a environment variable exist like the IP address, the OS type and version etc. The logical to be used can also be a regex, expending the possibilities.

To be known:

- The name of the rule is the tag that will be set.

- Click on the button "Preview" to check your rule.

Regards,

gautier_begin
Advisor

Hello Tom,

We are currently using automatically applied tags on hosts and that's working fine. Please, have a look to the links provided by Ugochukwu upper, especially the second one, "automated approach" part of the article. Many other possibilities than using the hostname or a environment variable exist like the IP address, the OS type and version etc. The logical to be used can also be a regex, expending the possibilities.

To be known:

- The name of the rule is the tag that will be set.

- Click on the button "Preview" to check your rule.

Regards,

Featured Posts