diff --git a/monasca_notification/plugins/email_notifier.py b/monasca_notification/plugins/email_notifier.py index 73fa7b0..edb341f 100644 --- a/monasca_notification/plugins/email_notifier.py +++ b/monasca_notification/plugins/email_notifier.py @@ -259,7 +259,7 @@ class EmailNotifier(abstract_notifier.AbstractNotifier): dimensions = metric['dimensions'] for key, value in dimensions.items(): - metric_query += "&dim_%s=%s" % (key, value) + metric_query += "&%s=%s" % (key, value) # Show the graph within a range of ten minutes before and after the alarm occurred. offset = 600000 diff --git a/tests/test_email_notification.py b/tests/test_email_notification.py index 7a79a7c..c56a01e 100644 --- a/tests/test_email_notification.py +++ b/tests/test_email_notification.py @@ -475,7 +475,7 @@ class TestEmail(base.PluginTestCase): # Then the following link to Grafana (including the metric info and timestamp) is expected. expected_url = "http://127.0.0.1:3000/dashboard/script/drilldown.js" \ - "?metric=cpu.percent&dim_hostname=foo1&dim_service=bar1" \ + "?metric=cpu.percent&hostname=foo1&service=bar1" \ "&from=%s&to=%s" % (expected_from_ms, expected_to_ms) self._assert_equal_urls(expected_url, result_url)