-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Anthony Green
committed
Jan 1, 2024
1 parent
a898429
commit 784c20c
Showing
3 changed files
with
41 additions
and
13 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module orb-ag | ||
module orb | ||
|
||
go 1.21.5 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
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" | ||
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 | ||
signals: | ||
|
||
- regex: "some log output" | ||
channel: "launch-ansible-job-template" | ||
|
||
- regex: "^Error:" | ||
channel: "jdump" |