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:
2024-07-24 08:00:31 +00:00
- ./monitoring.html
2024-01-08 09:31:36 +00:00
---
2024-08-14 21:00:57 +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
2024-07-24 08:00:31 +00:00
< table class = "params" >
2024-01-08 09:31:36 +00:00
< thead >
< tr >
< th > Parameter< / th >
< th > Default< / th >
< th > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`addr`
< / td >
< td >
`"0.0.0.0"`
< / td >
2024-01-08 09:31:36 +00:00
< td > Server IP Address< / td >
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`port`
< / td >
< td >
`8080`
< / td >
2024-01-08 09:31:36 +00:00
< td > Port< / td >
< / tr >
< / tbody >
< / table >
## Push Config parameters
2024-07-24 08:00:31 +00:00
< table class = "params" >
2024-01-08 09:31:36 +00:00
< thead >
< tr >
< th > Parameter< / th >
< th > Default< / th >
< th > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`url`
< / td >
2024-01-08 09:31:36 +00:00
< td > < / td >
2024-07-24 08:00:31 +00:00
< td >
Link where to push metrics to. Example: `"http://localhost:8480/"`
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`tenant_id`
< / td >
2024-01-08 09:31:36 +00:00
< td > < / td >
2024-07-24 08:00:31 +00:00
< td >
Tenant ID for cluster version. Example: `"0:0"`
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`health_path`
< / td >
< td >
`"health"`
< / td >
< td >
2024-08-14 21:00:57 +00:00
Deprecated since [v1.8.0 ](https://docs.victoriametrics.com/anomaly-detection/changelog/#v180 ). Absolute, to override `/health` path
2024-07-24 08:00:31 +00:00
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`user`
< / td >
2024-01-08 09:31:36 +00:00
< td > < / td >
< td > BasicAuth username< / td >
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`password`
< / td >
2024-01-08 09:31:36 +00:00
< td > < / td >
< td > BasicAuth password< / td >
< / tr >
2024-07-15 14:05:33 +00:00
< tr >
2024-07-24 08:00:31 +00:00
< td >
`verify_tls`
< / td >
< td >
`False`
< / td >
2024-07-15 14:05:33 +00:00
< td > Allows disabling TLS verification of the remote certificate.< / td >
< / tr >
2024-01-08 09:31:36 +00:00
< tr >
2024-07-24 08:00:31 +00:00
< td >
`timeout`
< / td >
< td >
`"5s"`
< / td >
2024-01-08 09:31:36 +00:00
< td > Stop waiting for a response after a given number of seconds.< / td >
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`extra_labels`
< / td >
2024-01-08 09:31:36 +00:00
< 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"
2024-07-15 14:05:33 +00:00
verify_tls: False
2024-01-08 09:31:36 +00:00
timeout: "5s"
extra_labels:
job: "vmanomaly-push"
test: "test-1"
```
## Metrics generated by vmanomaly
2024-07-24 08:00:31 +00:00
< table class = "params" >
2024-01-08 09:31:36 +00:00
< thead >
< tr >
< th > Metric< / th >
< th > Type< / th >
< th > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`vmanomaly_start_time_seconds`
< / td >
2024-01-08 09:31:36 +00:00
< td > Gauge< / td >
< td > vmanomaly start time in UNIX time< / td >
< / tr >
< / tbody >
< / table >
### Models Behaviour Metrics
Label names [description ](#labelnames )
2024-08-14 21:00:57 +00:00
> **Note**: There is a new label key `model_alias` introduced in multi-model support [v1.10.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1100). This label key adjustment was made to preserve unique label set production during writing produced metrics back to VictoriaMetrics.
2024-02-16 09:02:41 +00:00
2024-07-24 08:00:31 +00:00
< table class = "params" >
2024-01-08 09:31:36 +00:00
< thead >
< tr >
< th > Metric< / th >
< th > Type< / th >
< th > Description< / th >
< th > Labelnames< / th >
< / tr >
< / thead >
< tbody >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`vmanomaly_model_runs`
< / td >
2024-01-08 09:31:36 +00:00
< td > Counter< / td >
< td > How many times models ran (per model)< / td >
2024-07-24 08:00:31 +00:00
< td >
`stage, query_key, model_alias, scheduler_alias, preset`
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`vmanomaly_model_run_duration_seconds`
< / td >
2024-01-08 09:31:36 +00:00
< td > Summary< / td >
< td > How much time (in seconds) model invocations took< / td >
2024-07-24 08:00:31 +00:00
< td >
`stage, query_key, model_alias, scheduler_alias, preset`
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`vmanomaly_model_datapoints_accepted`
< / td >
2024-01-08 09:31:36 +00:00
< td > Counter< / td >
< td > How many datapoints did models accept< / td >
2024-07-24 08:00:31 +00:00
< td >
`stage, query_key, model_alias, scheduler_alias, preset`
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`vmanomaly_model_datapoints_produced`
< / td >
2024-01-08 09:31:36 +00:00
< td > Counter< / td >
< td > How many datapoints were generated by models< / td >
2024-07-24 08:00:31 +00:00
< td >
`stage, query_key, model_alias, scheduler_alias, preset`
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`vmanomaly_models_active`
< / td >
2024-01-08 09:31:36 +00:00
< td > Gauge< / td >
< td > How many models are currently inferring< / td >
2024-07-24 08:00:31 +00:00
< td >
`query_key, model_alias, scheduler_alias, preset`
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`vmanomaly_model_runs_skipped`
< / td >
2024-01-08 09:31:36 +00:00
< td > Counter< / td >
< td > How many times a run was skipped (per model)< / td >
2024-07-24 08:00:31 +00:00
< td >
`stage, query_key, model_alias, scheduler_alias, preset`
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< / tbody >
< / table >
### Writer Behaviour Metrics
Label names [description ](#labelnames )
2024-07-24 08:00:31 +00:00
< table class = "params" >
2024-01-08 09:31:36 +00:00
< thead >
< tr >
< th > Metric< / th >
< th > Type< / th >
< th > Description< / th >
< th > Labelnames< / th >
< / tr >
< / thead >
< tbody >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`vmanomaly_writer_request_duration_seconds`
< / td >
2024-01-08 09:31:36 +00:00
< td > Summary< / td >
< td > How much time (in seconds) did requests to VictoriaMetrics take< / td >
2024-07-24 08:00:31 +00:00
< td >
`url, query_key`
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`vmanomaly_writer_response_count`
< / td >
2024-01-08 09:31:36 +00:00
< td > Counter< / td >
< td > Response code counts we got from VictoriaMetrics< / td >
2024-07-24 08:00:31 +00:00
< td >
`url, query_key, code`
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`vmanomaly_writer_sent_bytes`
< / td >
2024-01-08 09:31:36 +00:00
< td > Counter< / td >
< td > How much bytes were sent to VictoriaMetrics< / td >
2024-07-24 08:00:31 +00:00
< td >
`url, query_key`
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`vmanomaly_writer_request_serialize_seconds`
< / td >
2024-01-08 09:31:36 +00:00
< td > Summary< / td >
< td > How much time (in seconds) did serializing take< / td >
2024-07-24 08:00:31 +00:00
< td >
`query_key`
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`vmanomaly_writer_datapoints_sent`
< / td >
2024-01-08 09:31:36 +00:00
< td > Counter< / td >
< td > How many datapoints were sent to VictoriaMetrics< / td >
2024-07-24 08:00:31 +00:00
< td >
`query_key`
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`vmanomaly_writer_timeseries_sent`
< / td >
2024-01-08 09:31:36 +00:00
< td > Counter< / td >
< td > How many timeseries were sent to VictoriaMetrics< / td >
2024-07-24 08:00:31 +00:00
< td >
`query_key`
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< / tbody >
< / table >
### Reader Behaviour Metrics
Label names [description ](#labelnames )
2024-07-24 08:00:31 +00:00
< table class = "params" >
2024-01-08 09:31:36 +00:00
< thead >
< tr >
< th > Metric< / th >
< th > Type< / th >
< th > Description< / th >
< th > Labelnames< / th >
< / tr >
< / thead >
< tbody >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`vmanomaly_reader_request_duration_seconds`
< / td >
2024-01-08 09:31:36 +00:00
< td > Summary< / td >
< td > How much time (in seconds) did queries to VictoriaMetrics take< / td >
2024-07-24 08:00:31 +00:00
< td >
`url, query_key`
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`vmanomaly_reader_response_count`
< / td >
2024-01-08 09:31:36 +00:00
< td > Counter< / td >
< td > Response code counts we got from VictoriaMetrics< / td >
2024-07-24 08:00:31 +00:00
< td >
`url, query_key, code`
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`vmanomaly_reader_received_bytes`
< / td >
2024-01-08 09:31:36 +00:00
< td > Counter< / td >
< td > How much bytes were received in responses< / td >
2024-07-24 08:00:31 +00:00
< td >
`query_key`
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`vmanomaly_reader_response_parsing_seconds`
< / td >
2024-01-08 09:31:36 +00:00
< td > Summary< / td >
< td > How much time (in seconds) did parsing take for each step< / td >
2024-07-24 08:00:31 +00:00
< td >
`step`
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`vmanomaly_reader_timeseries_received`
< / td >
2024-01-08 09:31:36 +00:00
< td > Counter< / td >
< td > How many timeseries were received from VictoriaMetrics< / td >
2024-07-24 08:00:31 +00:00
< td >
`query_key`
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< tr >
2024-07-24 08:00:31 +00:00
< td >
`vmanomaly_reader_datapoints_received`
< / td >
2024-01-08 09:31:36 +00:00
< td > Counter< / td >
< td > How many rows were received from VictoriaMetrics< / td >
2024-07-24 08:00:31 +00:00
< td >
`query_key`
< / td >
2024-01-08 09:31:36 +00:00
< / tr >
< / tbody >
< / table >
### Labelnames
2024-08-14 21:00:57 +00:00
* `stage` - stage of model - 'fit', 'infer' or 'fit_infer' for models that do it simultaneously, see [model types ](https://docs.victoriametrics.com/anomaly-detection/components/models/#model-types ).
* `query_key` - query alias from [`reader` ](https://docs.victoriametrics.com/anomaly-detection/components/reader/ ) config section.
* `model_alias` - model alias from [`models` ](https://docs.victoriametrics.com/anomaly-detection/components/models/ ) config section. **Introduced in [v1.10.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1100).**
* `scheduler_alias` - scheduler alias from [`schedulers` ](https://docs.victoriametrics.com/anomaly-detection/components/scheduler ) config section. **Introduced in [v1.11.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1110).**
* `preset` - preset alias for forthcoming `preset` section compatibility. **Introduced in [v1.12.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1120).**
2024-07-24 08:00:31 +00:00
* `url` - writer or reader url endpoint.
* `code` - response status code or `connection_error` , `timeout` .
* `step` - json or dataframe reading step.