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