Skip to content

[Do Not Merge]docs: update microsoft sql documentation #20674

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 17 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
---
title: 'Enhanced tags for New Relic database entities'
metaDescription: "Discover how New Relic's enhanced tags for MySQL, MSSQL, and PostgreSQL on-host integrations provide richer entity metadata, enabling better organization, filtering, and insights for your database monitoring. Learn to apply custom tags via config files."
freshnessValidatedDate: never
---

New Relic now provides richer, more customizable tags for your database entities monitored via on-host integrations, including MySQL, Microsoft SQL Server, and PostgreSQL. This enhancement allows you to gain deeper insights, improve filtering, and better organize your monitored database instances based on your specific operational needs.

Previously, database entities monitored through on-host integrations typically displayed only basic tags like `account`, `accountId`, and `trustedAccountId`. Now, you can add valuable context-rich tags such as `environment`, `owning_team`, `region`, `cell`, and any other custom metadata relevant to your setup, directly from your integration configurations.

## How tags are applied to database entities [#db-entity-tags]
Tags on your database entities are automatically generated from specific attributes found in your telemetry. You can directly influence these tags through your configuration files:

### From database integration configuration
Any attribute defined within the labels section of your database integration's configuration file (for example, `mysql-config.yml`, `mssql-config.yml`, `postgresql-config.yml`) will automatically become a tag on the corresponding database entity.

Changes to these configuration files are automatically picked up and do not require a service restart of the New Relic infrastructure agent or the database service.

Example snippet for a database integration config file (for example, `mysql-config.yml`):

```yaml

# /etc/newrelic-infra/integrations.d/mysql-config.yml
integrations:
- name: nri-mysql
config:
# ... other configuration ...
labels:
environment: production
owning_team: database-admins
cell: us-east-1a
app_version: v2.5.0
```

### From infrastructure agent custom attributes
Custom attributes defined in the `custom_attributes` section of your `newrelic-infra.yml` file can also become tags on all entities monitored by that specific infrastructure agent, including your database instances.

For an Infrastructure agent custom attribute to be converted into a tag on a database entity, its key must start with the prefix `label.`.

Changes to `newrelic-infra.yml` require a restart of the infrastructure agent to take effect.

Example `newrelic-infra.yml` snippet:

``` yaml

# /etc/newrelic-infra.yml
# ... other configuration ...
custom_attributes:
region: 'APAC'
host_type: 'production-server'
label.data_center: 'Mumbai-DR'
label.deployment_tier: 'backend'
```

In this example, `data_center` and `deployment_tier` would appear as tags on your database entities, while `region` and `host_type` would remain as custom attributes on the host itself.

## Understanding tag behavior in New Relic
It's important to understand how these telemetry-based tags behave in the New Relic UI:

- **UI display vs. telemetry:** In the New Relic UI, the `label.` prefix used in telemetry is automatically removed for tags originating from `newrelic-infra.yml`. For instance, `label.data_center` will appear simply as `data_center` in the UI tags panel. Tags defined directly in the labels section of your database integration config files (for example, environment in `mysql-config.yml`) will appear as defined, without an added `label.` prefix.
- **Tag latency:** Tags are not real-time telemetry. Due to caching in the ingest pipeline, it might take up to **5 minutes** for a newly added tag to appear in the UI.
- **Updating tag values:** If you modify the value of an existing tag (for example, changing `environment: staging` to `environment: production`), the new tag value will be added. The old tag value will persist for a while until its Time To Live (TTL) of **4 hours** expires. This can temporarily create the appearance of duplicate tags in the UI until the old one is removed. However, at the telemetry level (for example, in NRQL queries), the updated tag value will overwrite the previous one, meaning there will only be one active value for that tag.
- **Deleting tags:** If you remove a tag from your configuration, it will continue to show in the UI for up to **4 hours** due to its TTL.

## Impact on your existing setup
- **No change to billing:** This update has no impact on your billing.
- **No change to existing telemetry:** There is no difference to any other behavior, and no change to the existing telemetry you are already collecting. The primary effect is enriching the metadata associated with your entities in the UI.

By understanding these points, you can effectively customize and leverage enhanced tags to create a more organized and insightful monitoring experience for your database instances in New Relic.
Loading