Authentication Parameters

The Victoriametrics provider requires the following authentication parameters:

  • VMAlertHost: The hostname or IP address where VMAlert is running. Example: localhost, 192.168.1.100, or vmalert.mydomain.com.
  • VMAlertPort: The port number on which VMAlert is listening. Example: 8880 (if VMAlert is set to listen on port 8880).

Connecting with the Provider

  1. Ensure you have a running instance of VMAlert accessible by the host and port specified.
  2. Include the host and port information in your Victoriametrics provider configuration when initializing the provider.

Querying Victoriametrics

The Victoriametrics provider allows you to query from Victoriametrics through query and query_range types. The following are the parameters available for querying:

  1. query type:

    • query: The query to execute on Victoriametrics. Example: sum(rate(http_requests_total{job="api-server"}[5m])).
    • start: The time to query the data for. Example: 2024-01-01T00:00:00Z
  2. query_range type:

    • query: The query to execute on Victoriametrics. Example: sum(rate(http_requests_total{job="api-server"}[5m])).
    • start: The start time to query the data for. Example: 2024-01-01T00:00:00Z
    • end: The end time to query the data for. Example: 2024-01-01T00:00:00Z
    • step: The step size to use for the query. Example: 15s

Push alerts to keep using webhooks

You can push alerts to keep without connecting to Victoriametrics This provider takes advantage of configurable webhooks available with Prometheus Alertmanager. Use the following template to configure AlertManager:

route:
  receiver: "keep"
  group_by: ['alertname']
  group_wait:      15s
  group_interval:  15s
  repeat_interval: 1m
  continue: true

receivers:
- name: "keep"
  webhook_configs:
  - url: '{keep_webhook_api_url}'
    send_resolved: true
    http_config:
      basic_auth:
        username: api_key
        password: {api_key}