aboutsummaryrefslogtreecommitdiffstats
path: root/sources/hv-collector-core
AgeCommit message (Collapse)AuthorFilesLines
2019-03-20Remove environment variables and program argumentsJakub Dudycz9-67/+80
- Move all command line program arguments to json file. - Reorganize configuration classes and the way they are passed through application - Implement HV VES configuration stream - Create concrete configuration from partial one - Modify main HV-VES server starting pipeline Change-Id: I6cf874b6904ed768e4820b8132f5f760299c929e Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com> Issue-ID: DCAEGEN2-1340
2019-03-14Extract HV-VES configuration moduleFilip Krzywka28-298/+41
To avoid cyclic dependency between "modules trio" configuration-core-ssl some classes from core.model were also extracted. Change-Id: Ie11029ae3500964f67f4d72279ddd68cdb2a1f0c Issue-ID: DCAEGEN2-1332 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
2019-03-11Use CBS by means of SDK in place of ConsulFilip Krzywka10-216/+339
- changed IO creation in main to fix error with too early calling changeState method on collector HealthState - increased coverage a little with few tests - corrected coverage-report pom file to include new modules - temporarily changed to 1.1.4-SNAPSHOT version of sdk due to need of new version of CBSLookup Change-Id: Ic73b46cf881ab4fabf52bef0327b09082aa90dc6 Issue-ID: DCAEGEN2-1302 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
2019-03-11Merge "Assure coverage is checked for all modules"Piotr Wielebski1-4/+0
2019-03-11Assure coverage is checked for all modulesPiotr Jaszczyk1-4/+0
Change-Id: Ia9bb6cef9154d64cfa45455e38c9fe7603a64c74 Issue-ID: DCAEGEN2-1328 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
2019-03-11Added JSON config file format utilspbiniek1-4/+4
Change-Id: I97fdd72324495b4c838e44c306cbcacac6b11bc1 Signed-off-by: Pawel Biniek <pawel.biniek@nokia.com> Issue-ID: DCAEGEN2-1323
2019-02-19Use SDK/SSL in HV-VESPiotr Jaszczyk3-7/+5
Issue-ID: DCAEGEN2-1226 Change-Id: I7cfc09001f7315c1b6f4fcf150ad631630c810ef Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
2019-01-29Correct totalConnections metricFilip Krzywka2-67/+137
In previous implementation performed healthcheck on container was counted as client connection, because metric was notified for every TCP channel opened. This was making this metric less useful (to avoid saying "useless" ;) ). - refactored NettyTcpServer trying to extract functions with logic not so strictly related to HV-VES behavior. This also resolves discussions in https://gerrit.onap.org/r/#/c/76274/ - some renames and methods splitting was made in attempt to make code more readable - hv-ves should not count connections from either "127.0.0.1" or "localhost" to his `totalConnections` metric - removed redundant logging by adding new methods to Logger Change-Id: I5f10dac8dac82eafd3b0de92a7ec43f2c23b8c16 Issue-ID: DCAEGEN2-1119 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
2019-01-29Change Health Status when shutting downPiotr Jaszczyk1-2/+2
Change-Id: I889c934f29d34c1211c6e07f18cb16bbe35d711f Issue-ID: DCAEGEN2-1065 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
2019-01-25Mitigation of unexpected hv-ves shutdownkjaniak1-2/+6
Change-Id: I96183e2358ac10457568d223f37d69c61dfd252d Issue-ID: DCAEGEN2-1117 Signed-off-by: kjaniak <kornel.janiak@nokia.com>
2019-01-22Close KafkaSender when handling SIGINTPiotr Jaszczyk7-15/+46
Closing KafkaSender should result in flushing any pending messages. Change-Id: Ib251f5ca3527266831189df542784cc17173d8dc Issue-ID: DCAEGEN2-1065 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
2019-01-10Merge "Align kafka properties with VESHV_MAX_PAYLOAD_SIZE"Piotr Jaszczyk3-3/+17
2019-01-10Align kafka properties with VESHV_MAX_PAYLOAD_SIZEkjaniak3-3/+17
Change-Id: I5cbfb8a982cd1efbdf58c2c0aed71f064f7b7cb8 Issue-ID: DCAEGEN2-1066 Signed-off-by: kjaniak <kornel.janiak@nokia.com>
2019-01-08Merge Healthcheck descriptionsFilip Krzywka3-5/+3
- start new API server for healthchecks in xNF simulator on port 6063 - changed DCAE App default port to 6064 - switched to InetSocketAddresses usage in components configurations Change-Id: I398f9ea6e887f78d88286ed717d310d3297b1571 Issue-ID: DCAEGEN2-1063 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
2018-12-21Merge "Enable setting log level from command line"Piotr Jaszczyk1-8/+12
2018-12-21Enable setting log level from command lineIzabela Zawadzka1-8/+12
Change-Id: I8397e0134d254cd5b6be79ed2b847ce265fc775c Signed-off-by: Izabela Zawadzka <izabela.zawadzka@nokia.com> Issue-ID: DCAEGEN2-1045
2018-12-21Fix misleading logs when obtaining consul configJakub Dudycz2-22/+49
Change-Id: Idaccc954a0fdc03c6336e6f126f8c7e99010956d Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com> Issue-ID: DCAEGEN2-1048
2018-12-20There should be one KafkaSender per configurationPiotr Jaszczyk15-82/+233
We should keep only one instance of KafkaSender per instance. However, as the configuration might be changed (Consul update) it cannot be a strict singleton. Hence there should be 1to1 relationship beetween ConsulConfiguration and KafkaSender. Change-Id: Ie168028c4427741254b8c2fe316b82cca72d7668 Issue-ID: DCAEGEN2-1047 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
2018-12-18Add metrics for active connections countJakub Dudycz3-29/+31
* Fix and refactor gauges tests in MicrometerMetricsTests as they were not executing * Fix client disconnection handler in NettyTcpServer * Add metrics gauge and counters required to measure active connections Change-Id: I5620d398525c6859679cd5a49dc55a9fefd8b592 Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com> Issue-ID: DCAEGEN2-1041
2018-12-18Add metric for rejected clients countFilip Krzywka4-2/+31
- renamed few counters to be more verbose about what they count - removed not needed 'total' suffix in metrics name Change-Id: I6be0201e5f39f1298706c536b12410413d49df19 Issue-ID: DCAEGEN2-1043 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
2018-12-17Metric: Processing timePiotr Jaszczyk9-42/+46
Add processing time metric measured as difference between "sent to DMaaP" and "WTP decoded" events. Change-Id: I73bb665145019fcca5ae36e2199ed0e1cc088fdf Issue-ID: DCAEGEN2-1036 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
2018-12-17Merge "Add metrics for dropped messages"Piotr Jaszczyk3-4/+50
2018-12-17Add metrics for dropped messagesJakub Dudycz3-4/+50
Add counters for messages dropped due to validation or undefined routing Slight refactoring Change-Id: Ibe4e38445e81babc745d7a7d95356910845293ce Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com> Issue-ID: DCAEGEN2-1037
2018-12-14Use SHA-256 for detecting changes in Consul configPiotr Jaszczyk1-7/+11
String.hashCode is probably not strong enough and was not designed to be used in that way. Change-Id: Iecb75dcdc742d1673b81cbaa213cff69297ff6f4 Issue-ID: DCAEGEN2-1034 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
2018-12-14Add all required and reasonable MDCsPiotr Jaszczyk13-69/+367
Change-Id: I34beb32a7c53da97c6945ec8d0022ac37059b7c5 Issue-ID: DCAEGEN2-670 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
2018-12-14Merge "Don't escape in component tests"Piotr Jaszczyk1-1/+1
2018-12-13Merge "Log details about header validation failure"Piotr Jaszczyk4-50/+197
2018-12-13Log details about header validation failureIzabela Zawadzka4-50/+197
Change-Id: I836dcbee47bc2c2bfecc9486f6f8344a5bd8cd65 Signed-off-by: Izabela Zawadzka <izabela.zawadzka@nokia.com> Issue-ID: DCAEGEN2-1019
2018-12-13Don't escape in component testsFilip Krzywka1-1/+1
We want our test output to be readable, so we should not escape \n or \t in console output. Change-Id: I4c673760ea0cd55007b47b7490036c0693887eda Issue-ID: DCAEGEN2-1026 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
2018-12-13Merge "Align logback configuration"Piotr Jaszczyk1-27/+35
2018-12-13Align logback configurationFilip Krzywka1-27/+35
- followed current logging guidelines in regard of format - in simulators currently very simple (minimalistic) pattern will be used as they do not contain any MDCs or Markers - in main logbacks included three patterns varying on verbosity and human-readability (for production full logging, ie. ONAP_LOG_PATTERN, should be used) - removed logback-test from domain module as it was not enabled anyway (no dependency on logback) and we should never have need for logging in this module - made logback-tests consistent (using simple pattern) except in component-tests, where it might be useful to have more verbose output (including MDCs etc.) Change-Id: Ifd851d12a77d5303b836a25c0e168e18a3a804e9 Issue-ID: DCAEGEN2-1026 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
2018-12-13Add of adapter fun with param ClientContextkjaniak8-27/+61
Change-Id: Ib9ac6ab16c51ddf40ae849f4ce04ab7e25609f56 Issue-ID: DCAEGEN2-1031 Signed-off-by: kjaniak <kornel.janiak@nokia.com>
2018-12-10Add Markers logsFilip Krzywka3-6/+10
Change-Id: I5d3c9e1e4659782719e4847c5bcedbca39c173a0 Issue-ID: DCAEGEN2-669 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
2018-12-10Add log diagnostic contextPiotr Jaszczyk16-110/+191
As it's not trivial to use MDC directly from logging framework in reactive application, we need to do some work manually. The approach proposed is an explicit MDC handling, which means that context is kept as an object created after establishing client connection. Next, new instance of HvVesCollector (and its dependencies) is created. Every object is propagated with ClientContext so it can use it when calling logger methods. In the future ClientContext might be used to support other use-cases, ie. per-topic access control. As a by-product I had to refactor our Logger wrapper, too. It already had too many functions and after adding MDC number would be doubled. Change-Id: I9c5d3f5e1d1be1db66d28d292eb0e1c38d8d0ffe Issue-ID: DCAEGEN2-671 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
2018-12-05Enhance of logging in test partkjaniak1-5/+0
Change-Id: Ibdec0ac5cead7e46ada4c32983b9ccf962df703b Issue-ID: DCAEGEN2-1004 Signed-off-by: kjaniak <kornel.janiak@nokia.com>
2018-12-04Harmonize logging and add new logsFilip Krzywka10-58/+180
- corrected docker-compose consul url Change-Id: I78df868e0dd51008ef39d01553e6a0a3b8273a54 Issue-ID: DCAEGEN2-1003 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
2018-11-29Custom detekt rule for logger usage checkPiotr Jaszczyk33-0/+2333
Check if logger invocations don't use unoptimal invocations, eg. concatenation `debug("a=" + a)` instead of lambda use `debug {"a=" + a}` Unfortunately to avoid defining dependencies in many places and having circural dependencies it was necessarry to reorganize the maven module structure. The goal was to have `sources` module with production code and `build` module with build-time tooling (detekt rules among them). Issue-ID: DCAEGEN2-1002 Change-Id: I36e677b98972aaae6905d722597cbce5e863d201 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>