Tag: MonitorTips

  • Monday Monitor Tips: Changing the Fragmentation Alert

    I had a customer that was concerned about the fragmentation alert for indexes and wanted to know how to change it. This post discusses the change.

    This is part of a series of posts on Redgate Monitor. Click to see the other posts

    Finding Alert Configuration

    The settings for Redgate Monitor are available with the gear icon in the upper right side the menu area. You can see this below.

    2024-07-22 16_52_18-ssc-db-n3_(local) - Server Overview — Mozilla Firefox

    Click this to get a list of settings. The second section below has the alert settings, which you can see here. Click this.

    2024-07-22 16_53_49-Zoomit Zoom Window

    This brings up a long list of alerts that are a part of Redgate Monitor. Scroll down a bit and you will see a fragmented indexes alert.

    2024-07-22 17_11_54-Alert settings _ All Servers — Mozilla Firefox

    If you click this, you may see this, as the alert is disabled. This has not proven to be a very useful alert for most organizations, so it’s off. However, you can click the “customize” radio button.

    2024-07-22 17_12_05-Edit Alert Configuration — Mozilla Firefox

    When you do this, you should then see the alert settings. This is defaulting to all your servers, but you can customize the level of alerting by clicking on the left side to a server or group. I’ll cover that in another post.

    The key things here are that you can exclude read-only databases, as the fragmentation won’t change. Below that, you see there is a medium alert specified at a default of 60%. You can change the low/med/hi with the drop down as well as the percentage in the spinner.

    2024-07-22 17_12_19-Edit Alert Configuration — Mozilla Firefox

    If you want more than one alert, flip the “Use multiple alert threshholds” button and you’ll see three choices. I might suggest you not do this as if you worry about fragmentation, it’s likely only a low or medium alert.

    2024- 08_ 0029

    At the bottom, you can set a minimum index size. Smaller indexes aren’t a problem, so keep this relatively high. You might have to decide if 1000 pages is really high enough.

    Below this, you can set your notifications for this. In general, use the defaults and don’t customize this for an alert. The changes get hidden and people forget. Use the same settings everywhere.

    That’s about it. However, read these thoughts from Jeff Moden before you get too worried about index fragmentation.

    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.

  • Monday Monitor Tips- Enabling Index Tracking in Redgate Monitor

    There is a new index feature in Redgate Monitor, but it’s disabled by default. This post shows how to enable things.

    This is part of a series of posts on Redgate Monitor. Click to see the other posts

    Getting Indexing Information

    If you look on monitor.red-gate.com, inside the details for one of your instances, there is a new Indexing tab. I’ve circled it below.

    2024-07-02 15_00_39-ssc-db-n3_(local) - Server Overview — Mozilla Firefox

    After clicking this, I see the data below for this instance. This shows me a lot of high level information usage on different indexes. The data shows index, then table, then database, but I can search/filter here. I can also sort by the columns, which contain size, updates, seeks, etc. Lots of data.

    2024-07-02 15_03_21-ssc-db-n3_(local) - Server Overview — Mozilla Firefox

    This is disabled by default, as the collection of this data used a lot of memory on the Base Monitor system for some users. Not necessarily something everyone wants, so we left it off.

    You can, however, enable it.

    Enabling Index Data

    There is a doc page for this feature, which I show below. This is a fairly easy procedure, but not everyone knows how to do this, so I’ll explain.

    2024-07-02 15_05_48-Indexes - Redgate Monitor 14 - Product Documentation

    If you look above, in the warning box, it notes how to enable this. From the base monitor, you need to add an environment variable.

    To do this on Windows, the easy thing is search the start menu for “environ”. You should see something like this. Pick the “edit the system environment variables” item at the top.

    2024-07-02 15_08_19-Media Player

    This should bring up the System Properties in Windows (desktop or server). You can also search for environment variables in the Control Panel. Earlier version of Windows let you right click the system and select properties.

    Notice the Environment Variables button at the bottom. We’ll click this.

    2024-07-02 15_08_59-System Properties

    This brings up a dialog that has two sections. We want the bottom, system variables, section. Click the New button at the bottom, below this list of system variables.

    2024-07-02 15_10_42-Environment Variables

    In the dialog, paste this in the variable name: SQLMONITOR_Indexes

    For the value, add “on”. I’m not sure if this is case sensitive, but past in lower case.

    2024-07-02 15_18_52-New System Variable

    Then you need to restart both the base monitor and the web server. This is in the Service Applet, where you can see the Base Monitor and the Web Service.

    Note: depending on versions, you might see this as “SQL Monitor Base Monitor” or “Redgate Monitor Base Monitor”.

    2024-07-02 15_23_01-LiveLabConnection (1) - 3.254.186.109 - Remote Desktop Connection

    Restart both of these services.

    When things come up, you’ll see blanks until some index data can be captured, but be patient and check back in an hour or two.

    Make sure you monitor memory usage on your base monitor machine. If you find yourself running low, you can disable this by setting the system variable to off. Or delete it.

    Or add more RAM. More RAM cures a lot of things.

    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.

  • Monday Monitor Tips – Adding Redgate Monitor Custom Metrics from SQLMonitorMetrics

    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.

    2024-07-02 14_37_58-Global Dashboard — Mozilla Firefox

    Next, in the Alerts section pick the custom metrics and alerts item. Click this.

    2024-07-02 14_38_43-Configuration — Mozilla Firefox

    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.

    2024-07-02 14_39_14-Custom metrics and alerts — Mozilla Firefox

    This brings me to the sqlmonitormetrics site. I’ll click find a metric. I could also click the Custom Metrics at the top.

    2024-07-02 14_40_42-Redgate Monitor Metrics - Custom metrics to use in Redgate Monitor — Mozilla Fir

    I’ll select the first one for this post, but you can filter, search, or scroll around to find one.

    2024-07-02 14_40_51-Custom Metric Archives - Redgate Monitor Metrics — Mozilla Firefox

    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.

    2024-07-02 14_42_59-Detecting Connection Timeouts - Redgate Monitor Metrics — Mozilla Firefox

    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.

    2024-07-02 14_43_49-Custom metrics — Mozilla Firefox

    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:

    2024-07-02 14_45_56-Number of active backups and restores - Redgate Monitor Metrics

    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.

    2024-07-02 14_46_45-Number of active backups and restores - Redgate Monitor 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.