article How to run a DB query on retained metrics

Follow this general procedure to directly query the up.time DataStore for retained metrics from one of your service monitors.

  • Find the instance ID for your service monitor.  There are two ways to accomplish this.  First, using your web browser, hover over the link for the service monitor name.  You will see an id=X token in the URL that is the instance ID for the monitor.  Alternatively, if the monitor name is unique, you can run a query on the datastore similar to: select id from erdc_instance where name = YOUR MONITOR NAME.
  • Determine the type of the retained metric.  Metrics are either string, int or decimal.  Generally the type for a given metric is clear but it can be definitively determined by reviewing the collected data in a standard graphed output for the retained metric.
  • Determine the short name for your metric.  This is the name of the metric found in the service monitor settings.
  • Build your query.  A generic query is provided below.  To customize your query, use the ID from step 1, replace with the metric type from step 2 and replace with the short name from step 3.

select * from uptime.erdc__data edd, erdc_parameter ep

where edd.erdc_parameter_id = ep.erdc_parameter_id

and ep.short_description = "" and edd.erdc_instance_id = ;

For example, if we wanted to graph the User Connections value from a SQL Server Advanced monitor with an ID of 8, we would use the following query:

select * from uptime.erdc_decimal_data edd, erdc_parameter ep

where edd.erdc_parameter_id = ep.erdc_parameter_id

and ep.short_description = "User connections" and edd.erdc_instance_id = 8;

Related Articles


Creating Custom Service Monitors with Retained Data Collection

RatingViews
article

By: uptime Support | Date Created: 5-15-2006 | Last Modified: 12-16-2011 | Index: 067

  11356

Understanding and Using Retained Data

RatingViews
article

This article explains how to use data that is optionally retained by up.time service monitors.

By: uptime Support | Date Created: 7-19-2007 | Last Modified: 6-28-2011 | Index: 196

  2787

How to Graph Retained Metrics for HTTP Monitor

RatingViews
article

This article explains how to display retained metrics for the HTTP monitor's Text to look for field. The HTTP monitor can be configured to retain the results of the Text to Look for...

By: uptime Support | Date Created: 7-27-2012 | Last Modified: 7-28-2012 | Index: 581

  1443

Using retained service metrics data to generate graphs

RatingViews
article

Yes it is definitely possible to graph and even report on the data that is collected. First, you need to make sure that in the service monitor that you have the Retained Data checkboxes checked,...

By: uptime Support | Date Created: 10-8-2009 | Last Modified: 8-13-2011 | Index: 398

  2320

Query to retrieve MySQL database size

RatingViews
article

If you need to figure out how much data a MySQL database is consuming use the information_schema database and run the following: mysql> use information_schema; mysql> select table_schema,...

By: uptime Support | Date Created: 10-7-2009 | Last Modified: 8-10-2011 | Index: 386

  2738

User Comments



No comments have been posted.

Copyright © 2021 IDERA, Inc.   Legal   Privacy Statement