Update the smoke test to use the new metric name

Some of the metrics were renamed in the agent.  Updating the smoke test to match.

Change-Id: If07e404d6d9ab23cfa257e7396a788593fa4e42c
This commit is contained in:
gary-hessler 2014-10-21 17:36:58 -06:00
parent f43decfe9e
commit fbe0e6f396

View File

@ -139,7 +139,7 @@ def smoke_test(mail_host, metric_host):
notification_name = 'Monasca Smoke Test'
notification_email_addr = 'root@' + mail_host
alarm_definition_name = 'high cpu and load'
metric_name = 'cpu.load_avg_1_min'
metric_name = 'load.avg_1_min'
metric_dimensions = {'hostname': metric_host}
cleanup(notification_name, alarm_definition_name)
@ -162,7 +162,7 @@ def smoke_test(mail_host, metric_host):
# Create Alarm through CLI
expression = 'max(cpu.system_perc) > 0 and ' + \
'max(cpu.load_avg_1_min{hostname=' + metric_host + '}) > 0'
'max(load.avg_1_min{hostname=' + metric_host + '}) > 0'
description = 'System CPU Utilization exceeds 1% and ' + \
'Load exceeds 3 per measurement period'
alarm_definition_id = cli_wrapper.create_alarm_definition(alarm_definition_name, expression,