1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-30 11:37:44 +00:00

Add Prometheus datasource for Grafana

This commit is contained in:
RGBCube 2024-01-13 16:29:13 +03:00
parent c91913dd2c
commit b1313c73ec
No known key found for this signature in database
2 changed files with 8 additions and 0 deletions

View file

@ -14,6 +14,8 @@ in serverSystemConfiguration {
domain = fqdn; domain = fqdn;
port = 8999; port = 8999;
provision = enabled {};
settings = { settings = {
database.host = "/run/postgresql"; database.host = "/run/postgresql";
database.type = "postgres"; database.type = "postgres";

View file

@ -1,6 +1,12 @@
{ config, ulib, ... }: with ulib; { config, ulib, ... }: with ulib;
serverSystemConfiguration { serverSystemConfiguration {
services.grafana.provision.datasources.settings.datasources = [{
name = "Prometheus";
type = "prometheus";
url = "http://[::]:${toString config.services.prometheus.port}";
}];
services.prometheus = enabled { services.prometheus = enabled {
port = 9000; port = 9000;