Set region in metric meta from config file
- set region in 'meta' section of aggregated metric from config file. Change-Id: I82b00e9d88704835537cfd0285678b94bcc0f3a8
This commit is contained in:
parent
867a68fbb5
commit
3589dd0820
|
@ -17,6 +17,7 @@ adapter = monasca_transform.messaging.adapter:KafkaMessageAdapter
|
|||
topic = metrics
|
||||
brokers = localhost:9092
|
||||
publish_kafka_project_id = d2cb21079930415a9f2a33588b9f2bb6
|
||||
publish_region = useast
|
||||
adapter_pre_hourly = monasca_transform.messaging.adapter:KafkaMessageAdapterPreHourly
|
||||
topic_pre_hourly = metrics_pre_hourly
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ class InsertComponent(Component):
|
|||
# proper/valid tenant ID, aggregated metrics don't get persisted
|
||||
# to the Monasca DB.
|
||||
meta_part["tenantId"] = cfg.CONF.messaging.publish_kafka_project_id
|
||||
meta_part["region"] = "useast"
|
||||
meta_part["region"] = cfg.CONF.messaging.publish_region
|
||||
|
||||
value_meta_part = {"record_count": instance_usage_dict.get(
|
||||
"record_count", 0),
|
||||
|
|
|
@ -84,6 +84,9 @@ class ConfigInitializer(object):
|
|||
cfg.StrOpt('publish_kafka_project_id',
|
||||
default='111111',
|
||||
help='publish aggregated metrics tenant'),
|
||||
cfg.StrOpt('publish_region',
|
||||
default='useast',
|
||||
help='publish aggregated metrics region'),
|
||||
cfg.StrOpt('adapter_pre_hourly',
|
||||
default='monasca_transform.messaging.adapter:'
|
||||
'KafkaMessageAdapterPreHourly',
|
||||
|
|
Loading…
Reference in New Issue