VictoriaMetrics/docs/helm/victoria-metrics-alert
Github Actions af9638c480
Automatic update helm docs from VictoriaMetrics/helm-charts@1d4f6d6 (#7473)
Automated changes by
[create-pull-request](https://github.com/peter-evans/create-pull-request)
GitHub action

Signed-off-by: Github Actions <133988544+victoriametrics-bot@users.noreply.github.com>
Co-authored-by: AndrewChubatiuk <3162380+AndrewChubatiuk@users.noreply.github.com>
2024-11-07 14:24:36 +01:00
..
_changelog.md Automatic update helm docs from VictoriaMetrics/helm-charts@f0e007f (#7059) 2024-09-20 16:11:23 +02:00
_index.md Automatic update helm docs from VictoriaMetrics/helm-charts@f0e007f (#7059) 2024-09-20 16:11:23 +02:00
CHANGELOG.md Automatic update helm docs from VictoriaMetrics/helm-charts@1d4f6d6 (#7473) 2024-11-07 14:24:36 +01:00
README.md Automatic update helm docs from VictoriaMetrics/helm-charts@1d4f6d6 (#7473) 2024-11-07 14:24:36 +01:00

Type: application Version: 0.12.4 Artifact Hub Slack

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.

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.yaml
    
  • For 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.

Test the installation with command:

  • For HTTPS repository

    helm install vma vm/victoria-metrics-alert -f values.yaml -n NAMESPACE --debug --dry-run
    
  • For OCI repository

    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

    helm install vma vm/victoria-metrics-alert -f values.yaml -n NAMESPACE
    
  • For 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 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
global:
    resolve_timeout: 5m
receivers:
    - name: devnull
route:
    group_by:
        - alertname
    group_interval: 10s
    group_wait: 30s
    receiver: devnull
    repeat_interval: 24h

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
false

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
registry: ""
repository: prom/alertmanager
tag: v0.25.0

Alertmanager image configuration

alertmanager.imagePullSecrets list
[]

Image pull secrets

alertmanager.ingress.annotations object
{}

Ingress annotations

alertmanager.ingress.enabled bool
false

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
Prefix

Ingress path type

alertmanager.ingress.tls list
[]

Array of TLS objects

alertmanager.initContainers list
[]

Additional initContainers to initialize the pod

alertmanager.listenAddress string
0.0.0.0:9093

Alertmanager listen address

alertmanager.nodeSelector object
{}

Pods node selector. Details are here

alertmanager.persistentVolume.accessModes list
- ReadWriteOnce

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
false

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
/data

Mount path. Alertmanager data Persistent Volume mount root path.

alertmanager.persistentVolume.size string
50Mi

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.podAnnotations object
{}

Alertmanager Pod annotations

alertmanager.podLabels object
{}

Alertmanager Pod labels

alertmanager.podSecurityContext object
enabled: false

Pods security context. Details are here

alertmanager.priorityClassName string
""

Name of Priority Class

alertmanager.probe.liveness object
httpGet:
    path: '{{ ternary "" .baseURLPrefix (empty .baseURLPrefix) }}/-/healthy'
    port: web

Liveness probe

alertmanager.probe.readiness object
httpGet:
    path: '{{ ternary "" .baseURLPrefix (empty .baseURLPrefix) }}/-/ready'
    port: web

Readiness probe

alertmanager.probe.startup object
httpGet:
    path: '{{ ternary "" .baseURLPrefix (empty .baseURLPrefix) }}/-/ready'
    port: web

Startup probe

alertmanager.resources object
{}

Resource object. Details are here

alertmanager.retention string
120h

Alertmanager retention

alertmanager.securityContext object
enabled: false

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
8880

Service port

alertmanager.service.type string
ClusterIP

Service type

alertmanager.templates object
{}

Alertmanager extra templates

alertmanager.tolerations list
[]

Node tolerations for server scheduling to nodes with taints. Details are here

alertmanager.webConfig object
{}

Alertmanager web configuration

extraObjects list
[]

Add extra specs dynamically to this chart

global.cluster.dnsDomain string
cluster.local.

K8s cluster domain suffix, uses for building storage pods FQDN. Details are here

global.compatibility object
openshift:
    adaptSecurityContext: auto

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
key: ""
secret:
    key: ""
    name: ""

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
key: ""
name: ""

Use existing secret with license key

license.secret.key string
""

Key in secret with license key

license.secret.name string
""

Existing secret name

server.affinity object
{}

Pod affinity

server.annotations object
{}

Annotations to be added to the deployment

server.config object
alerts:
    groups: []

VMAlert configuration

server.configMap string
""

VMAlert alert rules configuration configuration. Use existing configmap if specified

server.datasource object
basicAuth:
    password: ""
    username: ""
bearer:
    token: ""
    tokenFile: ""
url: ""

VMAlert reads metrics from source, next section represents its configuration. It can be any service which supports MetricsQL or PromQL.

server.datasource.basicAuth object
password: ""
username: ""

Basic auth for datasource

server.datasource.bearer.token string
""

Token with Bearer token. You can use one of token or tokenFile. You dont 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
true

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
envflag.enable: "true"
envflag.prefix: VM_
loggerFormat: json

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
pullPolicy: IfNotPresent
registry: ""
repository: victoriametrics/vmalert
tag: ""
variant: ""

VMAlert image configuration

server.imagePullSecrets list
[]

Image pull secrets

server.ingress.annotations object
{}

Ingress annotations

server.ingress.enabled bool
false

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
Prefix

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
0

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
{}

Pods node selector. Details are here

server.notifier object
alertmanager:
    basicAuth:
        password: ""
        username: ""
    bearer:
        token: ""
        tokenFile: ""
    url: ""

Notifier to use for alerts. Multiple notifiers can be enabled by using notifiers section

server.notifier.alertmanager.basicAuth object
password: ""
username: ""

Basic auth for alertmanager

server.notifier.alertmanager.bearer.token string
""

Token with Bearer token. You can use one of token or tokenFile. You dont 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
enabled: false
labels: {}

See kubectl explain poddisruptionbudget.spec for more. Or check docs

server.podLabels object
{}

Pods additional labels

server.podSecurityContext object
enabled: true

Pods security context. Details are here

server.priorityClassName string
""

Name of Priority Class

server.probe.liveness object
failureThreshold: 3
initialDelaySeconds: 5
periodSeconds: 15
tcpSocket: {}
timeoutSeconds: 5

Liveness probe

server.probe.readiness object
failureThreshold: 3
httpGet: {}
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 5

Readiness probe

server.probe.startup object
{}

Startup probe

server.remote.read.basicAuth object
password: ""
username: ""

Basic auth for remote read

server.remote.read.bearer object
token: ""
tokenFile: ""

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 dont 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
password: ""
username: ""

Basic auth for remote write

server.remote.write.bearer object
token: ""
tokenFile: ""

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 dont 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
1

Replica count

server.resources object
{}

Resource object. Details are here

server.securityContext object
enabled: true

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
8880

Service port

server.service.type string
ClusterIP

Service type

server.strategy object
rollingUpdate:
    maxSurge: 25%
    maxUnavailable: 25%
type: RollingUpdate

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
enabled: false

Vertical Pod Autoscaler

server.verticalPodAutoscaler.enabled bool
false

Use VPA for vmalert

serviceAccount.annotations object
{}

Annotations to add to the service account

serviceAccount.automountToken bool
true

Mount API token to pod directly

serviceAccount.create bool
true

Specifies whether a service account should be created

serviceAccount.name string
null

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
false

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