fuuko/prometheus: Set external URLs
This commit is contained in:
parent
8b1b969aa9
commit
2897451a65
|
@ -19,6 +19,7 @@ in
|
||||||
services.prometheus = {
|
services.prometheus = {
|
||||||
enable = true;
|
enable = true;
|
||||||
listenAddress = "127.0.0.1";
|
listenAddress = "127.0.0.1";
|
||||||
|
webExternalUrl = "https://prometheus.sbruder.de";
|
||||||
globalConfig = {
|
globalConfig = {
|
||||||
scrape_interval = "15s";
|
scrape_interval = "15s";
|
||||||
evaluation_interval = "15s";
|
evaluation_interval = "15s";
|
||||||
|
@ -29,11 +30,15 @@ in
|
||||||
];
|
];
|
||||||
|
|
||||||
alertmanagers = [
|
alertmanagers = [
|
||||||
{ static_configs = mkStaticTarget "${cfg.alertmanager.listenAddress}:${toString cfg.alertmanager.port}"; }
|
{
|
||||||
|
static_configs = mkStaticTarget "${cfg.alertmanager.listenAddress}:${toString cfg.alertmanager.port}";
|
||||||
|
path_prefix = "/alertmanager/";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
alertmanager = {
|
alertmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
listenAddress = "127.0.0.1";
|
listenAddress = "127.0.0.1";
|
||||||
|
webExternalUrl = "https://prometheus.sbruder.de/alertmanager";
|
||||||
configuration = {
|
configuration = {
|
||||||
global.resolve_timeout = "2m";
|
global.resolve_timeout = "2m";
|
||||||
|
|
||||||
|
@ -174,7 +179,7 @@ in
|
||||||
locations = {
|
locations = {
|
||||||
"/".proxyPass = "http://${cfg.listenAddress}:${toString cfg.port}";
|
"/".proxyPass = "http://${cfg.listenAddress}:${toString cfg.port}";
|
||||||
|
|
||||||
"/alertmanager/".proxyPass = "http://${cfg.alertmanager.listenAddress}:${toString cfg.alertmanager.port}/";
|
"/alertmanager/".proxyPass = "http://${cfg.alertmanager.listenAddress}:${toString cfg.alertmanager.port}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue