Commit Graph

15 Commits

Author SHA1 Message Date
Witek Bedyk 811acd76c9 Remove project content on master branch
This is step 2b of repository deprecation process as described in [1].
Project deprecation has been anounced here [2].

[1] https://docs.openstack.org/project-team-guide/repository.html#step-2b-remove-project-content
[2] http://lists.openstack.org/pipermail/openstack-discuss/2020-August/016814.html

Depends-On: https://review.opendev.org/751983
Change-Id: I83bb2821d64a4dddd569ff9939aa78d271834f08
2020-09-15 10:12:44 +02:00
Ashwin Agate 3589dd0820 Set region in metric meta from config file
- set region in 'meta' section of aggregated
  metric from config file.

Change-Id: I82b00e9d88704835537cfd0285678b94bcc0f3a8
2018-03-27 16:47:46 -07:00
Ashwin Agate 022bd11a4d Switch to using Spark version 2.2.0
Following changes were required:

1.)
By default the pre-built distribution
for Spark 2.2.0 is compiled with Scala 2.11.
monasca-transform requires Spark compiled with
Scala 2.10 since we use spark streaming to
pull data from Kafka and the version of Kafka
is compatible with Scala 2.10.
The recommended way is to compile Spark
with Scala 2.10, but for purposes of devstack
plugin made changes to pull the required jars
from mvn directly.
(see SPARK_JARS and SPARK_JAVA_LIB variables in
settings)
All jars get moved to
<SPARK_HOME>/assembly/target/assembly/
target/scala_2.10/jars/
Note: <SPARK_HOME>/jars gets renamed
to <SPARK_HOME>/jars_original.
spark-submit defaults to assembly location
if <SPARK_HOME>/jars directory is missing.

2.) Updated start up scripts for spark
worker and spark master with a new env variable
SPARK_SCALA_VERSIOn=2.10. Also updated
PYTHONPATH variable to add new
py4j-0.10.4-src.zip file

3.) Some changes to adhere to deprecated pyspark
function calls which were removed in Spark 2.0

Change-Id: I8f8393bb91307d55f156b2ebf45225a16ae9d8f4
2017-08-21 11:18:22 -07:00
Ashwin Agate 8b1819b096 Enable monasca transform functional tests
Invoke functional tests as part of
devstack gate testing for monasca
transform.

Depends-on: I6a0a9d7067e991617fb645e4d68598522c1b95af

Change-Id: Ic9cc348e944c9c72916f81d14ed79b9bdf034c52
2017-05-01 08:23:59 -07:00
agateaaa 2da390414e Hourly aggregation account for early arrving metrics
With this change pre hourly processor which does the
hourly aggregation (second stage) and writes the
final aggregated metrics to metris topic in kafka
now accounts for any early arriving metrics.

This change along with two previous changes
to pre hourly processor that added
1.) configurable late metrics slack time
(https://review.openstack.org/#/c/394497/), and
2.) batch filtering
(https://review.openstack.org/#/c/363100/)
will make sure all late arriving or early
arriving metrics for an hour are aggregated
appropriately.

Also made improvement in MySQL offset to call
delete excess revisions only once.

Change-Id: I919cddf343821fe52ad6a1d4170362311f84c0e4
2017-04-17 15:29:34 -07:00
David C Kennedy 8a6e619f72 Populate the project id for kafka publish
This needs to be the admin project id so for devstack this needs to be written
to the configuration file once the users/projects etc are created and
identifiable.
Add a similar process to the refresh script.
Correct the configuration property name to 'project' rather than using the old
nomencature 'tenant'.

Change-Id: Ib9970ffacf5ee0f7f006722038a1db8024c1385e
2016-11-11 15:24:22 +00:00
Flint Calvin 0ea79c0305 Added aggregation results to application log
Made changes such that debug-level log entries are written to
the application log noting which aggregated metrics are submitted
during pre-hourly and hourly processing.

Change-Id: I64c6a18233614fe680aa0b084570ee7885f316e5
2016-09-23 18:24:20 +00:00
Flint Calvin bf2e42b3e0 Made changes to prevent multiple metrics in the same batch.
Change-Id: Iec9935c21d8b65bf79067d4a009859c898b75993
2016-08-31 18:18:25 +00:00
David C Kennedy b3f85e134e Change jdbc driver to drizzle
drizzle is BSD licensed compared with the GPLv2 mysql-connector from oracle.

Change-Id: Ie203a285cf031e5c29d6d7673fab437cfe8acca4
2016-07-08 18:29:24 +00:00
darfed 9c95206bac Corrected log file name
The log file was being duplicated at monasca-transform.log and
monasca_transform.log.  Fixed this to be set simply at
monasca-transform.log.

Change-Id: I6a63737c569b06a271e11b880675edadfbdcc250
2016-06-30 21:59:19 +01:00
Ashwin Agate 00b874a6b3 Two stage transformation
Breaking down the aggregation into two stages.

The first stage aggregates raw metrics frequently and is
implemented as a Spark Streaming job which
aggregates metrics at a configurable time interval
(defaults to 10 minutes) and writes the intermediate
aggregated data, or instance usage data
to new "metrics_pre_hourly" kafka topic.

The second stage is implemented
as a batch job using Spark Streaming createRDD
direct stream batch API, which is triggered by the
first stage only when first stage runs at the
top of the hour.

Also enhanced kafka offsets table to keep track
of offsets from two stages along with streaming
batch time, last time version row got updated
and revision number. By default it should keep
last 10 revisions to the offsets for each
application.

Change-Id: Ib2bf7df6b32ca27c89442a23283a89fea802d146
2016-06-28 13:47:50 +00:00
Flint Calvin d8e73f3bde Added several Swift aggregations (including a new usage
component for calculating rate changes).  Also fixed some pep8
issues.

Change-Id: I46685d39ace663595aa524f04d8d35a71c9432c3
2016-06-21 19:44:02 +00:00
David C Kennedy 02b23741a5 Removed spark-events from config
Allow spark to configure the location of spark-events.
Add spark events log config to spark-defaults in devstack plugin.
Move spark events logging to /var/log/spark/events for devstack plugin.
Set group permissions to ensure spark events log directory is group, but not
world writable.

Change-Id: I26aef23a9a801a02a20e14899e1c89b10556e4d4
2016-06-20 10:15:02 +01:00
David C Kennedy 05c36ab8e5 Allow configurable SPARK_HOME
Spark could feasibly be installed in any location so we should
allow SPARK_HOME to be specified in the conf file and that
value used in the spark-submit carried out in the transform
service invocation.

Change-Id: I4d25ccaa0e271eeb783d186666cdc8aaf131097c
2016-06-03 16:55:23 +01:00
Ashwin Agate 8f61dd95a9 monasca-transform initial commit
The monasca-transform is a new component in Monasca that
aggregates and transforms metrics.

monasca-transform is a Spark based data driven aggregation
engine which collects, groups and aggregates existing individual
Monasca metrics according to business requirements and publishes
new transformed (derived) metrics to the Monasca Kafka queue.

Since the new transformed metrics are published as any other
metric in Monasca, alarms can be set and triggered on the
transformed metric, just like any other metric.

Co-Authored-By: Flint Calvin <flint.calvin@hp.com>
Co-Authored-By: David Charles Kennedy <david.c.kennedy@hpe.com>
Co-Authored-By: Ashwin Agate <ashwin.agate@hp.com>

Implements: blueprint monasca-transform

Change-Id: I0e67ac7a4c9a5627ddaf698855df086d55a52d26
2016-05-26 00:10:37 +00:00