Compare commits

..

3 Commits

Author SHA1 Message Date
ca18d68e56 docs: Update CLAUDE docs 2026-04-15 22:35:33 -04:00
dd5e6c68f7 feat: Add playbooks to manage supabase 2026-04-15 22:34:06 -04:00
b74528b6f1 feat: Sync supabase secrets to gitea
feat: Backup supabase
2026-04-14 20:23:26 -04:00
4 changed files with 30 additions and 33 deletions

View File

@@ -27,5 +27,3 @@
- name: Dump details on deletion
ansible.builtin.debug:
var: deleted_files
# Done

View File

@@ -30,33 +30,33 @@
instance: '{{ snow_instance }}'
state: new
caller: "admin"
short_description: "CPUHog event detected on: {{ alertmanager_instance }}"
description: "A CPUHog was detected on: {{ alertmanager_instance }} that needs to be investigated."
short_description: "CPUHog event detected on: {{ ansible_eda.event.alert.labels.instance }}"
description: "A CPUHog was detected on: {{ ansible_eda.event.alert.labels.instance }} that needs to be investigated."
impact: high
urgency: high
delegate_to: localhost
register: incident_result
# - name: Create SNow Problem
# servicenow.itsm.problem:
# instance: '{{ snow_instance }}'
# state: new
# short_description: "{{ alertmanager_annotations.summary | default('CPUHog event detected on: ' ~ alertmanager_instance) }}"
# description: "Generator URL: {{ alertmanager_generator_url }}"
# impact: high
# urgency: high
# attachments:
# - path: /tmp/cpuhog_details.txt
# name: cpuhog_details.txt
# type: 'text/plain'
# register: problem_result
# delegate_to: localhost
- name: Create SNow Problem
servicenow.itsm.problem:
instance: '{{ snow_instance }}'
state: new
short_description: "{{ alertmanager_annotations.summary }}"
description: "Generator URL: {{ alertmanager_generator_url }}"
impact: high
urgency: high
attachments:
- path: /tmp/cpuhog_details.txt
name: cpuhog_details.txt
type: 'text/plain'
register: problem_result
delegate_to: localhost
# - name: Update Incident
# servicenow.itsm.incident:
# instance: '{{ snow_instance }}'
# state: in_progress
# number: "{{ incident_result.record.number }}"
# other:
# problem_id: "{{ problem_result.record.number }}"
# delegate_to: localhost
- name: Update Incident
servicenow.itsm.incident:
instance: '{{ snow_instance }}'
state: in_progress
number: "{{ incident_result.record.number }}"
other:
problem_id: "{{ problem_result.record.number }}"
delegate_to: localhost

View File

@@ -1,11 +1,11 @@
= CPUHog Report =
A high CPU event was triggered from AlertManager.
{% if alertmanager_instance is defined %}
Annotations: "{{ alertmanager_annotations | default({}) }}"
Generator URL: "{{ alertmanager_generator_url | default('') }}"
Severity: "{{ event_severity | default('unknown') }}"
Instance: "{{ alertmanager_instance }}"
{% if ansible_eda is defined %}
Annotations: "{{ ansible_eda.event.alert.annotations }}"
Generator URL: "{{ ansible_eda.event.alert.generatorURL }}"
Severity: "{{ ansible_eda.event.alert.labels.severity }}"
Instance: "{{ ansible_eda.event.alert.labels.instance }}"
{% endif %}
** Top CPU Consumers **

View File

@@ -39,11 +39,10 @@
name: Demo - Investigate High CPU
organization: OYS
job_args:
limit: "{{ event.labels.hostname }}"
extra_vars:
alertmanager_annotations: "{{ event.annotations }}"
alertmanager_generator_url: "{{ event.generatorURL }}"
event_severity: "{{ event.labels.severity | default('unknown') }}"
event_severity: "{{ event.labels.severity }}"
alertmanager_instance: "{{ event.labels.instance }}"
- name: Test Contact Point