Victoria Metrics Anomaly Detection - a service that continuously scans Victoria Metrics time series and detects unexpected changes within data patterns in real-time.
Prerequisites #
Install the follow packages:
git
,kubectl
,helm
,helm-docs
. See this tutorial.PV support on underlying infrastructure
Chart Details #
This chart will do the following:
- Rollout victoria metrics anomaly
How to install #
Access a Kubernetes cluster.
Setup chart repository (can be omitted for OCI repositories) #
Add a chart helm repository with follow commands:
|
|
List versions of vm/victoria-metrics-anomaly
chart available to installation:
|
|
Install victoria-metrics-anomaly
chart
#
Export default values of victoria-metrics-anomaly
chart to file values.yaml
:
For HTTPS repository
1 2
helm show values vm/victoria-metrics-anomaly > values.yaml
For OCI repository
1 2
helm show values oci://ghcr.io/victoriametrics/helm-charts/victoria-metrics-anomaly > values.yaml
Change the values according to the need of the environment in values.yaml
file.
Test the installation with command:
For HTTPS repository
1 2
helm install vma vm/victoria-metrics-anomaly -f values.yaml -n NAMESPACE --debug --dry-run
For OCI repository
1 2
helm install vma oci://ghcr.io/victoriametrics/helm-charts/victoria-metrics-anomaly -f values.yaml -n NAMESPACE --debug --dry-run
Install chart with command:
For HTTPS repository
1 2
helm install vma vm/victoria-metrics-anomaly -f values.yaml -n NAMESPACE
For OCI repository
1 2
helm install vma oci://ghcr.io/victoriametrics/helm-charts/victoria-metrics-anomaly -f values.yaml -n NAMESPACE
Get the pods lists by running this commands:
|
|
Get the application by running this command:
|
|
See the history of versions of vma
application with command.
|
|
How to uninstall #
Remove application with command.
|
|
Documentation of Helm Chart #
Install helm-docs
following the instructions on this tutorial.
Generate docs with helm-docs
command.
|
|
The markdown generation is entirely go template driven. The tool parses metadata from charts and generates a number of sub-templates that can be referenced in a template file (by default README.md.gotmpl
). If no template file is provided, the tool has a default internal template that will generate a reasonably formatted README.
Parameters #
The following tables lists the configurable parameters of the chart and their default values.
For more vmanomaly
config parameters see https://docs.victoriametrics.com/anomaly-detection/components
Change the values according to the need of the environment in victoria-metrics-anomaly/values.yaml
file.
Key | Description |
---|---|
| (object) Affinity configurations |
| (object) Annotations to be added to the deployment |
| (object) |
| (object) |
| (string) Whether to use preset configuration. If not empty, preset name should be specified. |
| (object) |
| (string) Name of the class needed to enable reading from VictoriaMetrics or Prometheus. VmReader is the default option, if not specified. |
| (string) Datasource URL address. Required for example |
| (object) Required. PromQL/MetricsQL query to select data in format: QUERY_ALIAS: “QUERY”. As accepted by “/query_range?query=%s”. See here for more details. |
| (string) Frequency of the points returned. Will be converted to |
| (string) For VictoriaMetrics Cluster version only, tenants are identified by accountID or accountID:projectID. See VictoriaMetrics Cluster multitenancy docs |
| (object) |
| (object) |
| (string) Name of the class needed to enable writing to VictoriaMetrics or Prometheus. VmWriter is the default option, if not specified. |
| (string) Datasource URL address. Required for example |
| (string) For VictoriaMetrics Cluster version only, tenants are identified by accountID or accountID:projectID. See VictoriaMetrics Cluster multitenancy docs |
| (object) Annotations to be added to configMap |
| (string) Container working directory |
| (object) Empty dir configuration when persistence is disabled |
| (list) Additional environment variables (ex.: secret tokens, flags) |
| (list) Specify alternative source for env variables |
| (object) Extra command line arguments for container of component |
| (list) Extra containers to run in a pod with anomaly container |
| (list) Additional hostPath mounts |
| (list) Add extra specs dynamically to this chart |
| (list) Extra Volume Mounts for the container |
| (list) Extra Volumes for the pod |
| (string) Override resources fullname |
| (string) K8s cluster domain suffix, uses for building storage pods’ FQDN. Details are here |
| (object) Openshift security context compatibility configuration |
| (string) Image registry, that can be shared across multiple helm charts |
| (list) Image pull secrets, that can be shared across multiple helm charts |
| (string) Pull policy of Docker image |
| (string) Victoria Metrics anomaly Docker registry |
| (string) Victoria Metrics anomaly Docker repository and image name |
| (string) Tag of Docker image |
| (list) Image pull secrets |
| (object) License key configuration for vmanomaly. See docs Required starting from v1.5.0. |
| (string) License key for vmanomaly |
| (object) Use existing secret with license key for vmanomaly |
| (string) Key in secret with license key |
| (string) Existing secret name |
| (string) Override chart name |
| (object) NodeSelector configurations. Details are here |
| (object) Persistence to store models on disk. Available starting from v1.13.0 |
| (list) Array of access modes. Must match those of existing PV or dynamic provisioner. Details are here |
| (object) Persistent volume annotations |
| (bool) Enables dumpling data which is fetched from VictoriaMetrics to persistence disk. This is helpful to reduce memory usage. |
| (bool) Enables dumping models to persistence disk. This is helpful to reduce memory usage. |
| (bool) Create/use Persistent Volume Claim for models dump. |
| (string) Existing Claim name. If defined, PVC must be created manually before volume will be bound |
| (object) Bind Persistent Volume by labels. Must match all labels of targeted PV. |
| (string) Size of the volume. Should be calculated based on the metrics you send and retention policy you set. |
| (string) StorageClass to use for persistent volume. Requires server.persistentVolume.enabled: true. If defined, PVC created automatically |
| (object) Annotations to be added to pod |
| (object) See |
| (object) Labels to be added to pod |
| (object) PodMonitor annotations |
| (bool) Enable PodMonitor |
| (object) PodMonitor labels |
| (object) Pod’s security context. Details are here |
| (int) Number of replicas for sharding. Must be greater than 0. Details are here |
| (object) Resource object. Details are here |
| (object) Check here for details. |
| (object) Annotations to add to the service account |
| (bool) Specifies whether a service account should be created |
| (string) The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| (int) Total number of shards. Must be greater than 0. Details are here |
| (list) Tolerations configurations. Details are here |