Skip to content
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

Merged
merged 2 commits into from
Oct 30, 2017

Conversation

GowthamShanmugam
Copy link
Collaborator

@GowthamShanmugam GowthamShanmugam commented Oct 25, 2017

tendrl-bugid: #218
tendrl-bugid: #216

Signed-off-by: GowthamShanmugam gshanmug@redhat.com

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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is AssertionError required?

Copy link
Collaborator Author

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"]
Copy link
Contributor

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?

Copy link
Collaborator Author

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

@GowthamShanmugam
Copy link
Collaborator Author

@shtripat @r0h4n @nnDarshan @rishubhjain please review

@GowthamShanmugam
Copy link
Collaborator Author

tendrl-bugid: Tendrl#218
tendrl-bugid: Tendrl#216

Signed-off-by: GowthamShanmugam <gshanmug@redhat.com>
Copy link
Contributor

@r0h4n r0h4n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified?

@GowthamShanmugam
Copy link
Collaborator Author

@r0h4n verified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants