Description
Description
Currently, the entity name is constructed internally by the integration like this:
ms-instance:a7c4e04d109d:instance=a7c4e04d109d
Looking at the source code, this comes from:
const instanceNameQuery = "select COALESCE( @@SERVERNAME, SERVERPROPERTY('ServerName'), SERVERPROPERTY('MachineName')) as instance_name"
When working with dockerized/kuberentes environments, this stops making any sense:
- ServerName becomes an ephemeral concept, autoasigned by the environment and can change frequently when moving MSSQL pods.
The aim of the feature request is to add a configuration item that can be used to override the construct used to produce the inventory key manually.
Maybe something like this:
integrations:
# Integración de solo inventario, no requiere mucha frecuencia...
- name: nri-mssql
env:
HOSTNAME: ${HOSTNAME}
USERNAME: ${USERNAME}
PASSWORD: ${PASSWORD}
ENABLE_SSL: true
TRUST_SERVER_CERTIFICATE: true
TIMEOUT: 8
INVENTORY: true
OVERRIDE_SERVERNAME: {myimaginaryserver}
OVERRIDE_INSTANCENAME: {myinstance}
interval: 20s
labels:
environment:
role: mssql
inventory_source: config/mssql
Acceptance Criteria
Describe Alternatives
Adding labels to the integration, and constructing the MSSQL panels on NR based on labels, which makes the out-of-the-box panels and inventories useless.
Dependencies
Additional context
Estimates
For Maintainers Only or Hero Triaging this bug
Suggested Priority (P1,P2,P3,P4,P5):
Suggested T-Shirt size (S, M, L, XL, Unknown):