Fixes to CPUHog EDA Listener
This commit is contained in:
@@ -30,33 +30,33 @@
|
||||
instance: '{{ snow_instance }}'
|
||||
state: new
|
||||
caller: "admin"
|
||||
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."
|
||||
short_description: "CPUHog event detected on: {{ alertmanager_instance }}"
|
||||
description: "A CPUHog was detected on: {{ alertmanager_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 }}"
|
||||
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 | 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: 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
|
||||
|
||||
Reference in New Issue
Block a user