30 Apr 2018 09:47 PM
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?
Solved! Go to Solution.
30 Apr 2018 10:04 PM
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
01 May 2018 01:26 PM
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
01 May 2018 01:56 PM
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."
01 May 2018 02:20 PM
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?
01 May 2018 03:09 PM
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
02 May 2018 06:53 AM
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,
02 May 2018 06:54 AM
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,