Download PDF
Download page Server Tagging.
Server Tagging
Use Server Tagging to query, filter, and compare related servers using custom metadata. You can tag related servers based on OS, location, tier, owner, or any other relevant criteria. Server tags provide additional context to server metrics.
For example, you may want to specify deployment-version tags to the servers in a specific cluster, and then use those tags to identify anomalies in server metrics during a new deployment.
Server Tagging requires a Server Visibility license. Server Tagging is currently available for Linux, Windows, and Solaris.
Server Visibility can import the tags (described in the table) automatically.
Source | Tags | Controller and Agent Requirements |
---|---|---|
Custom | Server Visibility can import:
|
|
Machine Agent | These tags display in the Server Dashboard under Tags:
|
|
Amazon Web Services | These tags display in the Server Dashboard under Tags as
|
|
Docker | Server Visibility can import user-defined tags and system container-level tags. These display under Container Details > Tags as The exact set of tags imported can vary depending on the system on which the container is running. |
|
Kubernetes OpenShift | Server Visibility can import ReplicaSet and pod tags. These appear under Container Details > Tags as K8s|<tag> . |
|
View Servers by Tag in the Controller UI
To view filter servers by tag in the Servers list, select Filters and add the criteria you want for the tag filter. If you specify multiple criteria, the filter performs an AND search (for criteria with different keys) and an OR search (for criteria with the same key). This example shows the tag criteria filters for all servers with:
- A Tier tag that equals ECommWeb OR ECommInventory, AND
- An OS Architecture tag that equals x86_64.
Define and View Tags for a Server
You can specify custom tags as a set of key-value strings in the Agent config directory. Each Agent can support up to 50 tags by default.
Follow these suggested best practices to define server tags:
If an Agent is deployed in Amazon Web Services, the Agent can auto-detect and import tags defined in AWS. The Controller also auto-assigns a set of default tags to each server.
The primary use case for custom tags is to specify information that is not already specified in AWS and auto-assigned tags. Before you specify custom tags in the Agent config directory, you should review the current set of tags. Access the Server Dashboard and view the Tags pane at the bottom of the page:
Be careful not to define duplicate tags in the YML
file.
Configure the following option in <machine_agent_home>/extensions/ServerMonitoring/ServerMonitoring.yml
:
Setting | Description |
---|---|
| A list of user-defined tags for the individual server. You can use these tags to query, filter, aggregate, and compare related servers. Each tag is specified by a key-value pair. You can define tag names up to 127 Unicode characters and tag values up to 255 Unicode characters. Define each key on a separate line. All key-value strings should be within single quotes. If a key has multiple values, delineate the list with commas: <key>: [ <value> ] tags: 'Location': ['NYC', 'Data Center', 'Server Room 7'] 'Environment': ['preProduction'] |
Import Tags from Amazon Web Services
Detailed information about Amazon Web Services is outside the scope of AppDynamics documentation.
Before Server Visibility can import tags from AWS, you must set up IAM roles:
- Log in to the AWS console: https://console.aws.amazon.com/iam/
- Create a role with read access to EC2 tags.
Specifically, the role must have an AWS Managed Policy with the required permissions (such as, AmazonEC2ReadOnlyAccess) attached. - Add this role to your EC2 instance.
For information about these steps, search for "To create an IAM role using the IAM console" and "Attaching an IAM Role to an Instance" in this page. - Run the Machine Agent with Amazon Web Services enabled.
Configuration Options for Server Tagging
To edit these settings, log in to the Controller administration console using the root
user password. See Access the Administration Console.
Server Visibility Property | Description | Default |
---|---|---|
sim.machines.tags.enabled | Enable or disable server tags for all servers | True |
sim.machines.tags.aws.enabled | Enable or disable the collection of AWS tags for all servers | True |
sim.machines.tags.aws.pollingInterval | Length of time in milliseconds between each polling of AWS tags | 21600000 |
sim.machines.tags.maxPerMachine | Maximum number of unique tags per account | 50 |
sim.machines.tags.maxPerAccount | Maximum number of unique tags per account | 500 |
Configuration Options for Docker Tags
You can configure the Machine Agent to collect different types of tags. By default, all tags are collected. To turn off tag collection, set dockerTagsEnabled
to "false
".
- Edit the
<machine_agent_home>/extensions/DockerMonitoring/DockerMonitoringConfig.yml
file. Under the
containerMonitoringConfig
section, setdockerTagsEnabled: "false"
# WARNING: Before making any changes to this file read the following section carefully # # After editing the file, make sure the file follows the yml syntax. Common issues include # - Using tabs instead of spaces # - File encoding should be UTF-8 # # The safest way to edit this file is to copy paste the examples provided and make the # necessary changes using a plain text editor instead of a WYSIWYG editor. # # samplingInterval indicates how often to gather metric data. Units in milliseconds. samplingInterval: 30000 containerMonitoringConfig: # containerProcessSelectorRegex defines regular expression to evaluate the processes in # each running container to be monitored by the machine agent. The regular expression is # compared against each process full command line within running # If the pattern matches, then the machine agent start monitoring it. containerProcessSelectorRegex: ".*[ ]-Dappdynamics.*" dockerTagsEnabled: "false"
CODE
Configuration Options for AWS Tags
You can configure the Machine Agent to collect different types of tags. By default, all tags are collected. To turn off tag collection, set awsTagsEnabled
to "false
".
- Edit the
<machine_agent_home>
/extensions/ServerMonitoring/conf/ServerMonitoring.yml
file. Set
awsTagsEnabled: "false"
//ServerMonitoring.yml # WARNING: Before making any changes to this file read the following section carefully # # After editing the file, make sure the file follows the yml syntax. Common issues include # - Using tabs instead of spaces # - File encoding should be UTF-8 # # The safest way to edit this file is to copy paste the examples provided and make the # necessary changes using a plain text editor instead of a WYSIWYG editor. # awsTagsEnabled: "false" # samplingInterval indicates how often to gather metric data. Units in milliseconds. samplingInterval: 30000 ...
CODE
Configuration Options for Kubernetes and OpenShift Tags
You can configure the Machine Agent to collect different types of tags. By default, all tags are collected. To turn off tag collection, set k8sTagsEnabled
to "false
".
- Edit the
<machine_agent_home>
/extensions/ServerMonitoring/conf/ServerMonitoring.yml
file. Set
k8sTagsEnabled: "false"
//ServerMonitoring.yml # WARNING: Before making any changes to this file read the following section carefully # # After editing the file, make sure the file follows the yml syntax. Common issues include # - Using tabs instead of spaces # - File encoding should be UTF-8 # # The safest way to edit this file is to copy paste the examples provided and make the # necessary changes using a plain text editor instead of a WYSIWYG editor. # k8sTagsEnabled: "false" # samplingInterval indicates how often to gather metric data. Units in milliseconds. samplingInterval: 30000 ...
CODE