New Relic for MS SQL: custom queries with different frequencies

We’re using New Relic’s MS SQL integration to collect metrics about a SQL server instance. As part of that, we plan to run a few custom queries to collect various application-level metrics.

We’d like to run different queries at different intervals. For example - one of them should run every minute, and another should run every 10 minutes.

Is that feasible?

You can have different queries at distinct intervals by treating them as separate integrations. If you’re using the standard integration format you’ll have two (or however many distinct queries you’re running) integration blocks in the file. If you’re using the legacy format you’ll have two definition files.

Below is a link to an example configuration that may not fit your exact use-case, but might get the creative juices flowing. :art:

1 Like

Hi Guys, is there an option to set the interval of such MSSQL Queries to 15 minutes or even longer timeframes such as 1 day ?

Reminder, didn’t get a response for my question. Thanks

Hi @o.eldar! You can set the interval configuration value to whatever suits your integration / query best using either seconds / minutes / hours. You can find more information on this in our documentation here:

Thank you Aditto, I’ve tested this out before with no success it might be related to the new configuration format. I’ll double check my setup as based on your feedback it is supported. Thanks again, regards, Ofir

So I’ve just tested this out. Once updating the integration of MSSQL Custom Query interval to 5m all other checks follow the same interval.

For instance : mssql.instance.memoryTotal now collects data every 5 minutes.

This is not the expected behavior, how should all hosts checks keep their original interval ?
If possible let’s move to private messaging or I’ll open a support case.
Regards, Ofir