Update monitoring targets, internet speed alerts

This commit is contained in:
Gabriel Simmer 2023-10-27 14:55:04 +01:00
parent eac0c82ed8
commit 595e52feb2
Signed by: arch
SSH key fingerprint: SHA256:m3OEcdtrnBpMX+2BDGh/byv3hrCekCLzDYMdvGEKPPQ

View file

@ -198,22 +198,39 @@
} ];
} ];
rules = [(builtins.toJSON {
groups = [{
name = "healthchecks";
rules = [
{
alert = "HealthcheckFailedCheckin";
expr = ''hc_check_up < 1'';
for = "5m";
labels.severity = "page";
annotations = {
summary = "{{ $labels.name }} healthcheck failed";
description = "The {{ $labels.name }} healthcheck failed to check in.";
dashboard = "f594ea85-45f2-4019-b988-2d17638b5cf3";
};
}
];
}];
groups = [
{
name = "internet_connection";
rules = [
{
alert = "LowInternetDownload";
expr = ''speedtest_download_bits_per_second{} < 500000000'';
for = "2h";
labels.severity = "page";
annotations = {
summary = "Internet speed low";
description = "Home internet speed dropped below 500Mb/s.";
dashboard = "o9mIe_Aik";
};
}
];
}
{
name = "healthchecks";
rules = [
{
alert = "HealthcheckFailedCheckin";
expr = ''hc_check_up < 1'';
for = "5m";
labels.severity = "page";
annotations = {
summary = "{{ $labels.name }} healthcheck failed";
description = "The {{ $labels.name }} healthcheck failed to check in.";
dashboard = "f594ea85-45f2-4019-b988-2d17638b5cf3";
};
}
];
}];
})];
alertmanager = {
enable = true;
@ -272,6 +289,11 @@
metrics_path = "/projects/5f1de50f-a52d-4215-961f-aae7cc6cf6c9/metrics/TbMoU7SUdknzMe-H5Q4HzmKl3itOIrJk";
static_configs = [ { targets = [ "localhost:8000" ]; } ];
}
{
job_name = "vrc_events";
scrape_interval = "60s";
static_configs = [ { targets = [ "vancouver:6534" ]; } ];
}
{
job_name = "blackbox";
metrics_path = "/probe";