caddy: exposed metrics
This commit is contained in:
parent
3d52e2fbf6
commit
26cb5919fa
|
@ -9,6 +9,12 @@ in
|
|||
enable = true;
|
||||
};
|
||||
|
||||
services.caddy.globalConfig = /*caddy*/ ''
|
||||
servers {
|
||||
metrics
|
||||
}
|
||||
'';
|
||||
|
||||
services.caddy.virtualHosts."router.tigor.web.id".extraConfig = ''
|
||||
@denied not remote_ip private_ranges
|
||||
|
||||
|
|
|
@ -144,6 +144,16 @@ in
|
|||
forward_to = [prometheus.remote_write.mimir.receiver]
|
||||
}
|
||||
|
||||
prometheus.scrape "caddy" {
|
||||
targets = [{
|
||||
__address__ = "localhost:2019",
|
||||
}]
|
||||
|
||||
job_name = "caddy"
|
||||
|
||||
forward_to = [prometheus.remote_write.mimir.receiver]
|
||||
}
|
||||
|
||||
prometheus.remote_write "mimir" {
|
||||
endpoint {
|
||||
url = "http://${mimirServer.http_listen_address}:${toString mimirServer.http_listen_port}/api/v1/push"
|
||||
|
|
Loading…
Reference in a new issue