blob: a0a5a4d033ebc7617673bd2f93f4773f8b5d502c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
---
g_template_ops_tools:
name: Template Operations Tools
zdiscoveryrules:
- name: disc.ops.runner
key: disc.ops.runner
lifetime: 1
description: "Dynamically register operations runner items"
zitemprototypes:
- discoveryrule_key: disc.ops.runner
name: "Exit code of ops-runner[{#OSO_COMMAND}]"
key: "disc.ops.runner.command.exitcode[{#OSO_COMMAND}]"
value_type: int
description: "The exit code of the command run from ops-runner"
applications:
- Ops Runner
ztriggerprototypes:
- name: 'ops-runner[{#OSO_COMMAND}]: non-zero exit code on {HOST.NAME}'
expression: '{Template Operations Tools:disc.ops.runner.command.exitcode[{#OSO_COMMAND}].last()}<>0'
url: 'https://github.com/openshift/ops-sop/blob/master/V3/Alerts/check_ops_runner_command.asciidoc'
priority: average
zactions:
- name: 'Remote command for [Heal] triggers'
status: enabled
escalation_time: 60
conditions_filter:
calculation_type: "and/or"
conditions:
- conditiontype: maintenance status
operator: not in
- conditiontype: trigger name
operator: like
value: "[Heal]"
- conditiontype: trigger value
operator: "="
value: PROBLEM
operations:
- esc_step_from: 1
esc_step_to: 1
esc_period: 0
operationtype: remote command
opcommand:
command: 'ssh -i /etc/openshift_tools/scriptrunner_id_rsa {{ ozb_scriptrunner_user }}@{{ ozb_scriptrunner_bastion_host }} remote-healer --host \"{HOST.NAME}\" --trigger \"{TRIGGER.NAME}\" --trigger-val \"{TRIGGER.VALUE}\"'
execute_on: "zabbix server"
type: 'custom script'
target_hosts:
- target_type: 'zabbix server'
opconditions:
- conditiontype: 'event acknowledged'
operator: '='
value: 'not acknowledged'
|