prometheus/caddy
This commit is contained in:
parent
810064ebbd
commit
cdbbdaaa45
3
data.nix
3
data.nix
@ -20,6 +20,9 @@ rec {
|
|||||||
kodi = 8080;
|
kodi = 8080;
|
||||||
prometheus = 9001;
|
prometheus = 9001;
|
||||||
exporters.node = 9002;
|
exporters.node = 9002;
|
||||||
|
|
||||||
|
# non-configurable in caddy as of 2023-09-06
|
||||||
|
exporters.caddy = 2019;
|
||||||
};
|
};
|
||||||
|
|
||||||
people_pubkeys = {
|
people_pubkeys = {
|
||||||
|
@ -179,6 +179,11 @@
|
|||||||
caddy = {
|
caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
email = "motiejus+acme@jakstys.lt";
|
email = "motiejus+acme@jakstys.lt";
|
||||||
|
globalConfig = ''
|
||||||
|
servers {
|
||||||
|
metrics
|
||||||
|
}
|
||||||
|
'';
|
||||||
virtualHosts."grafana.jakstys.lt".extraConfig = ''
|
virtualHosts."grafana.jakstys.lt".extraConfig = ''
|
||||||
@denied not remote_ip ${myData.tailscale_subnet.cidr}
|
@denied not remote_ip ${myData.tailscale_subnet.cidr}
|
||||||
abort @denied
|
abort @denied
|
||||||
@ -310,6 +315,10 @@
|
|||||||
job_name = "prometheus";
|
job_name = "prometheus";
|
||||||
static_configs = [{targets = ["127.0.0.1:${toString myData.ports.prometheus}"];}];
|
static_configs = [{targets = ["127.0.0.1:${toString myData.ports.prometheus}"];}];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
job_name = "caddy";
|
||||||
|
static_configs = [{targets = ["127.0.0.1:${toString myData.ports.exporters.caddy}"];}];
|
||||||
|
}
|
||||||
{
|
{
|
||||||
job_name = "${config.networking.hostName}.${config.networking.domain}";
|
job_name = "${config.networking.hostName}.${config.networking.domain}";
|
||||||
static_configs = [{targets = ["127.0.0.1:${port}"];}];
|
static_configs = [{targets = ["127.0.0.1:${port}"];}];
|
||||||
|
Loading…
Reference in New Issue
Block a user