mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-10-15 03:17:18 +02:00
service/prometheus: add example to alert option
Some checks failed
/ Build Nix targets (push) Has been cancelled
Some checks failed
/ Build Nix targets (push) Has been cancelled
This commit is contained in:
parent
f22a2b73d8
commit
3d830613cd
1 changed files with 10 additions and 0 deletions
|
@ -73,6 +73,16 @@ in
|
|||
Defines the prometheus rules.
|
||||
'';
|
||||
default = { };
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
cpu_high_usage = {
|
||||
condition = "cpu_usage_percent > 80";
|
||||
description = "High CPU usage detected on {{ $labels.instance }}";
|
||||
time = "5m";
|
||||
labels = { severity = "warning"; };
|
||||
};
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue