datalust / seq-app-opsgenie

Create Opsgenie alerts in response to events or notifications in Seq
Apache License 2.0
3 stars 2 forks source link

OpsGenie alert and event related enhancements #1

Closed MattMofDoom closed 3 years ago

MattMofDoom commented 3 years ago

Hi @nblumhardt,

This pull request adds functionality to Seq.App.OpsGenie:

Note - App name and assembly name were changed as part of build & test.

MattMofDoom commented 3 years ago

FYI - Test build can be installed from Nuget as Seq.App.Opsgenie2 .. the latest tested build version is 1.1.18.

MattMofDoom commented 3 years ago

πŸŽ‰ this looks awesome, thanks @MattMofDoom!

I've added a stack of mostly-stylistic comments, to bring things in line with the rest of the codebase. LGTM otherwise :-)

Thanks @nblumhardt ... think it makes the app even more useful, and glad for an opportunity to contribute :-)

MattMofDoom commented 3 years ago

Hi @nblumhardt ,

Updated per your suggestions/nits and have reverted the versioning. I think the Serialize implementation in OpsGenieApiClient was what you had in mind - implemented an overload for passing either a list or an alert.

Checks are now passing :-)

Cheers,

Matt

nblumhardt commented 3 years ago

Merged! I'll keep an eye on CI/publishing.

Thanks @MattMofDoom - looking forward to hearing how it goes! 😎

MattMofDoom commented 3 years ago

Thanks @nblumhardt, I've already installed and tested - works great 😊

I no longer need to create OpsGenie rules to set priority or responders, and tags logged via Seq.App.EventTimeout are automatically added to the OpsGenie alert.

I will probably look at the idea for allowing mapping of @Level or a specified property to set Priority, and potentially allow passing through responders, as I noted in https://github.com/datalust/seq-tickets/issues/1221 ... obviously the intent being to make the alerting capabilities from this app even more powerful.

It may also be worth passing through properties such as a link to the signal and the event, if the instance is attached to a signal, but I'll have a think on that one.