2024-01-08 09:31:36 +00:00
---
2024-01-16 15:58:48 +00:00
sort: 5
2024-01-08 09:31:36 +00:00
title: Monitoring
weight: 5
menu:
docs:
parent: "vmanomaly-components"
weight: 5
2024-01-16 15:58:48 +00:00
identifier: "vmanomaly-monitoring"
2024-01-08 09:31:36 +00:00
aliases:
- /anomaly-detection/components/monitoring.html
---
# Monitoring
2024-04-18 00:33:29 +00:00
There are 2 models to monitor VictoriaMetrics Anomaly Detection behavior - [push ](https://docs.victoriametrics.com/keyconcepts/#push-model ) and [pull ](https://docs.victoriametrics.com/keyconcepts/#pull-model ). Parameters for each of them should be specified in the config file, `monitoring` section.
2024-01-08 09:31:36 +00:00
## Pull Model Config parameters
< table >
< thead >
< tr >
< th > Parameter< / th >
< th > Default< / th >
< th > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > < code > addr< / code > < / td >
< td > < code > "0.0.0.0"< / code > < / td >
< td > Server IP Address< / td >
< / tr >
< tr >
< td > < code > port< / code > < / td >
< td > < code > 8080< / code > < / td >
< td > Port< / td >
< / tr >
< / tbody >
< / table >
## Push Config parameters
< table >
< thead >
< tr >
< th > Parameter< / th >
< th > Default< / th >
< th > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > < code > url< / code > < / td >
< td > < / td >
< td > Link where to push metrics to. Example: < code > "http://localhost:8480/"< / code > < / td >
< / tr >
< tr >
< td > < code > tenant_id< / code > < / td >
< td > < / td >
< td > Tenant ID for cluster version. Example: < code > "0:0"< / code > < / td >
< / tr >
< tr >
< td > < code > health_path< / code > < / td >
< td > < code > "health"< / code > < / td >
2024-01-22 22:51:12 +00:00
< td > Deprecated since < a href = "https://docs.victoriametrics.com/anomaly-detection/CHANGELOG.html#v180" > v1.8.0< / a > . Absolute, to override < code > /health< / code > path< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
< td > < code > user< / code > < / td >
< td > < / td >
< td > BasicAuth username< / td >
< / tr >
< tr >
< td > < code > password< / code > < / td >
< td > < / td >
< td > BasicAuth password< / td >
< / tr >
< tr >
< td > < code > timeout< / code > < / td >
< td > < code > "5s"< / code > < / td >
< td > Stop waiting for a response after a given number of seconds.< / td >
< / tr >
< tr >
< td > < code > extra_labels< / code > < / td >
< td > < / td >
< td > Section for custom labels specified by user.< / td >
< / tr >
< / tbody >
< / table >
## Monitoring section config example
``` yaml
monitoring:
pull: # Enable /metrics endpoint.
addr: "0.0.0.0"
port: 8080
push:
url: "http://localhost:8480/"
tenant_id: "0:0" # For cluster version only
user: "USERNAME"
password: "PASSWORD"
timeout: "5s"
extra_labels:
job: "vmanomaly-push"
test: "test-1"
```
## Metrics generated by vmanomaly
< table >
< thead >
< tr >
< th > Metric< / th >
< th > Type< / th >
< th > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > < code > vmanomaly_start_time_seconds< / code > < / td >
< td > Gauge< / td >
< td > vmanomaly start time in UNIX time< / td >
< / tr >
< / tbody >
< / table >
### Models Behaviour Metrics
Label names [description ](#labelnames )
2024-02-16 09:02:41 +00:00
> **Note**: There is a new label key `model_alias` introduced in multi-model support [v1.10.0](/anomaly-detection/changelog/#v1100). This label key adjustment was made to preserve unique label set production during writing produced metrics back to VictoriaMetrics.
2024-01-08 09:31:36 +00:00
< table >
< thead >
< tr >
< th > Metric< / th >
< th > Type< / th >
< th > Description< / th >
< th > Labelnames< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > < code > vmanomaly_model_runs< / code > < / td >
< td > Counter< / td >
< td > How many times models ran (per model)< / td >
2024-04-01 13:41:55 +00:00
< td > < code > stage, query_key, model_alias, scheduler_alias, preset< / code > < / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
< td > < code > vmanomaly_model_run_duration_seconds< / code > < / td >
< td > Summary< / td >
< td > How much time (in seconds) model invocations took< / td >
2024-04-01 13:41:55 +00:00
< td > < code > stage, query_key, model_alias, scheduler_alias, preset< / code > < / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
< td > < code > vmanomaly_model_datapoints_accepted< / code > < / td >
< td > Counter< / td >
< td > How many datapoints did models accept< / td >
2024-04-01 13:41:55 +00:00
< td > < code > stage, query_key, model_alias, scheduler_alias, preset< / code > < / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
< td > < code > vmanomaly_model_datapoints_produced< / code > < / td >
< td > Counter< / td >
< td > How many datapoints were generated by models< / td >
2024-04-01 13:41:55 +00:00
< td > < code > stage, query_key, model_alias, scheduler_alias, preset< / code > < / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
< td > < code > vmanomaly_models_active< / code > < / td >
< td > Gauge< / td >
< td > How many models are currently inferring< / td >
2024-04-01 13:41:55 +00:00
< td > < code > query_key, model_alias, scheduler_alias, preset< / code > < / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
< td > < code > vmanomaly_model_runs_skipped< / code > < / td >
< td > Counter< / td >
< td > How many times a run was skipped (per model)< / td >
2024-04-01 13:41:55 +00:00
< td > < code > stage, query_key, model_alias, scheduler_alias, preset< / code > < / td >
2024-01-08 09:31:36 +00:00
< / tr >
< / tbody >
< / table >
### Writer Behaviour Metrics
Label names [description ](#labelnames )
< table >
< thead >
< tr >
< th > Metric< / th >
< th > Type< / th >
< th > Description< / th >
< th > Labelnames< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > < code > vmanomaly_writer_request_duration_seconds< / code > < / td >
< td > Summary< / td >
< td > How much time (in seconds) did requests to VictoriaMetrics take< / td >
< td > < code > url, query_key< / code > < / td >
< / tr >
< tr >
< td > < code > vmanomaly_writer_response_count< / code > < / td >
< td > Counter< / td >
< td > Response code counts we got from VictoriaMetrics< / td >
< td > < code > url, query_key, code< / code > < / td >
< / tr >
< tr >
< td > < code > vmanomaly_writer_sent_bytes< / code > < / td >
< td > Counter< / td >
< td > How much bytes were sent to VictoriaMetrics< / td >
< td > < code > url, query_key< / code > < / td >
< / tr >
< tr >
< td > < code > vmanomaly_writer_request_serialize_seconds< / code > < / td >
< td > Summary< / td >
< td > How much time (in seconds) did serializing take< / td >
< td > < code > query_key< / code > < / td >
< / tr >
< tr >
< td > < code > vmanomaly_writer_datapoints_sent< / code > < / td >
< td > Counter< / td >
< td > How many datapoints were sent to VictoriaMetrics< / td >
< td > < code > query_key< / code > < / td >
< / tr >
< tr >
< td > < code > vmanomaly_writer_timeseries_sent< / code > < / td >
< td > Counter< / td >
< td > How many timeseries were sent to VictoriaMetrics< / td >
< td > < code > query_key< / code > < / td >
< / tr >
< / tbody >
< / table >
### Reader Behaviour Metrics
Label names [description ](#labelnames )
< table >
< thead >
< tr >
< th > Metric< / th >
< th > Type< / th >
< th > Description< / th >
< th > Labelnames< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > < code > vmanomaly_reader_request_duration_seconds< / code > < / td >
< td > Summary< / td >
< td > How much time (in seconds) did queries to VictoriaMetrics take< / td >
< td > < code > url, query_key< / code > < / td >
< / tr >
< tr >
< td > < code > vmanomaly_reader_response_count< / code > < / td >
< td > Counter< / td >
< td > Response code counts we got from VictoriaMetrics< / td >
< td > < code > url, query_key, code< / code > < / td >
< / tr >
< tr >
< td > < code > vmanomaly_reader_received_bytes< / code > < / td >
< td > Counter< / td >
< td > How much bytes were received in responses< / td >
< td > < code > query_key< / code > < / td >
< / tr >
< tr >
< td > < code > vmanomaly_reader_response_parsing_seconds< / code > < / td >
< td > Summary< / td >
< td > How much time (in seconds) did parsing take for each step< / td >
< td > < code > step< / code > < / td >
< / tr >
< tr >
< td > < code > vmanomaly_reader_timeseries_received< / code > < / td >
< td > Counter< / td >
< td > How many timeseries were received from VictoriaMetrics< / td >
< td > < code > query_key< / code > < / td >
< / tr >
< tr >
< td > < code > vmanomaly_reader_datapoints_received< / code > < / td >
< td > Counter< / td >
< td > How many rows were received from VictoriaMetrics< / td >
< td > < code > query_key< / code > < / td >
< / tr >
< / tbody >
< / table >
### Labelnames
2024-04-01 13:41:55 +00:00
< code > stage</ code > - stage of model - 'fit', 'infer' or 'fit_infer' for models that do it simultaneously, see [model types ](/anomaly-detection/components/models/#model-types ).
2024-01-08 09:31:36 +00:00
< code > query_key</ code > - query alias from [`reader` ](/anomaly-detection/components/reader.html ) config section.
2024-02-16 09:02:41 +00:00
< code > model_alias</ code > - model alias from [`models` ](/anomaly-detection/components/models.html ) config section. **Introduced in [v1.10.0](/anomaly-detection/changelog/#v1100).**
2024-04-01 13:41:55 +00:00
< code > scheduler_alias</ code > - scheduler alias from [`schedulers` ](anomaly-detection/components/scheduler/ ) config section. **Introduced in [v1.11.0](/anomaly-detection/changelog/#v1110).**
< code > preset</ code > - preset alias for forthcoming `preset` section compatibility. **Introduced in [v1.12.0](/anomaly-detection/changelog/#v1120).**
2024-01-08 09:31:36 +00:00
< code > url< / code > - writer or reader url endpoint.
< code > code</ code > - response status code or `connection_error` , `timeout` .
2024-04-01 13:41:55 +00:00
< code > step< / code > - json or dataframe reading step.