-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add opsgenie sink extra details from alert labels #1587
Add opsgenie sink extra details from alert labels #1587
Conversation
2fc8f99
to
5ebb2ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution @sk4mi
Left 2 minor comments
Can you please check it?
@@ -96,6 +94,23 @@ def __to_description(self, finding: Finding, platform_enabled: bool) -> str: | |||
|
|||
return f"{description}{self.__enrichments_as_text(finding.enrichments)}" | |||
|
|||
def __to_details(self, finding: Finding, platform_enabled: bool) -> dict: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the platform_enabled
parameter is not used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, removed
} | ||
lower_details_key = [k.lower() for k in details.keys()] | ||
# Add extra details labels from config extra_details_labels if it exists | ||
# without alterate details already present |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's a typo in the comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rephrase it a little
5ebb2ce
to
8245fb6
Compare
8245fb6
to
09c3fb4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice and clean!
Thanks for your contribution @sk4mi
Add feature to allow to add extra properties from alerts label to opsgenie