--- title: Monitoring weight: 5 menu: docs: parent: "vmanomaly-components" weight: 5 identifier: "vmanomaly-monitoring" tags: - metrics - enterprise aliases: - ./monitoring.html --- There are 2 models to monitor VictoriaMetrics Anomaly Detection behavior - [push](https://docs.victoriametrics.com/victoriametrics/keyconcepts/#push-model) and [pull](https://docs.victoriametrics.com/victoriametrics/keyconcepts/#pull-model). Parameters for each of them should be specified in the config file, `monitoring` section. > There was an enhancement of [self-monitoring](https://docs.victoriametrics.com/anomaly-detection/components/monitoring/#metrics-generated-by-vmanomaly) metrics for consistency across the components ([v.1.17.0](https://docs.victoriametrics.com/anomaly-detection/changelog/#v1170)). Documentation was updated accordingly. Key changes included: - Converting several [self-monitoring](https://docs.victoriametrics.com/anomaly-detection/components/monitoring/#metrics-generated-by-vmanomaly) metrics from `Summary` to `Histogram` to enable quantile calculation. This addresses the limitation of the `prometheus_client`'s [Summary](https://prometheus.github.io/client_python/instrumenting/summary/) implementation, which does not support quantiles. The change ensures metrics are more informative for performance analysis. Affected metrics are: - `vmanomaly_reader_request_duration_seconds` ([VmReader](https://docs.victoriametrics.com/anomaly-detection/components/monitoring/#reader-behaviour-metrics)) - `vmanomaly_reader_response_parsing_seconds` ([VmReader](https://docs.victoriametrics.com/anomaly-detection/components/monitoring/#reader-behaviour-metrics)) - `vmanomaly_writer_request_duration_seconds` ([VmWriter](https://docs.victoriametrics.com/anomaly-detection/components/monitoring/#writer-behaviour-metrics)) - `vmanomaly_writer_request_serialize_seconds` ([VmWriter](https://docs.victoriametrics.com/anomaly-detection/components/monitoring/#writer-behaviour-metrics)) - Adding a `query_key` label to the `vmanomaly_reader_response_parsing_seconds` [metric](https://docs.victoriametrics.com/anomaly-detection/components/monitoring/#reader-behaviour-metrics) to provide finer granularity in tracking the performance of individual queries. This metric has also been switched from `Summary` to `Histogram` to align with the other metrics and support quantile calculations. - Adding `preset` and `scheduler_alias` keys to [VmReader](https://docs.victoriametrics.com/anomaly-detection/components/monitoring/#reader-behaviour-metrics) and [VmWriter](https://docs.victoriametrics.com/anomaly-detection/components/monitoring/#writer-behaviour-metrics) metrics for consistency in multi-[scheduler](https://docs.victoriametrics.com/anomaly-detection/components/scheduler/) setups. - Renaming [Counters](https://prometheus.io/docs/concepts/metric_types/#counter) `vmanomaly_reader_response_count` to `vmanomaly_reader_responses` and `vmanomaly_writer_response_count` to `vmanomaly_writer_responses`. ## Pull Model Config parameters
| Parameter | Default | Description |
|---|---|---|
| `addr` | `"0.0.0.0"` | Server IP Address |
| `port` | `8080` | Port |
| Parameter | Default | Description |
|---|---|---|
| `url` | Link where to push metrics to. Example: `"http://localhost:8480/"` | |
| `tenant_id` | Tenant ID for cluster version. Example: `"0:0"` | |
| `health_path` | `"health"` | {{% deprecated_from "v1.8.0" anomaly %}}. Absolute, to override `/health` path |
| `user` | BasicAuth username | |
| `password` | BasicAuth password | |
| `bearer_token` | `token` | Token is passed in the standard format with header: `Authorization: bearer {token}`{{% available_from "v1.15.9" anomaly %}}. |
| `bearer_token_file` | `path_to_file` | Path to a file, which contains token, that is passed in the standard format with header: `Authorization: bearer {token}`{{% available_from "v1.15.9" anomaly %}}. |
| `verify_tls` | `false` | Verify TLS certificate. If `False`, it will not verify the TLS certificate. If `True`, it will verify the certificate using the system's CA store. If a path to a CA bundle file (like `ca.crt`), it will verify the certificate using the provided CA bundle. |
| `tls_cert_file` | `path/to/cert.crt` | Path to a file with the client certificate, i.e. `client.crt`{{% available_from "v1.16.3" anomaly %}}. |
| `tls_key_file` | `path/to/key.crt` | Path to a file with the client certificate key, i.e. `client.key`{{% available_from "v1.16.3" anomaly %}}. |
| `timeout` | `"5s"` | Stop waiting for a response after a given number of seconds. |
| `push_frequency` | `"15m"` | Frequency for scheduled pushing of metrics, e.g., '30m'. Suggested to be less than the staleness interval `-search.maxStalenessInterval` Set to empty string to disable *scheduled* pushing{{% available_from "v1.18.7" anomaly %}}. |
| `extra_labels` | Section for custom labels specified by user. |
| Metric | Type | Description |
|---|---|---|
| `vmanomaly_start_time_seconds` | Gauge | vmanomaly start time in UNIX time |
| `vmanomaly_version_info` | Gauge | vmanomaly version information, contained in `version` label{{% available_from "v1.17.2" anomaly %}}. |
| `vmanomaly_ui_version_info` | Gauge | vmanomaly UI version information, contained in `version` label{{% available_from "v1.17.2" anomaly %}}. |
| `vmanomaly_available_memory_bytes` | Gauge | Virtual memory size in bytes, available to the process{{% available_from "v1.18.4" anomaly %}}. |
| `vmanomaly_cpu_cores_available` | Gauge | Number of (logical) CPU cores available to the process{{% available_from "v1.18.4" anomaly %}}. |
| `vmanomaly_config_entities` | Gauge | Number of [sub-configs](https://docs.victoriametrics.com/anomaly-detection/scaling-vmanomaly/#sub-configuration) **available** (`{scope="total"}`) and **used** for particular [shard](https://docs.victoriametrics.com/anomaly-detection/scaling-vmanomaly/#horizontal-scalability) (`{scope="shard"}`) {{% available_from "v1.21.0" anomaly %}} |
| `vmanomaly_config_reload_enabled` (was `vmanomaly_hot_reload_enabled` {{% deprecated_from "v1.25.1" anomaly %}}) | Gauge | Whether particular vmanomaly instance is run in [config hot-reload mode](https://docs.victoriametrics.com/anomaly-detection/components/#hot-reload) {{% available_from "v1.25.0" anomaly %}} |
| `vmanomaly_config_reloads_total` (was `vmanomaly_hot_reload_events_total`{{% deprecated_from "v1.25.1" anomaly %}}) | Counter | How many config [hot-reloads](https://docs.victoriametrics.com/anomaly-detection/components/#hot-reload) were made since service started {{% available_from "v1.25.0" anomaly %}} |
| `vmanomaly_config_last_reload_successful` | Gauge | Whether last config [hot-reload](https://docs.victoriametrics.com/anomaly-detection/components/#hot-reload) was successful (1) or not (0) {{% available_from "v1.25.1" anomaly %}} |
| `vmanomaly_config_last_reload_success_timestamp_seconds` | Gauge | Timestamp of the last successful config [hot-reload](https://docs.victoriametrics.com/anomaly-detection/components/#hot-reload) in seconds since epoch {{% available_from "v1.25.1" anomaly %}} |
| Metric | Type | Description | Labelnames |
|---|---|---|---|
| `vmanomaly_reader_request_duration_seconds` | `Histogram` (was `Summary`{{% deprecated_from "v1.17.0" anomaly %}}) | The total time (in seconds) taken by queries to VictoriaMetrics `url` for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. | `url`, `query_key`, `scheduler_alias`, `preset` |
| `vmanomaly_reader_responses` (named `vmanomaly_reader_response_count`{{% deprecated_from "v1.17.0" anomaly %}}) | `Counter` | The count of responses received from VictoriaMetrics `url` for the `query_key` query, categorized by `code`, within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. | `url`, `query_key`, `code`, `scheduler_alias`, `preset` |
| `vmanomaly_reader_received_bytes` | `Counter` | The total number of bytes received in responses for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. | `url`, `query_key`, `scheduler_alias`, `preset` |
| `vmanomaly_reader_response_parsing_seconds` | `Histogram` (was `Summary`{{% deprecated_from "v1.17.0" anomaly %}}) | The total time (in seconds) taken for data parsing at each `step` (json, dataframe) for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. | `step`, `url`, `query_key`, `scheduler_alias`, `preset` |
| `vmanomaly_reader_timeseries_received` | `Counter` | The total number of timeseries received from VictoriaMetrics for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. | `url`, `query_key`, `scheduler_alias`, `preset` |
| `vmanomaly_reader_datapoints_received` | `Counter` | The total number of datapoints received from VictoriaMetrics for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. | `url`, `query_key`, `scheduler_alias`, `preset` |
| Metric | Type | Description | Labelnames |
|---|---|---|---|
| `vmanomaly_model_runs` | `Counter` | How many successful `stage` (`fit`, `infer`, `fit_infer`) runs occurred for models of class `model_alias` based on results from the `query_key` query, within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. | `stage`, `query_key`, `model_alias`, `scheduler_alias`, `preset` |
| `vmanomaly_model_run_duration_seconds` | `Histogram` (was `Summary`{{% deprecated_from "v1.17.0" anomaly %}}) | The total time (in seconds) taken by model invocations during the `stage` (`fit`, `infer`, `fit_infer`), based on the results of the `query_key` query, for models of class `model_alias`, within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. | `stage`, `query_key`, `model_alias`, `scheduler_alias`, `preset` |
| `vmanomaly_model_datapoints_accepted` | `Counter` | The number of datapoints accepted (excluding NaN or Inf values) by models of class `model_alias` from the results of the `query_key` query during the `stage` (`infer`, `fit_infer`), within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. | `stage`, `query_key`, `model_alias`, `scheduler_alias`, `preset` |
| `vmanomaly_model_datapoints_produced` | `Counter` | The number of datapoints generated by models of class `model_alias` during the `stage` (`infer`, `fit_infer`) based on results from the `query_key` query, within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. | `stage`, `query_key`, `model_alias`, `scheduler_alias`, `preset` |
| `vmanomaly_models_active` | `Gauge` | The number of model instances of class `model_alias` currently available for inference for the `query_key` query, within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. | `query_key`, `model_alias`, `scheduler_alias`, `preset` |
| `vmanomaly_model_runs_skipped` | `Counter` | The number of times model runs (of class `model_alias`) were skipped in expected situations (e.g., no data for fitting/inference, or no new data to infer on) during the `stage` (`fit`, `infer`, `fit_infer`), based on results from the `query_key` query, within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. | `stage`, `query_key`, `model_alias`, `scheduler_alias`, `preset` |
| `vmanomaly_model_run_errors` | `Counter` | The number of times model runs (of class `model_alias`) failed due to internal service errors during the `stage` (`fit`, `infer`, `fit_infer`), based on results from the `query_key` query, within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. | `stage`, `query_key`, `model_alias`, `scheduler_alias`, `preset` |
| Metric | Type | Description | Labelnames |
|---|---|---|---|
| `vmanomaly_writer_request_duration_seconds` | `Histogram` (was `Summary`{{% deprecated_from "v1.17.0" anomaly %}}) | The total time (in seconds) taken by write requests to VictoriaMetrics `url` for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. | `url`, `query_key`, `scheduler_alias`, `preset` |
| `vmanomaly_writer_responses` (named `vmanomaly_reader_response_count`{{% deprecated_from "v1.17.0" anomaly %}}) | `Counter` | The count of response codes received from VictoriaMetrics `url` for the `query_key` query, categorized by `code`, within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. | `url`, `code`, `query_key`, `scheduler_alias`, `preset` |
| `vmanomaly_writer_sent_bytes` | `Counter` | The total number of bytes sent to VictoriaMetrics `url` for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. | `url`, `query_key`, `scheduler_alias`, `preset` |
| `vmanomaly_writer_request_serialize_seconds` | `Histogram` (was `Summary`{{% deprecated_from "v1.17.0" anomaly %}}) | The total time (in seconds) taken for serializing data for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. | `url`, `query_key`, `scheduler_alias`, `preset` |
| `vmanomaly_writer_datapoints_sent` | `Counter` | The total number of datapoints sent to VictoriaMetrics for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. | `url`, `query_key`, `scheduler_alias`, `preset` |
| `vmanomaly_writer_timeseries_sent` | `Counter` | The total number of timeseries sent to VictoriaMetrics for the `query_key` query within the specified scheduler `scheduler_alias`, in the `vmanomaly` service running in `preset` mode. | `url`, `query_key`, `scheduler_alias`, `preset` |