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.
etc...
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.
Thanks!
@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]:
panic(0x6136e0, 0xc04205c700)
/usr/local/Cellar/go/1.7.3/libexec/src/runtime/panic.go:500 +0x1af
main.getHeartbeat(0x0, 0xc042087ee0)
/Users/caglaarikan/heartbeat/opsgenie-heartbeat/script monitor/src/oghb.go:78 +0x2a4
main.startHeartbeat()
/Users/caglaarikan/heartbeat/opsgenie-heartbeat/script monitor/src/oghb.go:63 +0x29
main.main()
/Users/caglaarikan/heartbeat/opsgenie-heartbeat/script monitor/src/oghb.go:29 +0x1a3
PS H:\oghb-windows-amd64-v2.0.3>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.