![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.12.1](https://img.shields.io/badge/Version-0.12.1-informational?style=flat-square) [![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/victoriametrics)](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-alert) [![Slack](https://img.shields.io/badge/join%20slack-%23victoriametrics-brightgreen.svg)](https://slack.victoriametrics.com/) Victoria Metrics Alert - executes a list of given MetricsQL expressions (rules) and sends alerts to Alert Manager. ## Prerequisites * Install the follow packages: ``git``, ``kubectl``, ``helm``, ``helm-docs``. See this [tutorial](https://docs.victoriametrics.com/helm/requirements/). ## How to install Access a Kubernetes cluster. ### Setup chart repository (can be omitted for OCI repositories) Add a chart helm repository with follow commands: ```console helm repo add vm https://victoriametrics.github.io/helm-charts/ helm repo update ``` List versions of `vm/victoria-metrics-alert` chart available to installation: ```console 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 ```console helm show values vm/victoria-metrics-alert > values.yaml ``` - For OCI repository ```console 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. Test the installation with command: - For HTTPS repository ```console helm install vma vm/victoria-metrics-alert -f values.yaml -n NAMESPACE --debug --dry-run ``` - For OCI repository ```console helm install vma oci://ghcr.io/victoriametrics/helm-charts/victoria-metrics-alert -f values.yaml -n NAMESPACE --debug --dry-run ``` Install chart with command: - For HTTPS repository ```console helm install vma vm/victoria-metrics-alert -f values.yaml -n NAMESPACE ``` - For OCI repository ```console 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: ```console kubectl get pods -A | grep 'vma' ``` Get the application by running this command: ```console helm list -f vma -n NAMESPACE ``` See the history of versions of `vma` application with command. ```console helm history vma -n NAMESPACE ``` ## HA configuration for Alertmanager There is no option on this chart to set up Alertmanager with [HA mode](https://github.com/prometheus/alertmanager#high-availability). To enable the HA configuration, you can use: - [VictoriaMetrics Operator](https://docs.victoriametrics.com/operator/) - official [Alertmanager Helm chart](https://github.com/prometheus-community/helm-charts/tree/main/charts/alertmanager) ## How to uninstall Remove application with command. ```console helm uninstall vma -n NAMESPACE ``` ## Documentation of Helm Chart Install ``helm-docs`` following the instructions on this [tutorial](https://docs.victoriametrics.com/helm/requirements/). Generate docs with ``helm-docs`` command. ```bash 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 | Type | Default | Description |
---|---|---|---|
alertmanager.baseURL | string |
|
External URL, that alertmanager will expose to receivers |
alertmanager.baseURLPrefix | string |
|
External URL Prefix, Prefix for the internal routes of web endpoints |
alertmanager.config | object |
|
Alertmanager configuration |
alertmanager.configMap | string |
|
Use existing configmap if specified otherwise .config values will be used |
alertmanager.emptyDir | object |
|
Empty dir configuration if persistence is disabled for Alertmanager |
alertmanager.enabled | bool |
|
Create alertmanager resources |
alertmanager.envFrom | list |
|
Specify alternative source for env variables |
alertmanager.extraArgs | object |
|
Extra command line arguments for container of component |
alertmanager.extraContainers | list |
|
Extra containers to run in a pod with alertmanager |
alertmanager.extraHostPathMounts | list |
|
Additional hostPath mounts |
alertmanager.extraVolumeMounts | list |
|
Extra Volume Mounts for the container |
alertmanager.extraVolumes | list |
|
Extra Volumes for the pod |
alertmanager.image | object |
|
Alertmanager image configuration |
alertmanager.imagePullSecrets | list |
|
Image pull secrets |
alertmanager.ingress.annotations | object |
|
Ingress annotations |
alertmanager.ingress.enabled | bool |
|
Enable deployment of ingress for alertmanager component |
alertmanager.ingress.extraLabels | object |
|
Ingress extra labels |
alertmanager.ingress.hosts | list |
|
Array of host objects |
alertmanager.ingress.ingressClassName | string |
|
Ingress controller class name |
alertmanager.ingress.pathType | string |
|
Ingress path type |
alertmanager.ingress.tls | list |
|
Array of TLS objects |
alertmanager.initContainers | list |
|
Additional initContainers to initialize the pod |
alertmanager.listenAddress | string |
|
Alertmanager listen address |
alertmanager.nodeSelector | object |
|
Pod’s node selector. Details are here |
alertmanager.persistentVolume.accessModes | list |
|
Array of access modes. Must match those of existing PV or dynamic provisioner. Details are here |
alertmanager.persistentVolume.annotations | object |
|
Persistant volume annotations |
alertmanager.persistentVolume.enabled | bool |
|
Create/use Persistent Volume Claim for alertmanager component. Empty dir if false |
alertmanager.persistentVolume.existingClaim | string |
|
Existing Claim name. If defined, PVC must be created manually before volume will be bound |
alertmanager.persistentVolume.mountPath | string |
|
Mount path. Alertmanager data Persistent Volume mount root path. |
alertmanager.persistentVolume.size | string |
|
Size of the volume. Better to set the same as resource limit memory property. |
alertmanager.persistentVolume.storageClassName | string |
|
StorageClass to use for persistent volume. Requires alertmanager.persistentVolume.enabled: true. If defined, PVC created automatically |
alertmanager.persistentVolume.subPath | string |
|
Mount subpath |
alertmanager.podMetadata | object |
|
Alertmanager Pod metadata |
alertmanager.podSecurityContext | object |
|
Pod’s security context. Details are here |
alertmanager.priorityClassName | string |
|
Name of Priority Class |
alertmanager.probe.liveness | object |
|
Liveness probe |
alertmanager.probe.readiness | object |
|
Readiness probe |
alertmanager.probe.startup | object |
|
Startup probe |
alertmanager.resources | object |
|
Resource object. Details are here |
alertmanager.retention | string |
|
Alertmanager retention |
alertmanager.securityContext | object |
|
Security context to be added to server pods |
alertmanager.service.annotations | object |
|
Service annotations |
alertmanager.service.clusterIP | string |
|
Service ClusterIP |
alertmanager.service.externalIPs | list |
|
Service external IPs. Check here for details |
alertmanager.service.externalTrafficPolicy | string |
|
Service external traffic policy. Check here for details |
alertmanager.service.healthCheckNodePort | string |
|
Health check node port for a service. Check here for details |
alertmanager.service.ipFamilies | list |
|
List of service IP families. Check here for details. |
alertmanager.service.ipFamilyPolicy | string |
|
Service IP family policy. Check here for details. |
alertmanager.service.labels | object |
|
Service labels |
alertmanager.service.loadBalancerIP | string |
|
Service load balacner IP |
alertmanager.service.loadBalancerSourceRanges | list |
|
Load balancer source range |
alertmanager.service.servicePort | int |
|
Service port |
alertmanager.service.type | string |
|
Service type |
alertmanager.templates | object |
|
Alertmanager extra templates |
alertmanager.tolerations | list |
|
Node tolerations for server scheduling to nodes with taints. Details are here |
extraObjects | list |
|
Add extra specs dynamically to this chart |
global.compatibility | object |
|
Openshift security context compatibility configuration |
global.image.registry | string |
|
Image registry, that can be shared across multiple helm charts |
global.imagePullSecrets | list |
|
Image pull secrets, that can be shared across multiple helm charts |
license | 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 |
license.key | string |
|
License key |
license.secret | object |
|
Use existing secret with license key |
license.secret.key | string |
|
Key in secret with license key |
license.secret.name | string |
|
Existing secret name |
rbac.annotations | object |
|
Role/RoleBinding annotations |
rbac.create | bool |
|
Enables Role/RoleBinding creation |
rbac.extraLabels | object |
|
Role/RoleBinding labels |
rbac.namespaced | bool |
|
If true and |
server.affinity | object |
|
Pod affinity |
server.annotations | object |
|
Annotations to be added to the deployment |
server.config | object |
|
VMAlert configuration |
server.configMap | string |
|
VMAlert alert rules configuration configuration. Use existing configmap if specified |
server.datasource | object |
|
VMAlert reads metrics from source, next section represents its configuration. It can be any service which supports MetricsQL or PromQL. |
server.datasource.basicAuth | object |
|
Basic auth for datasource |
server.datasource.bearer.token | string |
|
Token with Bearer token. You can use one of token or tokenFile. You don’t need to add “Bearer” prefix string |
server.datasource.bearer.tokenFile | string |
|
Token Auth file with Bearer token. You can use one of token or tokenFile |
server.enabled | bool |
|
Create vmalert component |
server.env | list |
|
Additional environment variables (ex.: secret tokens, flags). Check here for details. |
server.envFrom | list |
|
Specify alternative source for env variables |
server.extraArgs | object |
|
Extra command line arguments for container of component |
server.extraContainers | list |
|
Additional containers to run in the same pod |
server.extraHostPathMounts | list |
|
Additional hostPath mounts |
server.extraVolumeMounts | list |
|
Extra Volume Mounts for the container |
server.extraVolumes | list |
|
Extra Volumes for the pod |
server.fullnameOverride | string |
|
Full name prefix override |
server.image | object |
|
VMAlert image configuration |
server.imagePullSecrets | list |
|
Image pull secrets |
server.ingress.annotations | object |
|
Ingress annotations |
server.ingress.enabled | bool |
|
Enable deployment of ingress for vmalert component |
server.ingress.extraLabels | object |
|
Ingress extra labels |
server.ingress.hosts | list |
|
Array of host objects |
server.ingress.ingressClassName | string |
|
Ingress controller class name |
server.ingress.pathType | string |
|
Ingress path type |
server.ingress.tls | list |
|
Array of TLS objects |
server.initContainers | list |
|
Additional initContainers to initialize the pod |
server.labels | object |
|
Labels to be added to the deployment |
server.minReadySeconds | 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 |
server.name | string |
|
Override fullname suffix |
server.nameOverride | string |
|
Full name suffix override |
server.nodeSelector | object |
|
Pod’s node selector. Details are here |
server.notifier | object |
|
Notifier to use for alerts. Multiple notifiers can be enabled by using |
server.notifier.alertmanager.basicAuth | object |
|
Basic auth for alertmanager |
server.notifier.alertmanager.bearer.token | string |
|
Token with Bearer token. You can use one of token or tokenFile. You don’t need to add “Bearer” prefix string |
server.notifier.alertmanager.bearer.tokenFile | string |
|
Token Auth file with Bearer token. You can use one of token or tokenFile |
server.notifiers | list |
|
Additional notifiers to use for alerts |
server.podAnnotations | object |
|
Annotations to be added to pod |
server.podDisruptionBudget | object |
|
See |
server.podLabels | object |
|
Pod’s additional labels |
server.podSecurityContext | object |
|
Pod’s security context. Details are here |
server.priorityClassName | string |
|
Name of Priority Class |
server.probe.liveness | object |
|
Liveness probe |
server.probe.readiness | object |
|
Readiness probe |
server.probe.startup | object |
|
Startup probe |
server.remote.read.basicAuth | object |
|
Basic auth for remote read |
server.remote.read.bearer | object |
|
Auth based on Bearer token for remote read |
server.remote.read.bearer.token | string |
|
Token with Bearer token. You can use one of token or tokenFile. You don’t need to add “Bearer” prefix string |
server.remote.read.bearer.tokenFile | string |
|
Token Auth file with Bearer token. You can use one of token or tokenFile |
server.remote.read.url | string |
|
VMAlert remote read URL |
server.remote.write.basicAuth | object |
|
Basic auth for remote write |
server.remote.write.bearer | object |
|
Auth based on Bearer token for remote write |
server.remote.write.bearer.token | string |
|
Token with Bearer token. You can use one of token or tokenFile. You don’t need to add “Bearer” prefix string |
server.remote.write.bearer.tokenFile | string |
|
Token Auth file with Bearer token. You can use one of token or tokenFile |
server.remote.write.url | string |
|
VMAlert remote write URL |
server.replicaCount | int |
|
Replica count |
server.resources | object |
|
Resource object. Details are here |
server.securityContext | object |
|
Security context to be added to server pods |
server.service.annotations | object |
|
Service annotations |
server.service.clusterIP | string |
|
Service ClusterIP |
server.service.externalIPs | list |
|
Service external IPs. Check here for details |
server.service.externalTrafficPolicy | string |
|
Service external traffic policy. Check here for details |
server.service.healthCheckNodePort | string |
|
Health check node port for a service. Check here for details |
server.service.ipFamilies | list |
|
List of service IP families. Check here for details. |
server.service.ipFamilyPolicy | string |
|
Service IP family policy. Check here for details. |
server.service.labels | object |
|
Service labels |
server.service.loadBalancerIP | string |
|
Service load balacner IP |
server.service.loadBalancerSourceRanges | list |
|
Load balancer source range |
server.service.servicePort | int |
|
Service port |
server.service.type | string |
|
Service type |
server.strategy | object |
|
Deployment strategy, set to standard k8s default |
server.tolerations | list |
|
Node tolerations for server scheduling to nodes with taints. Details are here |
server.verticalPodAutoscaler | object |
|
Vertical Pod Autoscaler |
server.verticalPodAutoscaler.enabled | bool |
|
Use VPA for vmalert |
serviceAccount.annotations | object |
|
Annotations to add to the service account |
serviceAccount.automountToken | bool |
|
Mount API token to pod directly |
serviceAccount.create | bool |
|
Specifies whether a service account should be created |
serviceAccount.name | string |
|
The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
serviceMonitor.annotations | object |
|
Service Monitor annotations |
serviceMonitor.basicAuth | object |
|
Basic auth params for Service Monitor |
serviceMonitor.enabled | bool |
|
Enable deployment of Service Monitor for server component. This is Prometheus operator object |
serviceMonitor.extraLabels | object |
|
Service Monitor labels |
serviceMonitor.metricRelabelings | list |
|
Service Monitor metricRelabelings |
serviceMonitor.relabelings | list |
|
Service Monitor relabelings |