Add playbooks and templates for CPUHog

This commit is contained in:
2024-04-17 13:16:41 -04:00
parent 5707153521
commit e5ec521ec4
3 changed files with 54 additions and 5 deletions

View File

@@ -0,0 +1,20 @@
= CPUHog Report =
A high CPU event was triggered from AlertManager.
{% if event is defined %}
Annotations: "{{ event.alert.annotations }}"
Generator URL: "{{ event.alert.generatorURL }}"
Severity: "{{ event.alert.labels.severity }}"
Instance: "{{ event.alert.labels.instance }}"
Values: "{{ event.alert.values }}"
{% endif %}
** Top CPU Consumers **
{% for line in processes_cpu.stdout_lines[0:10] %}
{{ line }}
{% endfor %}
** Top Memory Consumers **
{% for line in processes_mem.stdout_lines[0:10] %}
{{ line }}
{% endfor %}