Benjamin Diaz [Mon, 12 Aug 2019 18:14:10 +0000 (15:14 -0300)]
Adds vrops_password to passwords to decrypt. Adds check of schema_version for backwards compatibility
Change-Id: I601b2eec9d84b0f2c33486b184c9ef279a583a24
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
diazb [Mon, 5 Aug 2019 15:47:07 +0000 (17:47 +0200)]
Merge "Change to nose2"
Benjamin Diaz [Mon, 29 Jul 2019 15:00:38 +0000 (12:00 -0300)]
Modifies MON to use mongodb directly for vim info and do vim pass decryption on demand
Change-Id: Id088f60bcbe7943661d088f949b55465c4939800
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
beierl [Wed, 31 Jul 2019 19:06:10 +0000 (15:06 -0400)]
Change to nose2
Use nose2 instead of stestr for running unit test as nose2 provides
junit-style xml output that can be reported in Jenkins to show test
pass/fail and trend history.
Change-Id: I3f57992ca7252bfd5403f7fdf7153d1faa232e71
Signed-off-by: beierl <mbeierl@vmware.com>
beierl [Thu, 25 Jul 2019 17:05:58 +0000 (13:05 -0400)]
Fixes VIO collection
Extract common vROPS code from vmware and vio collectors.
Add unit test coverage.
Remove unused code.
Improved vROPS collection to ask for current values only
instead of a date range.
Reduces number of calls to vROPS by asking for all metrics
for all VDUs at once.
BUG 796
Change-Id: I00ecd70c6d25f7c8982cbc633a28ab6f1ceb8cd6
Signed-off-by: beierl <mbeierl@vmware.com>
beierl [Mon, 15 Jul 2019 15:56:21 +0000 (11:56 -0400)]
Correct multiplier
Use the correct metric name when multiplying network
bytes sent/received.
Change-Id: I51391f5b0c55aeca5ecc4e2888d8365bf8d77cd7
Signed-off-by: beierl <mbeierl@vmware.com>
beierl [Fri, 12 Jul 2019 15:55:36 +0000 (11:55 -0400)]
Adds unit test coverage
Adds the coverage and stestr modules to tox so
that unit test code coverage reports can be
generated.
Change-Id: If67b31be5996de95e60ad73f63124e181ec955b5
Signed-off-by: beierl <mbeierl@vmware.com>
Benjamin Diaz [Fri, 12 Jul 2019 20:10:00 +0000 (17:10 -0300)]
Removes kafka check from healthcheck
bug 801
Change-Id: Ia966da925695c4e56f490820e627c36a02c81a81
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
diazb [Mon, 1 Jul 2019 20:30:30 +0000 (22:30 +0200)]
Merge "Reduce Resource Consumption"
beierl [Mon, 24 Jun 2019 19:51:33 +0000 (15:51 -0400)]
Reduce Resource Consumption
The vmware vnf collector requests a time series of data from
vROPS and then parses the whole block in order to retrieve the
most recent data element. The time frame for the request
should be limited to a sane value, such as 1 hour.
The look ups for items that do not change should be outside
of the loop for looking up the metrics.
Add more metrics to list of supported metrics.
Improve error handling.
BUG 784
Change-Id: Ie3cef457eaf657c18ba682e3c5d3abf40a759e69
Signed-off-by: beierl <mbeierl@vmware.com>
Benjamin Diaz [Wed, 26 Jun 2019 16:18:38 +0000 (13:18 -0300)]
Adds support for custom project and user domain names defined in vim config
bug 789
Change-Id: I77fe4a1f9fce4d1767560458de116f3431b35894
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Mon, 24 Jun 2019 18:50:38 +0000 (15:50 -0300)]
Changes insufficient data validation in alarms to account for metric results 0.0
Change-Id: Ia67e54ced6f5885ecd875c8a94529b9384fa46b2
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Wed, 12 Jun 2019 19:23:56 +0000 (16:23 -0300)]
Source Dockerfile now points to master for N2VC and osm-common allowing better dev testing
Change-Id: Iab1f4c0fc761efe9eb7d1aa3fe184fac604ad2a2
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
beierl [Wed, 19 Jun 2019 01:17:08 +0000 (21:17 -0400)]
Negotiate vCD Version
Request highest supported vCD version between MON and
vCD on setup and then continue to use v27.0 as the confirmed
tested version.
BUG 775
Change-Id: I04333fa0c915107fb432d799d3440fec711d95ec
Signed-off-by: beierl <mbeierl@vmware.com>
kasar [Tue, 18 Jun 2019 07:39:04 +0000 (00:39 -0700)]
Make vcloud api version compatible for different vCDs
Change-Id: Ic0b1f9e18b1711f73ec2b2c876e8211534caaa87
Signed-off-by: kasar <pkasar@vmware.com>
Benjamin Diaz [Wed, 12 Jun 2019 19:21:34 +0000 (16:21 -0300)]
Adds validation of vim-id in vdur in OpenStack base infra plugin
Prevents errors in vim_status collection when vm_status fails because vim-id
param missing in vdur.
Change-Id: I81f10ee19b7fa17e9cbbe4526c4d3be19eae1834
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Wed, 12 Jun 2019 19:18:55 +0000 (16:18 -0300)]
Replaces use of vdu_name for vdu_id and vdu_count_index in VCACollector
vdu_name param is no longer configured by LCM, causing issues during
collection of VCA metrics. To fix that, it has been replaced by currently
configured params: vdu_id and vdu_count_index, which are obtained from the
vdur.
Fixes bug 762
Change-Id: Ic8cc7e8572bfc6d78493fdceea32375c6f3a379e
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Wed, 5 Jun 2019 14:39:07 +0000 (11:39 -0300)]
Remove use of granularity and just retrieve last metric collected in OpenStack plugin
Change-Id: I8e52cda7bffb069a76b3834964100399a1c5746b
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Tue, 4 Jun 2019 13:55:18 +0000 (10:55 -0300)]
Changes openstack vim status check to use nova to allow non admin users in config
Change-Id: I1cdfeac879580a61e0211e869785c737763cd310
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Tue, 4 Jun 2019 13:35:03 +0000 (10:35 -0300)]
Modifies logic por determining metric backend in OpenStack plugin
Removes the need to access the service catalog directly.
Change-Id: I8c4f4bff4bbd236c3ec5a33e4f1abd38b8dcf010
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Tue, 4 Jun 2019 12:55:50 +0000 (09:55 -0300)]
Adds network interface name as tag in corresponding metric
Change-Id: I5c02d9a0582113319936772bd456b347828f7443
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Wed, 22 May 2019 19:28:28 +0000 (16:28 -0300)]
Fixes missing parent constructor call in openstack based infra collectors
Change-Id: Iaed814e59b81a664a4e2009ddf93d2edf2ad4502
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
diazb [Tue, 21 May 2019 18:24:09 +0000 (20:24 +0200)]
Merge "Added vio infra collector plugin"
kasar [Thu, 9 May 2019 07:55:30 +0000 (00:55 -0700)]
Added vio infra collector plugin
Change-Id: I709b2b358cb6aae1d07e01ba9a010cf8592ee735
Signed-off-by: kasar <pkasar@vmware.com>
Benjamin Diaz [Thu, 9 May 2019 19:40:38 +0000 (16:40 -0300)]
Adds handling of exception inside OpenStack collector
Change-Id: I9756bef185a3f9495a2ffe737bf5b8326a7e8af6
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
kasar [Fri, 19 Apr 2019 10:57:58 +0000 (03:57 -0700)]
Implemented VMware infra collector plugin
Change-Id: Id46ceb4955ef1c9e9b3389c1016e77a41b7fda1b
Signed-off-by: kasar <pkasar@vmware.com>
Benjamin Diaz [Fri, 26 Apr 2019 18:56:36 +0000 (15:56 -0300)]
Improves README
Change-Id: I4bf5d7d13822b20af8828b048c80092209dbf96d
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Tue, 16 Apr 2019 15:41:24 +0000 (12:41 -0300)]
Adds support for interface specific metrics in OpenStack plugin
Change-Id: I374a2c623a783215b2bbbdf8a69e600e3cb0f55d
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Fri, 12 Apr 2019 15:53:05 +0000 (12:53 -0300)]
Fixes error during alarm evaluation
Adds unit test
Change-Id: I2679210b7ce13f8ffd714183c220b617236003f8
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Wed, 10 Apr 2019 18:22:22 +0000 (15:22 -0300)]
Refactors code and adds unit tests
Change-Id: Ia14034679af8fc7e9ac91a1bfb766e4b99ec9e39
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Wed, 10 Apr 2019 20:06:19 +0000 (17:06 -0300)]
Adds pylint to tox test pipeline and fixes related errors
Change-Id: I0965b2818898d144a441208391f4c831fa28279b
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Thu, 4 Apr 2019 19:33:01 +0000 (16:33 -0300)]
Adds partial support for interface metrics in OpenStack plugin
Adds support for 'packets_in_dropped', 'packets_out_dropped', 'packets_received', 'packets_sent'
All of this metrics correspond to a sum of the metric for each interface in the vdu
Change-Id: I93b4fb760b927f98417ae2e65a27c0c2b3fb5b6f
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Wed, 6 Mar 2019 18:53:56 +0000 (15:53 -0300)]
Adds support for multiple alarm statuses
Requirement for Feature 6373
Change-Id: I5440c6cdd8e4b3ad12bcf8949871c67a74f31500
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Wed, 6 Mar 2019 18:54:37 +0000 (15:54 -0300)]
Fixes bug with VM status collection when VIM is down
Change-Id: I5f4c8ad9d074ede337aae53e4120088d0a307170
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Mon, 4 Mar 2019 14:03:43 +0000 (11:03 -0300)]
Adds collection of sdnc status metric
Adds plugin for ONOS controller
Change-Id: I0a885a4061a1cf9f99276d3befece078ac991d32
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Tue, 5 Mar 2019 17:28:32 +0000 (14:28 -0300)]
Adds support in entrypoint script for more complex mysql URI (+pool and query params)
Change-Id: I71445bbd489b905cb796eff294997a83e4d4cb91
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Fri, 8 Feb 2019 16:41:12 +0000 (13:41 -0300)]
Opens and closes db connections manually to avoid errors when using MySQL backend
Change-Id: I39f7d17069afa6aaceb643f9ecbfeb5595c4ed9a
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
lavado [Sat, 2 Mar 2019 02:48:04 +0000 (03:48 +0100)]
Merge "Added VIO metrics collector for vROPs"
kasar [Wed, 27 Feb 2019 06:34:41 +0000 (22:34 -0800)]
Added VIO metrics collector for vROPs
Change-Id: Ia044fd0c8dd600104df32c0c613e8725f34d0b3c
Signed-off-by: kasar <pkasar@vmware.com>
Benjamin Diaz [Mon, 25 Feb 2019 20:19:23 +0000 (17:19 -0300)]
Modifies MON to create database if using mysql URI
Removes default value of config in VimCredentials as MySQL does not support
it.
Adds pymysql as dependency.
Change-Id: Idb60029e027f8abad7de4617c12bde20aa66deab
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Fri, 22 Feb 2019 19:36:00 +0000 (16:36 -0300)]
Adds collection of VM status metric in OpenStack infra plugin
OpenStack infra collector plugin now collects metrics regarding VM status. It
iterates over vdus and using nova client gets info regarding status. Active
status translates to 1, anything else to 0.
Change-Id: Ia6e36a79a1d20cea07d5c7b3aa2af85b5c0e18d0
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Thu, 21 Feb 2019 19:24:56 +0000 (16:24 -0300)]
Adds migration engine for peewee ORM
Change-Id: I8829dd6e3858149fad9e1c37d773c78523d8c05f
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Tue, 19 Feb 2019 23:49:39 +0000 (20:49 -0300)]
Adds support for Ceilometer API metric collection
Change-Id: Id0e841c465ea5772d08413dacdf490a1fc109dff
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Wed, 6 Feb 2019 14:58:00 +0000 (11:58 -0300)]
Implements filebased config, config override through env vars, use of osm
common msg bus drivers
Change-Id: I2ae26408f03a7faf86d5621efda50df948c55951
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Mon, 4 Feb 2019 16:38:11 +0000 (13:38 -0300)]
Adds collection of vim status metric
Current support is only OpenStack. It tries to do a simple project list query
to check if VIM is up or not.
Change-Id: Ifec844d9514b6c676b065fee7cf785bdf2a2ea3d
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Mon, 28 Jan 2019 22:03:39 +0000 (19:03 -0300)]
Exits mon-evaluator process when encountered by a database exception
Database errors could mean database node failure. In this cases, the process
should exit so it could be automatically restarted (when handled by Docker Swarm, K8s, etc)
so it can obtain a new DB connection to an alive node.
Change-Id: I2575062d4bd23b3902b7c2ed14553d5201933002
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Mon, 28 Jan 2019 17:41:53 +0000 (14:41 -0300)]
Changes log level of config info to debug
Change-Id: I6fe866709cba1ae6310c54313269bac7a3b858d7
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
lavado [Tue, 5 Feb 2019 11:20:32 +0000 (12:20 +0100)]
Merge "Bug 598 Added support for vrops metric collection"
kasar [Wed, 30 Jan 2019 10:03:40 +0000 (02:03 -0800)]
Bug 598 Added support for vrops metric collection
Change-Id: I63dcff326e88f5b103b535981fdc06cb665904f1
Signed-off-by: kasar <pkasar@vmware.com>
Benjamin Diaz [Wed, 30 Jan 2019 16:01:54 +0000 (13:01 -0300)]
Adds decryption of passwords in vim config block
Change-Id: Iba064f9fb0dd38511b90410c5073fc13ce8cbeac
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Fri, 25 Jan 2019 19:31:55 +0000 (16:31 -0300)]
Increases delta of start_time when collecting OpenStack metrics
Change-Id: I5d51c26a7a80a407a6f892d542d44420c5832e02
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Wed, 28 Nov 2018 20:26:28 +0000 (17:26 -0300)]
Changes way of getting VCA application name corresponding to vdu and vnf
MON now searches _admin dictionary in nsr to get the application and
respective model name.
Change-Id: I0a034ff20bd41356da04b1a979839b92f93d26cd
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Mon, 26 Nov 2018 16:14:33 +0000 (13:14 -0300)]
Adds use of aiokafka in mon-server
Adds request timeout param for requests made to Prometheus
Adds use of response topics based on cor_id for alarm create/delete RPC
Change-Id: I5544d749d812e4e77ba913b543ccaa83542535d4
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Sat, 24 Nov 2018 03:05:11 +0000 (00:05 -0300)]
Adds support for vnf-metric in mon-evaluator
Change-Id: I81e69761448418625ca4076f6e3d3903c07c9f58
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Fri, 23 Nov 2018 21:36:28 +0000 (18:36 -0300)]
Fixes bug in collection of vnf-metric
Metrics declared in vnf-configuration block were not building correctly the juju
application name.
Change-Id: I952a0a2716edc7a0ea42ae1254ddc5047bcfff89
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Thu, 22 Nov 2018 20:27:35 +0000 (17:27 -0300)]
Fixes bugs regarding alarm deletion
Adds healthcheck script to be used in devops MON Dockerfile
Removes unused dependencies
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: Ia353c0ae9ee6a502667c04c96f1bc7f3e9337ced
almagia [Wed, 21 Nov 2018 16:22:07 +0000 (18:22 +0200)]
Revert "Readds plugins code and respective tests"
MON code optimisation on behalf of TSC
This reverts commit
6eda48bf7489c00fee4e1f276404ab82db23fd1d.
Change-Id: If697df74221be72aca9630630e64033f06ece473
Benjamin Diaz [Wed, 21 Nov 2018 13:52:05 +0000 (10:52 -0300)]
Readds plugins code and respective tests
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: I80ad624892b513818b1c989494884cc8047e377e
Benjamin Diaz [Tue, 20 Nov 2018 17:01:43 +0000 (14:01 -0300)]
Adds support for VNF metric based alarming
Adds collect_one method to juju collector, which is used by mon-evaluator to
evaluate alarms.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: I952280c3c8fa7496f0ea818b7a2ef7f3a091deea
Benjamin Diaz [Tue, 20 Nov 2018 14:56:43 +0000 (11:56 -0300)]
Refactors Prometheus exporter to group metrics correctly by name
Metric names were appearing duplicated in the exporter which generated issues
integrating with external tools such as Metricbeat and Kibana.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Tue, 20 Nov 2018 14:18:43 +0000 (11:18 -0300)]
Adds use of uri in connection to MongoDB instead of host and port
MON now uses a mongodb uri to connect to the database. This allows to use uris
that define either a single node db or a replica set, allowing for HA
scenarios.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
lavado [Tue, 20 Nov 2018 14:10:37 +0000 (16:10 +0200)]
Revert "Adds use of uri in connection to MongoDB instead of host and port"
This reverts commit
2fa92533799dcac2fbb47db2e06579e951294e6a.
Change-Id: Ief2dc8eb49577c9321b34f67efa5296edc281056
Benjamin Diaz [Tue, 20 Nov 2018 12:14:09 +0000 (09:14 -0300)]
Adds use of uri in connection to MongoDB instead of host and port
MON now uses a mongodb uri to connect to the database. This allows to use uris
that define either a single node db or a replica set, allowing for HA
scenarios.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Thu, 15 Nov 2018 13:27:12 +0000 (10:27 -0300)]
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
Benjamin Diaz [Thu, 15 Nov 2018 17:17:17 +0000 (14:17 -0300)]
Adds support for OSMMON_DATABASE_COMMONKEY to decrypt vim passwords
When vim_accounts msgs arrive in the Kafka bus, vim password is decrypted
and stored in the SQL database. The ideal scenario would be to store it
encrypted in the SQL DB and decrypt it on demand, but that would require
to store the schema_version, instantiate a DbMongo client everywhere it is
needed and a few other modifications that would severely pollute the codebase.
There needs to be a modification in the future on the osm_common side to make
this more doable.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Fri, 9 Nov 2018 20:52:08 +0000 (17:52 -0300)]
Changes way metrics are collected, removing the use of mon-proxy
Collector now collects vim metrics directly, without to send kafka msgs
to mon-proxy. Also a plugin/backend model has been implemented to ease
possible inclusions of other vims and tsbds in the future.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: I554a4f5e410a31ec70aa301c8aa819b1f03a3857
Benjamin Diaz [Wed, 31 Oct 2018 21:47:17 +0000 (14:47 -0700)]
Adds use of N2VC.FormatApplicationName in collector
MonCollector was using its own method for generating the juju app name.
It is been replaced by the N2VC one that is also used by LCM on deployment.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: Ic2a19825f055cc9b77404f8cf13152e5b6514214
Benjamin Diaz [Thu, 25 Oct 2018 17:54:35 +0000 (14:54 -0300)]
Adds OSMMON_VCA_USER and adds timeout and max.poll.interval to collector
consumer
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: Ib4db9874d69bd72d7267542d7a1f149cb44faf41
Mike Marchetti [Thu, 25 Oct 2018 13:06:21 +0000 (15:06 +0200)]
Merge "Set node to run on label docker"
Mike Marchetti [Thu, 25 Oct 2018 13:05:29 +0000 (09:05 -0400)]
Set node to run on label docker
Signed-off-by: Mike Marchetti <mmarchetti@sandvine.com>
Benjamin Diaz [Wed, 24 Oct 2018 19:52:42 +0000 (16:52 -0300)]
Adds time.sleep in Kafka validation loop
Adds max_poll_interval_ms=900000 in KafkaConsumer
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Tue, 23 Oct 2018 22:44:26 +0000 (19:44 -0300)]
Adds support for Juju metrics in collector
MON now collects VNF metrics defined in the VNFD in the metrics
section. This are obtained through N2VC.
Prometheus exporter now exposes this metrics.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Wed, 17 Oct 2018 17:44:36 +0000 (14:44 -0300)]
Adds use of CustomCollector in Prometheus exporter
Using a CustomCollector gives more control over the collection
process, which allows handling the removal of metrics when a NS
is deleted. Metrics now have a lifespan of a collection cycle, so
metrics of deleted vdus are now not visible in the exporter.
It also adds MonCollector class, which allows to abstract collection
logic and facilitates testing.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: Idfdb86c1ee9facd07187e6582954ae4cab32a5b4
Benjamin Diaz [Wed, 17 Oct 2018 16:20:16 +0000 (13:20 -0300)]
Aodh notifier now uses port defined in OS_NOTIFIER_URI
Aodh notifier was using always port 8662, instead of
getting the port defined in config. That has been fixed.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Wed, 17 Oct 2018 15:45:02 +0000 (12:45 -0300)]
Removes threading from common_consumer
It appears KafkaConsumer is not threadsafe, and it was generating
issues regarding the sending of heartbeats, causing kafka to kill
connections and causing coordinator dead errors.
Also removes heartbeat and session timeouts from consumer config.
They were generating conflicts with different default request
timeouts, and were in place to leverage issues regarding what is
mentioned above.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Fri, 12 Oct 2018 20:37:30 +0000 (17:37 -0300)]
Refactors codebase
Refactors duplicated code. Renames and reorganizes classes and methods.
Refactors tests.
Kafka message handling is removed from plugins. They now return response msg
dict and top level code handles publishing.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: I9826db9c4586d961f40af6cb194fc388fe855ae1
Benjamin Diaz [Mon, 8 Oct 2018 18:34:12 +0000 (15:34 -0300)]
Refactors code in OpenStack plugin
Continues refactor process on OpenStack metrics plugin.
Delegates exception handling to the main metric handler,
removing exception management from specific function calls.
Extracts response generation code into single method.
Adds 'status' param in message responses where it was missing.
Modifies tests accordingly.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: I6ad27734f37708f5ccbef13e322723225545db4e
Benjamin Diaz [Mon, 8 Oct 2018 18:31:14 +0000 (15:31 -0300)]
Fixes discrepancies and missing params in JSON models
Updates JSON models to be up to date with the params required by MON.
It constitutes a first step in the process of converting JSON models
to actual JSON Schema files.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: I9c3c0b69ee59e98805fb3f92f69d01f4fb142913
Benjamin Diaz [Mon, 8 Oct 2018 15:20:47 +0000 (12:20 -0300)]
Refactor common_db client code
Creates CommonDbClient which exposes methods to interact with the common
database, using osm_common module.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: I98babcdb892e86fdb14d04873b2bbbdabbdad23f
garciadeblas [Thu, 11 Oct 2018 08:32:46 +0000 (10:32 +0200)]
Revert "Revert "Removes POL code from MON repo""
This reverts commit
17ebe3794d0dc2712b1438f3fc5469ca10d752e1.
garciadeblas [Thu, 27 Sep 2018 08:28:43 +0000 (10:28 +0200)]
Added LICENSE file to root folder
Change-Id: Iebe424b8d0f05d12840ef0911fd3dd2ccc9887fe
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
Benjamin Diaz [Wed, 10 Oct 2018 19:50:44 +0000 (16:50 -0300)]
Adds MON Prometheus exporter
Adds a new MON component called mon-exporter, which collects
vdu infra metrics and exposes them through a webservice
by using prometheus_client. This webservice follows the Prometheus
exporter format so it can be integrated as a target so that
it polls metrics from there.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: Iaf2073879d884d0597aa8341f7b6fbbbc3d86e7e
Benjamin Diaz [Wed, 10 Oct 2018 15:26:50 +0000 (12:26 -0300)]
Sets repeat_action to True in OpenStack alarm creation
Alarms created in OpenStack will be configured to retrigger actions
during each evaluation cycle if they are still in alarm state.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Tue, 9 Oct 2018 23:22:04 +0000 (20:22 -0300)]
Increases Kafka session_timeout_ms and heartbeat_interval_ms
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Tue, 9 Oct 2018 21:16:25 +0000 (18:16 -0300)]
Adds OSMMON_KAFKA_LOG_LEVEL env var
Also removes unnecessary code from producer.py and moves
the consumer in common_consumer inside run method to ease
mocking during tests.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: Ib7e0b9423a7c7d2acdd12f1bcb75b20eb3a7ea72
Benjamin Diaz [Tue, 9 Oct 2018 17:01:54 +0000 (14:01 -0300)]
Adds OSMMON_LOG_LEVEL env var to config log level
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Tue, 9 Oct 2018 14:38:51 +0000 (11:38 -0300)]
Removes filter param from osm-common function calls
The filter argument was replaced to q_filter. Instead of
renaming the keyword arg, now functions are called using
only positional args.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Wed, 3 Oct 2018 15:37:09 +0000 (12:37 -0300)]
Adds support for SSL verification option in OpenStack Aodh plugin
Alarm management operations now consider the insecure option
in vim config.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: Id25a50a4f4a8db3775364b9639d1eb3926dab53a
Benjamin Diaz [Wed, 3 Oct 2018 14:38:18 +0000 (11:38 -0300)]
Replaces vdu-id-ref for name during VDU lookup
Vdus were being looked up using the vdu-id-ref param, which
corresponds to the name used in the vnfd to define that vdu.
That was not the intended behaviour, because that param is clearly
not unique. It has been replaced with the name param, which
is unique to each vdu record.
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
lavado [Mon, 1 Oct 2018 14:59:17 +0000 (09:59 -0500)]
Add version schedule pep440-git-full
Change-Id: I71a46fae027ba3faee2c5e0239a893ae75e8de25
Signed-off-by: lavado <glavado@whitestack.com>
Benjamin Diaz [Wed, 26 Sep 2018 20:30:55 +0000 (17:30 -0300)]
Adds postinst script to deb package to install dependencies
Adds stdeb.cfg file
Adds Makefile to handle package building
Modifies Jenkins Dockerfile to handle package building
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Change-Id: Ia285307ae2350c4a79eb9fd4efaf4abedd181104
kasar [Tue, 25 Sep 2018 06:51:30 +0000 (23:51 -0700)]
Modified vROPs install.sh to support python3 modules in MON
Change-Id: Ieabbf723025aff6460ca88c8e6ecdbf4eef30729
Signed-off-by: kasar <pkasar@vmware.com>
garciadeblas [Tue, 25 Sep 2018 14:16:31 +0000 (16:16 +0200)]
Revert "Removes POL code from MON repo"
This reverts commit
f315c3bf13c14d6a71c2909b4e4a8632f7df1c2e.
Benjamin Diaz [Wed, 19 Sep 2018 20:11:53 +0000 (17:11 -0300)]
Removes POL code from MON repo
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Tue, 18 Sep 2018 15:43:18 +0000 (12:43 -0300)]
Small fixes in Dockerfile, requirements and setup.py
Adds envs in Dockerfile
Adds version_command in setup.py
Cleans unused deps in requirements.txt
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
Benjamin Diaz [Fri, 14 Sep 2018 17:12:00 +0000 (14:12 -0300)]
Removes obsolete files
Removes OpenStack plugin tests logger config
Signed-off-by: Benjamin Diaz <bdiaz@whitestack.com>
lavado [Tue, 11 Sep 2018 16:17:49 +0000 (18:17 +0200)]
Merge "Removes call to .lower on vnf_member_index in alarm creation"
lavado [Tue, 11 Sep 2018 16:15:08 +0000 (18:15 +0200)]
Merge "Reduces kafka log level to WARN"
lavado [Tue, 11 Sep 2018 16:12:24 +0000 (18:12 +0200)]
Merge "Adds osm-common dependency"
lavado [Tue, 11 Sep 2018 16:04:40 +0000 (18:04 +0200)]
Merge "Adds exception throwing when Openstack services missing"