OK, color me crazy but this all used to work, and now it doesn't. (well, I fixed it, so not it works)
I've used this template for years without issues.
So, this last few weeks I've been building a new 7.0 server. I get my SQL servers discovered on the new server. Add this template and configure all the macros and a bunch if items come up not supported.
Item: Get Buffer Manager counters
JSON Path was something quite strange: $[?(@.object_name=~'.*:Buffer Manager')]
In 6.0 it was: $[?(@.object_name=='{$MSSQL.INSTANCE}:Buffer Manager')]
So I changed it to: $[?(@.object_name=='*:Buffer Manager')] and it worked.
OK so maybe that was a bug introduced in 7.0
Now the really wierd part.
All the dependent items have counter names without spaces. I checked the source for 6.0 and 5.0 and they are the same.
Item: Buffer cache hit ratio
7.0
JSONPath: $[?(@.counter_name=='CacheHitRatio')].cntr_value.first()
6.0
JSONPath: $[?(@.counter_name=='CacheHitRatio')].cntr_value.first()
5.0
JSONPath: $[?(@.counter_name=='CacheHitRatio')].cntr_value.first()
But the actual counter name is "Buffer cache hit ratio". When I changed the counter names to the one with spaces they all started working.
When I was running 5.0 and 6.0 I KNOW these worked. I built Dashboards that graphed out these values. I never changed anything!
So, am I crazy or not?! I cannot find anywhere that these counter names have changed with a SQL server update. I am running 2016, 2019 and 2020 servers.
I've used this template for years without issues.
So, this last few weeks I've been building a new 7.0 server. I get my SQL servers discovered on the new server. Add this template and configure all the macros and a bunch if items come up not supported.
Item: Get Buffer Manager counters
JSON Path was something quite strange: $[?(@.object_name=~'.*:Buffer Manager')]
In 6.0 it was: $[?(@.object_name=='{$MSSQL.INSTANCE}:Buffer Manager')]
So I changed it to: $[?(@.object_name=='*:Buffer Manager')] and it worked.
OK so maybe that was a bug introduced in 7.0
Now the really wierd part.
All the dependent items have counter names without spaces. I checked the source for 6.0 and 5.0 and they are the same.
Item: Buffer cache hit ratio
7.0
JSONPath: $[?(@.counter_name=='CacheHitRatio')].cntr_value.first()
6.0
JSONPath: $[?(@.counter_name=='CacheHitRatio')].cntr_value.first()
5.0
JSONPath: $[?(@.counter_name=='CacheHitRatio')].cntr_value.first()
But the actual counter name is "Buffer cache hit ratio". When I changed the counter names to the one with spaces they all started working.
When I was running 5.0 and 6.0 I KNOW these worked. I built Dashboards that graphed out these values. I never changed anything!
So, am I crazy or not?! I cannot find anywhere that these counter names have changed with a SQL server update. I am running 2016, 2019 and 2020 servers.
Comment