Skip to content

Add missing sqlserver attributes host,instance,deployment type, datab…#16

Open
aayush-asawa wants to merge 1 commit intonetsil:epoch/5.23.0from
aayush-asawa:epoch/5.23.0
Open

Add missing sqlserver attributes host,instance,deployment type, datab…#16
aayush-asawa wants to merge 1 commit intonetsil:epoch/5.23.0from
aayush-asawa:epoch/5.23.0

Conversation

@aayush-asawa
Copy link

@aayush-asawa aayush-asawa commented May 21, 2020

No description provided.

- 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;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

cc @nutanixkeshavgarg

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes let's keep only file, use sqlserver.yaml.template

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants