-
Notifications
You must be signed in to change notification settings - Fork 13
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
Modifying alerting logic based on alert classifications #219
Modifying alerting logic based on alert classifications #219
Conversation
tendrl-bugid: Tendrl#218 Signed-off-by: GowthamShanmugam <gshanmug@redhat.com>
response = [b'<h1>Alert Received</h1>'] | ||
response = Response('Alert received successfully') | ||
response.headers['content-length'] = len(response.data) | ||
response.status_code = 200 | ||
except (IOError, AssertionError) as ex: |
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.
is AssertionError required?
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.
yes it required
data = env['wsgi.input'].read() | ||
data = env['wsgi.input'].read( | ||
int(env['CONTENT_LENGTH']) | ||
) | ||
data = json.loads(data) | ||
self.alert_handler.handle_alert( | ||
data["ruleId"] |
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.
Can we put a check for ruleId (For edge cases), or the ruleId will be there no matter what?
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.
ok i will do it
@shtripat @r0h4n @nnDarshan @rishubhjain please review |
tendrl-bugid: Tendrl#218 tendrl-bugid: Tendrl#216 Signed-off-by: GowthamShanmugam <gshanmug@redhat.com>
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.
Verified?
@r0h4n verified |
tendrl-bugid: #218
tendrl-bugid: #216
Signed-off-by: GowthamShanmugam gshanmug@redhat.com