Time-series Monitoring¶
Monitor components can query metrics from several time-series databases into uniform Pandas DataFrames.
It support two types of metric queries, the first is instant
metric,
returning the value in precise moment in time. The second is the range
metric, giving you the series of values for given time range and step.
The Monitor supports several major time-series databases to get the results in normalised way. The endpoints are queried thru HTTP API calls.
Graphite Time-series Database¶
Example configuration for the Graphite server.
monitor:
graphite-inventory:
auth_url: http://{{ graphite-api }}:8000
Example query to the Graphite server.
averageSeries(server.web*.load)
The metadata schema for Graphite monitor:
query:
prometheus_test_range_query_long:
metric: hdd_errors
step: 30m
start: "2018-01-25T12:00:00Z"
end: "2018-01-30T12:00:00Z"
prometheus_test_range_query:
metric: hdd_errors
step: 4h
start: "2018-01-25T12:00:00Z"
end: "2018-01-30T12:00:00Z"
prometheus_test_instant_query:
metric: hdd_errors
moment: "2018-01-28T12:00:00Z"
metric:
hdd_errors:
job: carbon
name: HDD errors
InfluxDB Time-series Database¶
Example configuration for the InfluxDB server.
monitor:
influxdb-inventory:
auth_url: http://{{ influxdb-api }}:8086
username: {{ influxdb-username }}
password: {{ influxdb-password }}
database: {{ influxdb-database }}
Example query to the InfluxDb server.
SELECT mean("value") FROM "alertmanager_notifications_total"
Prometheus Server¶
Example configuration for the Prometheus server.
monitor:
prometheus-inventory:
auth_url: http://{{ prometheus-api }}:8000
Example query to the Prometheus server.
alertmanager_notifications_total
The metadata schema for Prometheus monitor:
query:
prometheus_test_range_query_long:
query: hdd_errors
step: 30m
start: "2018-01-25T12:00:00Z"
end: "2018-01-30T12:00:00Z"
prometheus_test_range_query:
query: hdd_errors
step: 4h
start: "2018-01-25T12:00:00Z"
end: "2018-01-30T12:00:00Z"
prometheus_test_instant_query:
query: hdd_errors
moment: "2018-01-28T12:00:00Z"
default_resource: prom_target
relation:
by_job:
relation:
default: prom_job
metric_value:
relation:
default: prom_target
resource:
prom_metric:
client: prometheus/series
icon: fa:cube
name: Metric
resource: Prometheus::Series
workflow:
display_metric:
name: Display chart
model:
target:
type: relationship_to
model: metric_value
target: prom_target
prom_target:
client: prometheus/targets
icon: fa:cube
name: Target
resource: Prometheus::Target
model:
job:
type: relationship_to
model: by_job
target: prom_job
prom_job:
client: prometheus/job
icon: fa:cube
name: Job
resource: Prometheus::Job