VictoriaMetrics/docs/anomaly-detection/components/reader.md
Fred Navruzov 2b404742e2
docs: vmanomaly part 1 (#5558)
* add `AD` section, fix links, release docs and changelog

* - connect sections, refactor structure

* - resolve suggestions
- add FAQ section
- fix dead links

* - fix incorrect render of tables for Writer
- comment out internal readers/writers
- fix page ordering to some extent

* - link licensing requirements from v1.5.0 to main page

---------

Co-authored-by: Artem Navoiev <tenmozes@gmail.com>
2024-01-16 19:09:37 +02:00

8.4 KiB

title weight menu aliases
Reader 2
docs
parent weight
vmanomaly-components 2
/anomaly-detection/components/reader.html

Reader

VictoriaMetrics Anomaly Detection (vmanomaly) primarily uses VmReader to ingest data. This reader focuses on fetching time-series data directly from VictoriaMetrics with the help of powerful MetricsQL expressions for aggregating, filtering and grouping your data, ensuring seamless integration and efficient data handling.

Future updates will introduce additional readers, expanding the range of data sources vmanomaly can work with.

VM reader

Config parameters

Parameter Example Description
class "reader.vm.VmReader" Name of the class needed to enable reading from VictoriaMetrics or Prometheus. VmReader is the default option, if not specified.
queries "ingestion_rate: 'sum(rate(vm_rows_inserted_total[5m])) by (type) > 0'" PromQL/MetricsQL query to select data in format: QUERY_ALIAS: "QUERY". As accepted by "/query_range?query=%s".
datasource_url "http://localhost:8481/" Datasource URL address
tenant_id "0:0" For cluster version only, tenants are identified by accountID or accountID:projectID
sampling_period "1h" Optional. Frequency of the points returned. Will be converted to "/query_range?step=%s" param (in seconds).
query_range_path "api/v1/query_range" Performs PromQL/MetricsQL range query. Default "api/v1/query_range"
health_path "health" Absolute or relative URL address where to check availability of the datasource. Default is "health".
user "USERNAME" BasicAuth username
password "PASSWORD" BasicAuth password
timeout "30s" Timeout for the requests, passed as a string. Defaults to "30s"
verify_tls "false" Allows disabling TLS verification of the remote certificate.
bearer_token "token" Token is passed in the standard format with header: "Authorization: bearer {token}"
extra_filters "[]" List of strings with series selector. See: Prometheus querying API enhancements

Config file example:

reader:
  class: "reader.vm.VmReader"
  datasource_url: "http://localhost:8428/"
  tenant_id: "0:0"
  queries:
    ingestion_rate: 'sum(rate(vm_rows_inserted_total[5m])) by (type) > 0'
  sampling_period: '1m'

Healthcheck metrics

VmReader exposes several healthchecks metrics.