feat: restructure Grafana configuration, migrate alert rules to new format and add VictoriaMetrics datasource
This commit is contained in:
parent
17a3602d3c
commit
8b5fb0861d
14 changed files with 384 additions and 166 deletions
|
|
@ -0,0 +1,18 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
{
|
||||
services.grafana.provision.datasources.settings.datasources = [
|
||||
{
|
||||
name = "VictoriaMetrics";
|
||||
uid = "vm-datasource-uid"; # Stable UID for referencing in alerts
|
||||
type = "prometheus";
|
||||
url = "http://localhost:8428"; # URL of VictoriaMetrics
|
||||
access = "proxy"; # Grafana proxies requests
|
||||
isDefault = true; # Optional: make this the default datasource
|
||||
jsonData = {
|
||||
# timeInterval = "30s"; # Optional: Scrape interval if different from Grafana's default
|
||||
# httpMethod = "POST"; # Optional: if VictoriaMetrics prefers POST for queries
|
||||
};
|
||||
editable = false; # Recommended for provisioned datasources
|
||||
}
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue