why is the time difference between metric data not consistent

I am trying to collect the metrics captured by SM. I am using the /Analysis/Graphs/GraphDataMultiple and /Analysis/Graphs/ExportCsv API to get the metrics. I have the 7.0.7.7367 version of SM running on IIS 7.5 and NET 4.6.1. The time difference between the entries is not consistent. It is consistent on SM version 6.0.10.5815 running on IIS 8.5 and NET 4.5.2.

When i say consistent i mean, the difference between the timestamps is not the same, say 15 seconds or 30 seconds.

Is there a configuration that i can change to make this work?
Tagged:

Answers

  • Alex BAlex B Posts: 1,157 Diamond 4
    Hi @abhishek813

    Some of the metrics that are collected have the same interval but others are collected at various different intervals ranging from 15s to the fragmented index which happens once a week depending on the resource intensity of the collection and the stability of the metric. Most are around 15s but some are 1 or 5 minutes or more.

    You can see what the defaults for the different collections are by using the included Configuration File editor.

    First, locate the configuration file on the machine where the SQL Monitor Base Monitor service is hosted. Location: C:\ProgramData\Red Gate\SQL Monitor
    File Name: RedGate.Response.Engine.Alerting.Base.Service.exe.settings.config

    Make a copy of this file and name it something useful like RedGate.Response.Engine.Alerting.Base.Service.exe.settings.config_backup
    This will act as a backup of the configuration file so that your changes can be reversed.

    Next, run the SQL Monitor Configuration Editor as an administrator (right click > Run As):
    C:\Program Files\Red Gate\SQL Monitor\BaseMonitor\Tools\ConfigurationFileEditor.exe

    You will be prompted to "Load a configuration file". Find the .config file detailed in step 1.

    You will be presented with a list of all the configuration options available. These relate to each item in the polling schedule. Any check box which is un-checked automatically uses the default - to check what the default is you can check the box, but not make any changes and the value shown will be the default value.

    If you make any changes, once complete, click "Save Changes" and restart the SQL Monitor Base Monitor service. If you have any unexpected results then please delete your edited configuration file and rename the copy (then also restart the service). If you are not making changes, just close without saving.

    I hope that helps clarify things and how to check the default values!

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
  • abhishek813abhishek813 Posts: 4 New member
    Hey Alex, Thanks for your response. It was really helpful. I have some additional question. I am looking at the SQL Server Processor Time metrics, in the config file i believe the "[Cluster].[SqlServer].[Process] - SQL Server Windows service statistics" is the correct config for this metrics. In my config file it is set to an interval of 1 minute. However when i look at the metric data either in the response json or the data in the exported csv the data is not 1 minute apart. For example below are some entries from the export csv for this metrics.

    3cdi3l8sl63f.png

    As you can see the entries are not at a fixed interval apart. This is what i was talking about. How do i make sure that these entries are at a fixed interval apart.

    -Abhishek
  • Alex BAlex B Posts: 1,157 Diamond 4
    Hi @abhishek813

    I do think the SQL Server Processor Time metrics relates to "[Cluster].[SqlServer].[Process] - SQL Server Windows service statistics" however the image you have shown there is the export from Machine:Processor time for a machine called "SQL Server".

    Regardless of that - I think part of the issue you are seeing with the export values could be related to the graph only showing 500 data points - so there is aggregation of values when you zoom out to a certain point (i.e. samples every 15 seconds fill 500 data points in 2 hours and 5 minutes) - do you have it set to something like 1 hr or more than this? If you try to set it to 1hr or 15 minutes do you see the timings correctly?

    Though having said that, it looks like of the intervals are 7 seconds and some are 20+ another thing to consider is if there are any collection errors or delays in actually sampling the values; the schedule may be to try it every 1 minute (or 15 seconds) but the actual collection could take longer than expected and cause the time to vary.

    Kind regards,
    Alex
    Product Support Engineer | Redgate Software

    Have you visited our Help Center?
Sign In or Register to comment.