prometheus: Add disk full alert

This commit is contained in:
Simon Bruder 2023-08-02 23:22:19 +02:00
parent ee745afd3d
commit 25ff150b3d
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -169,6 +169,12 @@ in
expr = "sum by (instance) (qBittorrent_torrent_connected_leechs) == 0";
description = "qBittorrent instance {{ $labels.instance }} has no peers. There might be a network connectivity problem";
}
# <40% is to account for /boot being full (which causes ugly errors on rebuild)
{
name = "DiskFull";
expr = ''node_filesystem_free_bytes{fstype!~"ramfs|tmpfs", mountpoint!~"/nix/store"} / node_filesystem_size_bytes{fstype!~"ramfs|tmpfs", mountpoint!~"/nix/store"} < 0.4 and node_filesystem_free_bytes{fstype!~"ramfs|tmpfs", mountpoint!~"/nix/store"} < 4*1024^3'';
description = "Device {{ $labels.device }} on {{ $labels.instance }}:{{ $labels.mountpoint }} has less than 4GiB free space while being used over 40%";
}
];
};
})