How to access metrics values for snapshots in the database?

There is away to check metrics values for time series in the database via api with curl requests, e. g.,

curl -G -k -u "user:passsword" "https://localhost:9009/api/v1/metrics" --data-urlencode "query=(im.name==log-file-size and device-id=="f72bea52-476b-4ba9-9b33-d5bce7890f8b")" --data-urlencode "start=`date -d -1hour +"%s000"`" | sed "s/tags/\ntags/g"

There are also metrics that are collected as snapshots, e. g. "core-dumps". The is a separate database for them. How could it be accesed to check recorded metric values?

You can use `liveConfig` API to get the latest metrics and the latest live config.

Simply call:

https://localhost:9009/api/v1/liveConfig/<DeviceId>


Please note that it will return an Array with the latest objects for the metric and live configuration.

If you have core-dumps that you want to receive, you will need to set it up as `liveConfig`


You can use `writeComplexMetricObjectArrayWithLiveConfig` to mark a complexMetric (snapshot) as live config:


writeComplexMetricObjectArrayWithLiveConfig(imName, tags, objects, displayName)

Similar to writeComplexMetricObjectArray with the addition of a live config tag and a displayName (see displayName in example for Double Metric live config above)


For more inforamtion on how to use live configuration you can check this page