Page 1 of 1

How to implement math formulas with thresholds 4 SQL metrics

Posted: Sat May 02, 2020 10:37 am
by dlukinski
Hello Nagios XI team

I am digging deep into the SQL metrics and thresholds. What I find is that most of out of the box SQL metrics are rather useless. The reason is that they should be used in comparison to one another or as a formula with applicable thresholds.

for example:
- page splits/sec should not be more then 20% of the batch requests/sec
- page splits depend on the number of the active users (different "normal" for a different number of users)
- Ratio of Batch requests to Page Lookups should not be much greater than 100

how we can get this done?

Re: How to implement math formulas with thresholds 4 SQL met

Posted: Mon May 04, 2020 3:34 pm
by cdienger
You can use the mssql query wizard to execute custom queries with expressions to get the information you want. For example, your first scenario could use a query like:

Code: Select all

SELECT ((CAST(cntr_value as float)/(SELECT cntr_value FROM sys.dm_os_performance_counters WHERE counter_name = 'Batch Requests/sec'))*100) FROM master.sys.dm_os_performance_counters WHERE counter_name = 'Page Splits/sec'