Page History
Follow this general procedure to directly query the up.time Uptime Infrastructure Monitor DataStore for retained metrics from one of your Service Monitorsservice 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
.
- First, using your web browser, hover over the link for the service monitor name. You will see an
- Determine the type of the retained metric. Metrics are
...
- 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
...
- .
- Replace with the short name from step 3.
Code Block | ||
---|---|---|
| ||
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:
Code Block | ||
---|---|---|
| ||
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; |