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

Add alerting manager, definations and generic exceptions #22

Merged
merged 7 commits into from
Jan 15, 2017

Conversation

anmolbabu
Copy link
Contributor

tendrl-bug-id: #10,#11,#12,#14
Signed-off-by: anmolbabu anmolbudugutta@gmail.com

tendrl-bug-id: Tendrl#10,Tendrl#11,Tendrl#12,Tendrl#14
Signed-off-by: anmolbabu <anmolbudugutta@gmail.com>
@anmolbabu
Copy link
Contributor Author

@Tendrl/tendrl-core This is a split PR of #15 Please review

@@ -0,0 +1,47 @@
# flake8: noqa
Copy link
Member

Choose a reason for hiding this comment

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

Name of the file should be something like tendrl_definitions_alerting.py.
Also the package name followed in other cases are like tendrl/{module}/manager. Can we think of something similar?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

type: json
Alert:
attrs:
alert_id:
Copy link
Member

Choose a reason for hiding this comment

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

Add help attribute for all

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

from tendrl.common import log


LOG = logging.getLogger(__name__)
Copy link
Member

Choose a reason for hiding this comment

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

Refactor as per new changes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok

config.get('alerting', 'log_cfg_path'),
config.get('alerting', 'log_level')
)
manager = Manager()
Copy link
Member

Choose a reason for hiding this comment

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

The name of this class could be AlertingManager and it should extend from common's Manager class.

Copy link
Contributor Author

@anmolbabu anmolbabu Jan 10, 2017

Choose a reason for hiding this comment

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

common's manager cannot be extended here because, it has certain things like the discovery_thread among others which are not used anywhere in monitoring as of now. Also this manager needs to be a multiprocessing.Process as it has blocking calls in some of the managers managed by this manager

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renaming -- ok

Copy link
Contributor

@nthomas-redhat nthomas-redhat left a comment

Choose a reason for hiding this comment

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

LGTM

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.

Fix travis unit test failures

tendrl-bug-id: Tendrl#10,Tendrl#11,Tendrl#12,Tendrl#14
Signed-off-by: anmolbabu <anmolbudugutta@gmail.com>
@@ -0,0 +1,75 @@
import logging
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need to remove this file as its no more required.

tendrl-bug-id: Tendrl#10,Tendrl#11,Tendrl#12,Tendrl#14
Signed-off-by: anmolbabu <anmolbudugutta@gmail.com>
tendrl-bug-id: Tendrl#10,Tendrl#11,Tendrl#12,Tendrl#14
Signed-off-by: anmolbabu <anmolbudugutta@gmail.com>
tendrl-bug-id: Tendrl#10,Tendrl#11,Tendrl#12,Tendrl#14
Signed-off-by: anmolbabu <anmolbudugutta@gmail.com>
@r0h4n r0h4n merged commit a41a38e into Tendrl:master Jan 15, 2017
@anmolbabu anmolbabu deleted the alert_manager branch January 16, 2017 02:37
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.

None yet

4 participants