totoro: add valveindexinstock

This commit is contained in:
Luke Granger-Brown 2021-02-23 00:16:41 +00:00
parent 66e9fb38f8
commit dc996b324b

View file

@ -200,6 +200,22 @@ in {
pushgateway.enable = true;
rules = [
''
groups:
- name: valve_index
rules:
- alert: ValveIndexInStock
expr: valve_index_in_stock == 0
for: 1s
labels:
severity: page
annotations:
summary: "Valve Index in Stock!"
description: "The Valve Index is back in stock."
''
];
alertmanager = {
enable = true;
configuration = {
@ -265,5 +281,20 @@ in {
};
};
systemd.services.valveindexinstock = {
enable = true;
serviceConfig = {
ExecStart = "${depot.py.valveindexinstock}/bin/valveindexinstock";
DynamicUser = true;
MountAPIVFS = true;
PrivateTmp = true;
PrivateUsers = true;
ProtectControlGroups = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
};
};
my.prometheus.additionalExporterPorts.valveindexinstock = 9998;
system.stateVersion = "20.03";
}