Add missing sqlserver attributes host,instance,deployment type, datab…#16
Add missing sqlserver attributes host,instance,deployment type, datab…#16aayush-asawa wants to merge 1 commit intonetsil:epoch/5.23.0from
Conversation
| - version | ||
| - name: sqlserver.server | ||
| sql_query: SELECT DISTINCT (CASE WHEN CHARINDEX('\',@@servername) >0 THEN LEFT(@@servername, CHARINDEX('\', @@servername)-1) else @@servername end) + ' ' + (CASE WHEN CHARINDEX('\',@@servername) >0 THEN SUBSTRING(@@servername, CHARINDEX('\', @@servername)+1, len(@@servername)) else @@servicename end) AS resource_name -- Datadog; | ||
| sql_query: DECLARE @server_name varchar(max) = (CASE WHEN CHARINDEX('\',@@servername) >0 THEN LEFT(@@servername, CHARINDEX('\', @@servername)-1) else @@servername end);DECLARE @service_name varchar(max) = (CASE WHEN CHARINDEX('\',@@servername) >0 THEN SUBSTRING(@@servername, CHARINDEX('\', @@servername)+1, len(@@servername)) else @@servicename end);SELECT @server_name + ' ' + @service_name as resource_name, @server_name as host_name, @service_name as instance_name -- Datadog; |
There was a problem hiding this comment.
Any change in this file akso needs to be updated in https://github.com/netsil/AOC/blob/master/tools/collectors/aiops/dpm-agent/sqlserver/sqlserver.yaml.template. this is the file used during endpoint configuration
There was a problem hiding this comment.
yes, we need to update this file https://github.com/netsil/AOC/blob/master/tools/collectors/aiops/dpm-agent/sqlserver/sqlserver.yaml.template also because this is the one getting configured.
@ahalam do we need still need to maintain two file with same content at two different location. what do you suggest ? should we remove the one in integration.
There was a problem hiding this comment.
We should obviously have the file in only one location. It was more logical for me that DPM agent keeps the template because it needs to write out the config
There was a problem hiding this comment.
Yes let's keep only file, use sqlserver.yaml.template
There was a problem hiding this comment.
@aayush-asawa we can remove this file in integrations-core and directly updated this one https://github.com/netsil/AOC/blob/master/tools/collectors/aiops/dpm-agent/sqlserver/sqlserver.yaml.template.
There was a problem hiding this comment.
ok. Added the changes here https://github.com/netsil/AOC/pull/9482/files
@bijeeshpudukku
No description provided.