Supported Providers
Victoriametrics Provider
The VictoriametricsProvider allows you to fetch alerts in Victoriametrics.
Authentication Parameters
The Victoriametrics provider requires either of the following authentication parameters:
VMAlertHost
: The hostname or IP address where VMAlert is running. Example:localhost
,192.168.1.100
, orvmalert.mydomain.com
.VMAlertPort
: The port number on which VMAlert is listening. Example: 8880 (if VMAlert is set to listen on port 8880).
or
VMAlertURL
: The full URL to the VMAlert instance. For example:http://vmalert.mydomain.com:8880
.
Connecting with the Provider
- Ensure you have a running instance of VMAlert accessible by the host and port specified.
- 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:
-
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
-
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: