This post talks about adding custom metrics from the sqlmonitormetrics.com site automatically and how this works (and how it doesn’t).
This is part of a series of posts on Redgate Monitor. Click to see the other posts
What is SQL Monitor Metrics?
SQLMonitorMetrics was a site that Redgate built years ago to hold various community submitted metrics that users of Redgate Monitor (formerly SQL Monitor) might care about or be interested in using. Myself, Grant, and a number of other MVPs and SQL Server experts submitted our own metrics in various categories.
At some point an integration was created to make the install of these metrics easy. This post shows how to do this and not to do this below.
How to Auto Install Metrics
The proper way to install metrics is to start in Redgate Monitor. Go to the config screen by clicking the gear in the upper right.
Next, in the Alerts section pick the custom metrics and alerts item. Click this.
This brings up a list of your custom metrics. In the text at the top, it says you can install a metric automatically, but you need to click the link my cursor is highlighted on below.
This brings me to the sqlmonitormetrics site. I’ll click find a metric. I could also click the Custom Metrics at the top.
I’ll select the first one for this post, but you can filter, search, or scroll around to find one.
The page for the custom metric has a button at the top. Please read the page and test the SQL to see what’s returned before you click this, but when you’re ready, click the button.
When I do this, I’m returned to Redgate Monitor, this time on the Create Custom Metric page, with the fields filled in. As with anything, be sure you review and check to be sure this is what you want.
That’s it. When you’re done, click create and your metric and/or alert will be set up.
How Not to Install Metrics
This works, but it’s a pain. If I go directly to https://sqlmonitormetrics.red-gate.com/ and then find a metric, such as the number of active backups and restores, I see this, an inactive button:
Because I didn’t start from Redgate Monitor, I can’t get this automatically.
If I scroll down, I see all the fields (in bold) and the entries. I can copy/paste all of these into the form, but this is a slow way to add metrics.
Don’t do this. Go to Redgate Monitor and start there (as shown above).
Summary
This post shows how to automatically add custom metrics written by others from the sqlmonitormetrics website. This is a good way to add common checks to your system that others use.
If you see something missing, submit it, or ping me and I’ll write it or find someone else to do so.
Redgate Monitor is a world class monitoring solution for your database estate. Download a trial today and see how it can help you manage your estate more efficiently.