You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

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;

  • No labels