--- # sort: 4 title: Writer weight: 4 menu: docs: parent: "vmanomaly-components" weight: 4 # sort: 4 aliases: - /anomaly-detection/components/writer.html --- # Writer For exporting data, VictoriaMetrics Anomaly Detection (`vmanomaly`) primarily employs the [VmWriter](#vm-writer), which writes produces anomaly scores (preserving initial labelset and optionally applying additional ones) back to VictoriaMetrics. This writer is tailored for smooth data export within the VictoriaMetrics ecosystem. Future updates will introduce additional export methods, offering users more flexibility in data handling and integration. ## VM writer ### Config parameters
Parameter | Example | Description |
---|---|---|
class |
"writer.vm.VmWriter" |
Name of the class needed to enable writing to VictoriaMetrics or Prometheus. VmWriter is the default option, if not specified. |
datasource_url |
"http://localhost:8481/" |
Datasource URL address |
tenant_id |
"0:0" |
For VictoriaMetrics Cluster version only, tenants are identified by accountID or accountID:projectID. See VictoriaMetrics Cluster multitenancy docs |
metric_format |
__name__: "vmanomaly_$VAR" |
Metrics to save the output (in metric names or labels). Must have __name__ key. Must have a value with $VAR placeholder in it to distinguish between resulting metrics. Supported placeholders:
|
for: "$QUERY_KEY" | ||
run: "test_metric_format" | ||
config: "io_vm_single.yaml" | ||
import_json_path |
"/api/v1/import" |
Optional, to override the default import path |
health_path |
"health" |
Absolute or relative URL address where to check the availability of the datasource. Optional, to override the default "/health" path. |
user |
"USERNAME" |
BasicAuth username |
password |
"PASSWORD" |
BasicAuth password |
timeout |
"5s" |
Timeout for the requests, passed as a string. Defaults to "5s" |
verify_tls |
"false" |
Allows disabling TLS verification of the remote certificate. |
bearer_token |
"token" |
Token is passed in the standard format with the header: "Authorization: bearer {token}" |