You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
We have a lot of events that are scheduled through the day and we want to utilize Opsgenie to notify us if these events fail.
IE at 5pm we get an email with an attachment that gets dropped to a network store.
at 9pm 4 files go out via ftp and we get confirmation of success.
at 4am we receive a set of files that we load on process.
So essentially what I would want are scheduled 'soft' alerts that are ack/closed by the confirmations of success from each operation and if they don't get that confirmation by x-time to then escalate and notify the team.
I didn't see a scheduled way to generate these event/alerts so I'm wondering what routes others have tried for this and what would be considered the best practical way of doing this.
@johnathan_blanco this isn't something Opsgenie can natively do without some external scripting/automation. There are several ways to do this, but each method will require some external system either sending an alert, an alert-close, or a heartbeat. Here are some suggestions:
Just some thoughts...
Thank you for the recommendations. I believe the heartbeat will be the best fit and I was reviewing this document and started testing the "Script Monitoring Client" linked from: https://docs.opsgenie.com/v1.0/docs/heartbeat-monitoring
I'm not having luck with that one but I'm not sure atm if it's our firewall (which I can check next week) or just something I'm doing wrong. I'll paste the output below if it helps point in either direction.
Also one other question from that article I linked above... it says: "Send a built-in email to Opsgenie to ping a Heartbeat. While creating the Heartbeats on Opsgenie, you will see the built-in email address configured according to your account and Heartbeat name...."
Is the email to heartbeat limited to only ping or can emails generate,close or other heartbeat actions?
Here's the output of the script monitoring client:
PS H:\oghb-windows-amd64-v2.0.3> ./oghb-windows-amd64.exe -apiKey=REMOVEDFORSHARING -name=testbeats -action=start
time="2022-04-01T16:37:16-07:00" level=info msg="Couldn't send the request to opsgenie"
time="2022-04-01T16:37:16-07:00" level=error msg="Get https://api.opsgenie.com/v2/heartbeats/testbeats: dial tcp: lookup api.opsgenie.com: getaddrinfow: A non-recoverable error occurred during a database lookup."
panic: interface conversion: interface is nil, not string
goroutine 1 [running]:
/Users/caglaarikan/heartbeat/opsgenie-heartbeat/script monitor/src/oghb.go:78 +0x2a4
/Users/caglaarikan/heartbeat/opsgenie-heartbeat/script monitor/src/oghb.go:63 +0x29
/Users/caglaarikan/heartbeat/opsgenie-heartbeat/script monitor/src/oghb.go:29 +0x1a3
I believe the email from the heartbeat integration is limited to PINGs, but there's nothing stopping you from creating a dedicated email integration to process close actions, or other actions. You just need to know the alert ID.