Adds alarm engine 08/6908/2
authorBenjamin Diaz <bdiaz@whitestack.com>
Thu, 15 Nov 2018 13:27:12 +0000 (10:27 -0300)
committerBenjamin Diaz <bdiaz@whitestack.com>
Fri, 16 Nov 2018 22:59:27 +0000 (19:59 -0300)
commit51f4486b06781541ee15ea332261247ed3e930f6
tree0b4e5b8a2c14819ac21bdbb60aca5975fccd8277
parente27def0d99cc73c5c0b7550a28e95abd6c1cd996
Adds alarm engine

Alarms are now created directly through mon-central. A new component called
mon-evaluator evaluates the alarms and sends a notification in case it
triggers. Alarms are still created through the Kafka bus using the same model.

It also deletes all of the old unused code of the plugin model. There were
thousands of lines dedicated to provide CRUD operations for metrics and alarms
in the VIM plugins that were never used. MON only requires to collect metrics
and insert them in the TSDB. VIMs manage their metrics autonomously. The tests
for that were also removed. This was done to make the codebase more
manageable. Support for VROPS and AWS will be added in a future patch. Neither
of those two plugins worked correctly. They need to be adapted to the new
consumer plugin model.

Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: I656c78be82ca21b760a83b478560d0c8ae680222
137 files changed:
docker/Dockerfile
docker/scripts/runInstall.sh
osm_mon/__init__.py
osm_mon/cmd/mon_collector.py
osm_mon/cmd/mon_evaluator.py [new file with mode: 0644]
osm_mon/cmd/mon_server.py [new file with mode: 0644]
osm_mon/collector/backends/prometheus.py
osm_mon/collector/collector.py
osm_mon/collector/collectors/base.py
osm_mon/collector/collectors/base_vim.py
osm_mon/collector/collectors/juju.py
osm_mon/collector/collectors/openstack.py
osm_mon/common/__init__.py [deleted file]
osm_mon/common/common_db_client.py [deleted file]
osm_mon/core/auth.py
osm_mon/core/common_db.py [new file with mode: 0644]
osm_mon/core/database.py
osm_mon/core/exceptions.py [new file with mode: 0644]
osm_mon/core/message_bus/common_consumer.py [deleted file]
osm_mon/core/models/access_cred_CloudWatch.json [deleted file]
osm_mon/core/models/access_cred_OpenStack.json [deleted file]
osm_mon/core/models/access_cred_vROPs.json [deleted file]
osm_mon/core/models/acknowledge_alarm_req.json [deleted file]
osm_mon/core/models/create_metric_req.json [deleted file]
osm_mon/core/models/create_metric_resp.json [deleted file]
osm_mon/core/models/delete_metric_req.json [deleted file]
osm_mon/core/models/delete_metric_resp.json [deleted file]
osm_mon/core/models/list_metric_req.json [deleted file]
osm_mon/core/models/list_metric_resp.json [deleted file]
osm_mon/core/models/read_metric_data_req.json [deleted file]
osm_mon/core/models/read_metric_data_resp.json [deleted file]
osm_mon/core/models/update_metric_req.json [deleted file]
osm_mon/core/models/update_metric_resp.json [deleted file]
osm_mon/core/response.py [new file with mode: 0644]
osm_mon/core/settings.py
osm_mon/core/singleton.py [new file with mode: 0644]
osm_mon/evaluator/__init__.py [new file with mode: 0644]
osm_mon/evaluator/evaluator.py [new file with mode: 0644]
osm_mon/plugins/CloudWatch/__init__.py [deleted file]
osm_mon/plugins/CloudWatch/access_credentials.py [deleted file]
osm_mon/plugins/CloudWatch/connection.py [deleted file]
osm_mon/plugins/CloudWatch/metric_alarms.py [deleted file]
osm_mon/plugins/CloudWatch/metrics.py [deleted file]
osm_mon/plugins/CloudWatch/plugin_alarm.py [deleted file]
osm_mon/plugins/CloudWatch/plugin_metric.py [deleted file]
osm_mon/plugins/OpenStack/Aodh/__init__.py [deleted file]
osm_mon/plugins/OpenStack/Aodh/alarm_handler.py [deleted file]
osm_mon/plugins/OpenStack/Aodh/notifier.py [deleted file]
osm_mon/plugins/OpenStack/Gnocchi/__init__.py [deleted file]
osm_mon/plugins/OpenStack/Gnocchi/metric_handler.py [deleted file]
osm_mon/plugins/OpenStack/__init__.py [deleted file]
osm_mon/plugins/OpenStack/common.py [deleted file]
osm_mon/plugins/OpenStack/response.py [deleted file]
osm_mon/plugins/OpenStack/singleton.py [deleted file]
osm_mon/plugins/__init__.py [deleted file]
osm_mon/plugins/vRealiseOps/__init__.py [deleted file]
osm_mon/plugins/vRealiseOps/mon_plugin_vrops.py [deleted file]
osm_mon/plugins/vRealiseOps/plugin_receiver.py [deleted file]
osm_mon/plugins/vRealiseOps/vROPs_Webservice/__init__.py [deleted file]
osm_mon/plugins/vRealiseOps/vROPs_Webservice/install.sh [deleted file]
osm_mon/plugins/vRealiseOps/vROPs_Webservice/vrops_webservice [deleted file]
osm_mon/plugins/vRealiseOps/vrops_config.xml [deleted file]
osm_mon/server/__init__.py [new file with mode: 0644]
osm_mon/server/server.py [new file with mode: 0755]
osm_mon/test/__init__.py [deleted file]
osm_mon/test/collector/__init__.py [deleted file]
osm_mon/test/collector/test_collector.py [deleted file]
osm_mon/test/core/__init__.py [deleted file]
osm_mon/test/core/test_common_consumer.py [deleted file]
osm_mon/test/plugins/CloudWatch/__init__.py [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/alarm_details/acknowledge_alarm.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/create_alarm/create_alarm_differentName_differentInstance.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/create_alarm/create_alarm_differentName_sameInstance.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/create_alarm/create_alarm_sameName_differentInstance.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/create_alarm/create_alarm_sameName_sameInstance.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/create_alarm/operation_invalid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/create_alarm/operation_valid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/create_alarm/statistic_invalid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/create_alarm/statistic_valid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/create_metrics/create_metric_req_invalid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/create_metrics/create_metric_req_valid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/delete_alarm/name_invalid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/delete_alarm/name_valid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/delete_alarm/name_valid_delete1.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/delete_alarm/name_valid_delete2.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/delete_alarm/name_valid_delete3.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/delete_alarm/name_valid_delete4.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/delete_metrics/delete_metric_req_invalid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/delete_metrics/delete_metric_req_valid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/list_alarm/list_alarm_valid_no_arguments.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/list_alarm/list_alarm_valid_one_argument.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/list_alarm/list_alarm_valid_two_arguments.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/list_metrics/list_metric_req_invalid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/list_metrics/list_metric_req_valid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/read_metrics_data/read_coll_period_req_invalid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/read_metrics_data/read_coll_period_req_valid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/read_metrics_data/read_metric_name_req_invalid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/read_metrics_data/read_metric_name_req_valid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/update_alarm/name_invalid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/update_alarm/name_valid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/update_alarm/operation_invalid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/update_alarm/operation_valid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/update_alarm/statistic_invalid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/update_alarm/statistic_valid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/update_alarm/update_alarm_new_alarm.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/update_metrics/update_metric_req_invalid.json [deleted file]
osm_mon/test/plugins/CloudWatch/test_schemas/update_metrics/update_metric_req_valid.json [deleted file]
osm_mon/test/plugins/CloudWatch/unit_tests_alarms.py [deleted file]
osm_mon/test/plugins/CloudWatch/unit_tests_metrics.py [deleted file]
osm_mon/test/plugins/OpenStack/__init__.py [deleted file]
osm_mon/test/plugins/OpenStack/integration/__init__.py [deleted file]
osm_mon/test/plugins/OpenStack/integration/test_alarm_integration.py [deleted file]
osm_mon/test/plugins/OpenStack/integration/test_metric_integration.py [deleted file]
osm_mon/test/plugins/OpenStack/integration/test_notify_alarm.py [deleted file]
osm_mon/test/plugins/OpenStack/integration/test_vim_account.py [deleted file]
osm_mon/test/plugins/OpenStack/unit/__init__.py [deleted file]
osm_mon/test/plugins/OpenStack/unit/test_alarm_req.py [deleted file]
osm_mon/test/plugins/OpenStack/unit/test_alarming.py [deleted file]
osm_mon/test/plugins/OpenStack/unit/test_common.py [deleted file]
osm_mon/test/plugins/OpenStack/unit/test_metric_calls.py [deleted file]
osm_mon/test/plugins/OpenStack/unit/test_metric_req.py [deleted file]
osm_mon/test/plugins/OpenStack/unit/test_notifier.py [deleted file]
osm_mon/test/plugins/OpenStack/unit/test_responses.py [deleted file]
osm_mon/test/plugins/OpenStack/unit/test_settings.py [deleted file]
osm_mon/test/plugins/VMware/__init__.py [deleted file]
osm_mon/test/plugins/VMware/test_mon_plugin_vrops.py [deleted file]
osm_mon/test/plugins/VMware/test_plugin_receiver.py [deleted file]
osm_mon/test/plugins/__init__.py [deleted file]
osm_mon/tests/__init__.py [new file with mode: 0644]
osm_mon/tests/collector/__init__.py [new file with mode: 0644]
osm_mon/tests/collector/test_collector.py [new file with mode: 0644]
osm_mon/tests/common/__init__.py [new file with mode: 0644]
osm_mon/tests/common/test_common_db_client.py [new file with mode: 0644]
osm_mon/tests/core/__init__.py [new file with mode: 0644]
osm_mon/tests/core/test_database.py [new file with mode: 0644]
setup.py
tox.ini