rico0: enable prometheus

This commit is contained in:
Adithya 2024-07-16 22:59:07 +05:30
parent 196749c9cc
commit 41706989bb
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
3 changed files with 24 additions and 1 deletions

View file

@ -65,6 +65,10 @@ _: {
upstream = "192.168.1.1";
singleNameOrder = [ 2 1 ];
};
prometheus = {
enable = true;
path = "/metrics";
};
ports = {
dns = "192.168.1.10:53,10.10.10.10:53";
tls = "192.168.1.10:853,10.10.10.10:853";

View file

@ -1,3 +1,3 @@
_: {
imports = [ ./blocky.nix ];
imports = [ ./blocky.nix ./prometheus.nix ];
}

View file

@ -0,0 +1,19 @@
_: {
services.prometheus = {
enable = true;
scrapeConfigs = [
{
job_name = "frp";
static_configs = [
{ targets = [ "10.10.10.1:7500" ]; }
];
}
{
job_name = "blocky";
static_configs = [
{ targets = [ "10.10.10.10:8080" ]; }
];
}
];
};
}