Add grafana_metric module to system configs and provision Grafana datasources

This commit is contained in:
Root User 2026-02-14 22:09:49 +01:00
parent 7bbacc8512
commit 0270bbac6f
Signed by: root
GPG key ID: 087F0A95E5766D72
5 changed files with 64 additions and 1 deletions

View file

@ -76,6 +76,65 @@ in {
# Prevents Grafana from phoning home
#analytics.reporting_enabled = false;
};
provision = {
enable = true;
# ============== Declarative Config ================
datasources.settings.datasources = [
# Provisioning a built-in data source
{
name = "Prometheus - Forgejo";
type = "prometheus";
url = "http://10.1.1.4:9001";
isDefault = false;
editable = true;
}
{
name = "Loki - Forgejo";
type = "loki";
url = "http://10.1.1.4:3100";
isDefault = false;
editable = true;
}
{
name = "Prometheus - Build Machine";
type = "prometheus";
url = "http://10.1.1.3:9001";
isDefault = false;
editable = true;
}
{
name = "Loki - Build Machine";
type = "loki";
url = "http://10.1.1.3:3100";
isDefault = false;
editable = true;
}
{
name = "Prometheus - Database";
type = "prometheus";
url = "http://10.1.1.251:9001";
isDefault = false;
editable = true;
}
{
name = "Loki - Database";
type = "loki";
url = "http://10.1.1.251:3100";
isDefault = false;
editable = true;
}
];
};
};
services.prometheus = {
@ -218,6 +277,6 @@ in {
networking.firewall.allowedTCPPorts = [3000];
networking.firewall.allowedUDPPorts = [3000];
# ============== Declarative Config ================
};
}