VictoriaMetrics Alert - executes a list of given MetricsQL expressions (rules) and sends alerts to Alert Manager.
Prerequisites #
Before installing this chart, ensure your environment meets the following requirements:
- Kubernetes cluster - A running Kubernetes cluster with sufficient resources
- Helm - Helm package manager installed and configured
Additional requirements depend on your configuration:
- Persistent storage - Required if you enable persistent volumes for data retention (enabled by default)
- kubectl - Needed for cluster management and troubleshooting
For installation instructions, refer to the official documentation:
How to install #
Access a Kubernetes cluster.
Setup chart repository (can be omitted for OCI repositories) #
Add a chart helm repository with follow commands:
helm repo add vm https://victoriametrics.github.io/helm-charts/
helm repo update
List versions of vm/victoria-metrics-alert chart available to installation:
helm search repo vm/victoria-metrics-alert -l
Install victoria-metrics-alert chart
#
Export default values of victoria-metrics-alert chart to file values.yaml:
For HTTPS repository
helm show values vm/victoria-metrics-alert > values.yamlFor OCI repository
helm show values oci://ghcr.io/victoriametrics/helm-charts/victoria-metrics-alert > values.yaml
Change the values according to the need of the environment in values.yaml file.
Consider setting .Values.nameOverride to a small value like vma to avoid hitting resource name limits of 63 characters
Test the installation with command:
For HTTPS repository
helm install vma vm/victoria-metrics-alert -f values.yaml -n NAMESPACE --debugFor OCI repository
helm install vma oci://ghcr.io/victoriametrics/helm-charts/victoria-metrics-alert -f values.yaml -n NAMESPACE --debug
Install chart with command:
For HTTPS repository
helm install vma vm/victoria-metrics-alert -f values.yaml -n NAMESPACEFor OCI repository
helm install vma oci://ghcr.io/victoriametrics/helm-charts/victoria-metrics-alert -f values.yaml -n NAMESPACE
Get the pods lists by running this commands:
kubectl get pods -A | grep 'vma'
Get the application by running this command:
helm list -f vma -n NAMESPACE
See the history of versions of vma application with command.
helm history vma -n NAMESPACE
HA configuration for Alertmanager #
There is no option on this chart to set up Alertmanager with HA mode . To enable the HA configuration, you can use:
How to uninstall #
Remove application with command.
helm uninstall vma -n NAMESPACE
Documentation of Helm Chart #
Install helm-docs following the instructions on this
tutorial
.
Generate docs with helm-docs command.
cd charts/victoria-metrics-alert
helm-docs
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.
Change the values according to the need of the environment in victoria-metrics-alert/values.yaml file.
| Key | Description |
|---|---|
| (string)External URL, that alertmanager will expose to receivers |
| (string)External URL Prefix, Prefix for the internal routes of web endpoints |
| (object)Cluster configuration for alertmanager |
| (string)Cluster gossip interval |
| (string)Cluster listen address |
| (string)Cluster peer timeout |
| (string)Cluster push/pull interval |
| (string)Cluster settle timeout |
| (object)Alertmanager configuration |
| (string)Use existing configmap if specified otherwise .config values will be used |
| (object)K8s Deployment specific variables |
| (object)Empty dir configuration if persistence is disabled for Alertmanager |
| (bool)Create alertmanager resources |
| (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 alertmanager |
| (list)Additional hostPath mounts |
| (list)Extra Volume Mounts for the container |
| (list)Extra Volumes for the pod |
| (string)Override Alertmanager resources fullname |
| (object)Alertmanager image configuration |
| (list)Image pull secrets |
| (object)Ingress annotations |
| (bool)Enable deployment of ingress for alertmanager component |
| (object)Ingress extra labels |
| (list)Array of host objects |
| (string)Ingress controller class name |
| (string)Ingress path type |
| (list)Array of TLS objects |
| (list)Additional initContainers to initialize the pod |
| (string)Alertmanager listen address |
| (string)Alertmanager mode: deployment, statefulSet |
| (object)Pod’s node selector. Details are here |
| (list)Array of access modes. Must match those of existing PV or dynamic provisioner. Details are here |
| (object)Persistent volume annotations |
| (bool)Create/use Persistent Volume Claim for alertmanager component. Empty dir if false |
| (string)Existing Claim name. If defined, PVC must be created manually before volume will be bound |
| (object)PVC extra labels |
| (string)Mount path. Alertmanager data Persistent Volume mount root path. |
| (string)Override Persistent Volume Claim name |
| (string)Size of the volume. Better to set the same as resource limit memory property. |
| (string)StorageClass to use for persistent volume. Requires alertmanager.persistentVolume.enabled: true. If defined, PVC created automatically |
| (string)Mount subpath |
| (object)Alertmanager Pod annotations |
| (object)Alertmanager Pod labels |
| (object)Pod’s security context. Details are here |
| (string)Name of Priority Class |
| (object)Liveness probe |
| (object)Readiness probe |
| (object)Startup probe |
| (int)Replica count |
| (object)Resource object. Details are here |
| (string)Alertmanager retention |
| (object)Security context to be added to server pods |
| (object)Service annotations |
| (string)Service ClusterIP |
| (list)Service external IPs. Check here for details |
| (string)Service external traffic policy. Check here for details |
| (string)Health check node port for a service. Check here for details |
| (list)List of service IP families. Check here for details. |
| (string)Service IP family policy. Check here for details. |
| (object)Service labels |
| (string)Service load balancer IP |
| (list)Load balancer source range |
| (int)Service port |
| (string)Service type |
| (object)K8s StatefulSet specific variables |
| (string)Deploy order policy for StatefulSet pods |
| (object)StatefulSet update strategy. Check here for details. |
| (object)Alertmanager extra templates |
| (list)Node tolerations for server scheduling to nodes with taints. Details are here |
| (list)Pod topologySpreadConstraints |
| (object)Alertmanager web configuration |
| (list)Add extra specs dynamically to this chart |
| (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 |
| (object)Enterprise license key configuration for VictoriaMetrics enterprise. Required only for VictoriaMetrics enterprise. Check docs here, for more information, visit site. Request a trial license here Supported starting from VictoriaMetrics v1.94.0 |
| (string)License key |
| (object)Use existing secret with license key |
| (string)Key in secret with license key |
| (string)Existing secret name |
| (string)Override chart name |
| (object)Pod affinity |
| (object)Annotations to be added to the deployment |
| (object)VMAlert configuration |
| (string)VMAlert alert rules configuration. Use existing configmap if specified |
| (object)VMAlert reads metrics from source, next section represents its configuration. It can be any service which supports MetricsQL or PromQL. |
| (object)Basic auth for datasource |
| (string)Token with Bearer token. You can use one of token or tokenFile. You don’t need to add “Bearer” prefix string |
| (string)Token Auth file with Bearer token. You can use one of token or tokenFile |
| (list)Additional environment variables (ex.: secret tokens, flags). Check here for details. |
| (list)Specify alternative source for env variables |
| (object)Extra command line arguments for container of component |
| (list)Additional containers to run in the same pod |
| (list)Additional hostPath mounts |
| (list)Extra Volume Mounts for the container. Expects a lice of volume mounts |
| (list)Extra Volumes for the pod |
| (string)Override vmalert resources fullname |
| (object)VMAlert image configuration |
| (list)Image pull secrets |
| (object)Ingress annotations |
| (bool)Enable deployment of ingress for vmalert component |
| (object)Ingress extra labels |
| (list)Array of host objects |
| (string)Ingress controller class name |
| (string)Ingress path type |
| (list)Array of TLS objects |
| (list)Additional initContainers to initialize the pod |
| (object)Labels to be added to the deployment |
| (int)Specifies the minimum number of seconds for which a newly created Pod should be ready without any of its containers crashing/terminating 0 is the standard k8s default |
| (string)Override default |
| (object)Pod’s node selector. Details are here |
| (object)Notifier to use for alerts. Multiple notifiers can be enabled by using |
| (object)Basic auth for alertmanager |
| (string)Token with Bearer token. You can use one of token or tokenFile. You don’t need to add “Bearer” prefix string |
| (string)Token Auth file with Bearer token. You can use one of token or tokenFile |
| (list)Additional notifiers to use for alerts |
| (object)Annotations to be added to pod |
| (object)See |
| (object)Pod’s additional labels |
| (object)Pod’s security context. Details are here |
| (string)Name of Priority Class |
| (object)Liveness probe |
| (object)Readiness probe |
| (object)Startup probe |
| (object)Basic auth for remote read |
| (object)Auth based on Bearer token for remote read |
| (string)Token with Bearer token. You can use one of token or tokenFile. You don’t need to add “Bearer” prefix string |
| (string)Token Auth file with Bearer token. You can use one of token or tokenFile |
| (string)VMAlert remote read URL |
| (object)Basic auth for remote write |
| (object)Auth based on Bearer token for remote write |
| (string)Token with Bearer token. You can use one of token or tokenFile. You don’t need to add “Bearer” prefix string |
| (string)Token Auth file with Bearer token. You can use one of token or tokenFile |
| (string)VMAlert remote write URL |
| (int)Replica count |
| (object)Resource object. Details are here |
| (object)Security context to be added to server pods |
| (object)Service annotations |
| (string)Service ClusterIP |
| (list)Service external IPs. Check here for details |
| (string)Service external traffic policy. Check here for details |
| (string)Health check node port for a service. Check here for details |
| (list)List of service IP families. Check here for details. |
| (string)Service IP family policy. Check here for details. |
| (object)Service labels |
| (string)Service load balancer IP |
| (list)Load balancer source range |
| (int)Service port |
| (string)Service type |
| (object)Deployment strategy, set to standard k8s default |
| (list)Node tolerations for server scheduling to nodes with taints. Details are here |
| (list)Pod topologySpreadConstraints |
| (object)Vertical Pod Autoscaler |
| (bool)Use VPA for vmalert |
| (object)Annotations to add to the service account |
| (bool)Mount API token to pod directly |
| (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 |
| (object)Service Monitor annotations |
| (object)Basic auth params for Service Monitor |
| (bool)Enable deployment of Service Monitor for server component. This is Prometheus operator object |
| (object)Service Monitor labels |
| (list)Service Monitor metricRelabelings |
| (list)Service Monitor relabelings |