mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-04-26 00:18:28 +02:00
grafana: init
This commit is contained in:
parent
af73e70082
commit
5fd94d8540
8 changed files with 154 additions and 83 deletions
|
@ -3,7 +3,7 @@ let
|
|||
domain = "monitoring.${config.networking.domain}";
|
||||
in
|
||||
{
|
||||
sops.secrets."grafana/oidc_secret" = {
|
||||
age.secrets."grafana/oidc_secret" = {
|
||||
file = ../../../../secrets/nuc/grafana/oidc.age;
|
||||
owner = "grafana";
|
||||
};
|
||||
|
@ -37,13 +37,11 @@ in
|
|||
auth_url = "https://auth.rfive.de/application/o/authorize/";
|
||||
token_url = "https://auth.rfive.de/application/o/token/";
|
||||
api_url = "https://auth.rfive.de/application/o/userinfo/";
|
||||
role_attribute_path = "contains(roles[*], 'admin') && 'Admin' || contains(roles[*], 'editor') && 'Editor' || 'Viewer'";
|
||||
role_attribute_path = "contains(groups, 'Grafana Admins') && 'Admin' || contains(groups, 'Grafana Editors') && 'Editor' || 'Viewer'";
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
|
@ -64,7 +62,6 @@ in
|
|||
node = {
|
||||
enable = true;
|
||||
enabledCollectors = [ "systemd" ];
|
||||
port = 9002;
|
||||
};
|
||||
# postfix = {
|
||||
# enable = true;
|
||||
|
@ -75,17 +72,21 @@ in
|
|||
{
|
||||
job_name = "node";
|
||||
static_configs = [{
|
||||
targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.node.port}" ];
|
||||
targets = [
|
||||
"nuc.vpn.rfive.de:${toString config.services.prometheus.exporters.node.port}"
|
||||
"falkenstein.vpn.rfive.de:${toString config.services.prometheus.exporters.node.port}"
|
||||
"cudy.vpn.rfive.de:${toString config.services.prometheus.exporters.node.port}"
|
||||
"fujitsu.vpn.rfive.de:${toString config.services.prometheus.exporters.node.port}"
|
||||
];
|
||||
}];
|
||||
scrape_interval = "15s";
|
||||
}
|
||||
# {
|
||||
# job_name = "postfix";
|
||||
# static_configs = [{
|
||||
# targets = [ "127.0.0.1:${toString config.services.prometheus.exporters.postfix.port}" ];
|
||||
# }];
|
||||
# # scrape_interval = "60s";
|
||||
# }
|
||||
{
|
||||
job_name = "postfix";
|
||||
static_configs = [{
|
||||
targets = [ "falkenstein.vpn.rfive.de:${toString config.services.prometheus.exporters.postfix.port}" ];
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
}];
|
||||
networkConfig = {
|
||||
DNS = [
|
||||
"9.9.9.9"
|
||||
"149.112.112.112"
|
||||
"192.168.42.1"
|
||||
];
|
||||
LLDP = true;
|
||||
EmitLLDP = "nearest-bridge";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue