Skip to content
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

Individual intervals for each custom query or possibility to only send custom metrics #136

Open
LLHogia opened this issue Oct 5, 2023 · 2 comments
Labels
feature request Categorizes issue or PR as related to a new feature or enhancement.

Comments

@LLHogia
Copy link

LLHogia commented Oct 5, 2023

Description

We have a huge amount of data within our SQL Server. Some queries can only be executed on a specific time interval. We cannot let the integration perform the same query each minute all the time. Some queries should only be executed on the below intervals as an example:

  • 60s
  • 120s (2m)
  • 300s (5m)
  • 3600s (1h)

Reason would be that some queries takes a lot of time to execute so we need to be able to specify the interval for each query. Otherwise it's like we're DDoS attacking our own servers with heavy queries.

The only workaround we have right now is to setup different integrations like below:

integrations:
  - name: nri-mssql
    env: 
      HOSTNAME: ST-AG-TEST
      USERNAME: HIDDEN
      PASSWORD: "HIDDEN"
      PORT: 1433
      CUSTOM_METRICS_CONFIG: 'C:\Program Files\New Relic\newrelic-infra\integrations.d\mssql-custom-query-2min.yml'
      ENABLE_BUFFER_METRICS: false
      ENABLE_DATABASE_RESERVE_METRICS: false
      METRICS: false
      INVENTORY: false
    inventory_source: config/mssql
    labels:
      purpose: MssqlCustomQuery
    interval: 120s

  - name: nri-mssql
    env: 
      HOSTNAME: ST-AG-TEST
      USERNAME: HIDDEN
      PASSWORD: "HIDDEN"
      PORT: 1433
      CUSTOM_METRICS_CONFIG: 'C:\Program Files\New Relic\newrelic-infra\integrations.d\mssql-custom-query-5min.yml'
      ENABLE_BUFFER_METRICS: false
      ENABLE_DATABASE_RESERVE_METRICS: false
      METRICS: false
      INVENTORY: false
    inventory_source: config/mssql
    labels:
      purpose: MssqlCustomQuery
    interval: 300s

To avoid duplicate data ingested by New Relic we have also created a drop rule by selecting our label like below:
SELECT * FROM MssqlInstanceSample, MssqlDatabaseSample WHERE label.purpose = 'MssqlCustomQuery'

So we have 3 integrations in total in our example. 1 main integration where we want the data sent to MssqlInstanceSample and MssqlDatabaseSample. The other two are sending duplicate data but we're dropping everything which isn't MssqlCustomQuerySample.

Acceptance Criteria

Possible to set individual interval for each custom query from the file specified within CUSTOM_METRICS_CONFIG.

Describe Alternatives

Another solution would be to have the possibility to disable data sent to MssqlInstanceSample and MssqlDatabaseSample or just have a setting to only enable MssqlCustomQuerySample for the specific integration used for custom queries. This would also help us a lot. We would like to do this on the server side to avoid unnecessary network traffic and unnecessary queries on our SQL Servers.

Dependencies

N/A

Additional context

N/A

Priority

[Nice to Have, Really Want, Must Have, Blocker]

@LLHogia LLHogia added the feature request Categorizes issue or PR as related to a new feature or enhancement. label Oct 5, 2023
@workato-integration
Copy link

@workato-integration
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Categorizes issue or PR as related to a new feature or enhancement.
Projects
None yet
Development

No branches or pull requests

1 participant