Skip to content

Instantly share code, notes, and snippets.

View danifitz's full-sized avatar

Daniel Fitzgerald danifitz

View GitHub Profile
@dkt26111
dkt26111 / alert.rules.yml
Created June 6, 2019 18:32
High CPU usage alert rule for Prometheus
groups:
- name: example
rules:
# Alert for any cluster that has average CPU idle < 50%
- alert: HighUsage
expr: avg(irate(node_cpu_seconds_total{mode="idle"}[1m]) * 100) < 50
for: 1m
annotations:
summary: "High usage on {{ $labels.instance }}"
description: "{{ $labels.instance }} has a average CPU idle (current value: {{ $value }}s)"
- hosts: lacework_servers
become: yes
tasks:
- name: add apt signing key
apt_key:
keyserver: hkp://keyserver.ubuntu.com:80
id: EE0CC692
state: present
- name: add lacework repository into source list
apt_repository: