Skip to content

Commit

Permalink
Update sample config file
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Green committed Jan 1, 2024
1 parent a898429 commit 784c20c
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 13 deletions.
12 changes: 0 additions & 12 deletions config.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module orb-ag
module orb

go 1.21.5

Expand Down
40 changes: 40 additions & 0 deletions green-orb.yaml
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"

0 comments on commit 784c20c

Please sign in to comment.