-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgreen-orb.yaml
48 lines (33 loc) · 1.06 KB
/
green-orb.yaml
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
---
channels:
# Launch an Ansible job. Important data is in environment variables.
- name: "launch-ansible-job-template"
type: "notify"
url: "generic+https://{{.Env.AAP_USER}}:{{.Env.AAP_PASSWORD}}@{{.Env.AAP_HOST}}/api/v2/job_templates/14/launch/"
# Send an email.
- name: "email_alerts"
type: "notify"
url: "smtp://{{.Env.SENDER_EMAIL}:{{.Env.SENDER_PASSWORD}}@smtp.gmail.com:587/?from={{.Env.SENDER_EMAIL}}&to={{.Env.RECIPIENT_EMAIL}}&subject=Go%20Alert!"
template: "Just started process {{.PID}} on {{.Env.HOSTNAME}}"
# Produce a kafka message.
- name: "kafka-test"
type: "kafka"
broker: "localhost:9632" # notsecret
topic: "orb-messages"
# Restart the process
- name: "restart-test"
type: "restart"
- name: "jdump"
type: "exec"
shell: |
jstack $ORB_PID > /tmp/jdump-$(date).txt 2>&1
# Don't show this
- name: "hide"
type: "suppress"
signals:
- regex: "some log output"
channel: "launch-ansible-job-template"
- regex: "^Error:"
channel: "jdump"
- regex: "README.md"
channel: "hide"