move alertmanager, prometheus under monitoring.nix-community.org
This commit is contained in:
parent
54b2ff99dc
commit
2e480a6b62
4 changed files with 14 additions and 32 deletions
docs
modules/nixos/monitoring
terraform
|
@ -1,2 +1,2 @@
|
|||
- [alertmanager.nix-community.org](https://alertmanager.nix-community.org)
|
||||
- [prometheus.nix-community.org](https://prometheus.nix-community.org)
|
||||
- [monitoring.nix-community.org/alertmanager](https://monitoring.nix-community.org/alertmanager)
|
||||
- [monitoring.nix-community.org/prometheus](https://monitoring.nix-community.org/prometheus)
|
||||
|
|
|
@ -4,4 +4,12 @@
|
|||
./prometheus.nix
|
||||
./telegraf.nix
|
||||
];
|
||||
|
||||
services.nginx.virtualHosts."monitoring.nix-community.org" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/".return = "302 https://nix-community.org/monitoring";
|
||||
locations."/alertmanager/".proxyPass = "http://localhost:9093";
|
||||
locations."/prometheus/".proxyPass = "http://localhost:9090";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
];
|
||||
}))
|
||||
];
|
||||
webExternalUrl = "https://prometheus.nix-community.org";
|
||||
webExternalUrl = "https://monitoring.nix-community.org/prometheus/";
|
||||
scrapeConfigs = [
|
||||
{
|
||||
job_name = "telegraf";
|
||||
|
@ -49,15 +49,9 @@
|
|||
"http://localhost:9093/metrics" # alertmanager
|
||||
];
|
||||
|
||||
services.nginx.virtualHosts."prometheus.nix-community.org" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/".proxyPass = "http://localhost:9090";
|
||||
};
|
||||
|
||||
services.prometheus.alertmanager = {
|
||||
enable = true;
|
||||
webExternalUrl = "https://alertmanager.nix-community.org";
|
||||
webExternalUrl = "https://monitoring.nix-community.org/alertmanager/";
|
||||
listenAddress = "[::1]";
|
||||
extraFlags = [ "--cluster.listen-address=''" ];
|
||||
configuration = {
|
||||
|
@ -89,10 +83,4 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."alertmanager.nix-community.org" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/".proxyPass = "http://localhost:9093";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -162,23 +162,9 @@ resource "cloudflare_record" "nix-community-org-nur-update-CNAME" {
|
|||
type = "CNAME"
|
||||
}
|
||||
|
||||
resource "cloudflare_record" "nix-community-org-alertmanager-CNAME" {
|
||||
resource "cloudflare_record" "nix-community-org-monitoring-CNAME" {
|
||||
zone_id = local.nix_community_zone_id
|
||||
name = "alertmanager"
|
||||
value = "web02.nix-community.org"
|
||||
type = "CNAME"
|
||||
}
|
||||
|
||||
resource "cloudflare_record" "nix-community-org-grafana-CNAME" {
|
||||
zone_id = local.nix_community_zone_id
|
||||
name = "grafana"
|
||||
value = "web02.nix-community.org"
|
||||
type = "CNAME"
|
||||
}
|
||||
|
||||
resource "cloudflare_record" "nix-community-org-prometheus-CNAME" {
|
||||
zone_id = local.nix_community_zone_id
|
||||
name = "prometheus"
|
||||
name = "monitoring"
|
||||
value = "web02.nix-community.org"
|
||||
type = "CNAME"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue