From cfc86645c99208323174014121a82cbb0d82d2dd Mon Sep 17 00:00:00 2001 From: Doug Szumski Date: Wed, 24 Oct 2018 10:58:27 +0000 Subject: [PATCH] Collect StatsD metrics from Monasca services Some Monasca services support sending StatsD metrics to allow monitoring those services. This commit connects these services to the StatsD service provided by the Monasca Agent. Partially-Implements: blueprint monasca-roles Change-Id: I1da376384a31b89fea1b8a6f907aea35282909a4 --- .../templates/monasca-log-api/log-api.conf.j2 | 4 +- .../monasca-notification/notification.conf.j2 | 3 +- .../monasca-thresh/thresh-config.yml.j2 | 52 ++++++++++++++++--- 3 files changed, 48 insertions(+), 11 deletions(-) diff --git a/ansible/roles/monasca/templates/monasca-log-api/log-api.conf.j2 b/ansible/roles/monasca/templates/monasca-log-api/log-api.conf.j2 index 8b9e68ba40..91e3ef6e6c 100644 --- a/ansible/roles/monasca/templates/monasca-log-api/log-api.conf.j2 +++ b/ansible/roles/monasca/templates/monasca-log-api/log-api.conf.j2 @@ -17,8 +17,8 @@ topics = {{ monasca_raw_logs_topic }} kafka_url = {{ monasca_kafka_servers }} [monitoring] -# TODO(dszumski): Deploy statsd to use this -enable = false +statsd_buffer = 30 +statsd_port = {{ monasca_agent_statsd_port }} [roles_middleware] path = /v2.0/log, /v3.0/logs diff --git a/ansible/roles/monasca/templates/monasca-notification/notification.conf.j2 b/ansible/roles/monasca/templates/monasca-notification/notification.conf.j2 index c1675a77d9..ce934eea12 100644 --- a/ansible/roles/monasca/templates/monasca-notification/notification.conf.j2 +++ b/ansible/roles/monasca/templates/monasca-notification/notification.conf.j2 @@ -18,8 +18,7 @@ passwd = {{ monasca_database_password }} db = {{ monasca_database_name }} [statsd] -# TODO(dszumski): Enable when statsd is deployed -enable = false +port = {{ monasca_agent_statsd_port }} [zookeeper] url = {{ monasca_zookeeper_servers }} diff --git a/ansible/roles/monasca/templates/monasca-thresh/thresh-config.yml.j2 b/ansible/roles/monasca/templates/monasca-thresh/thresh-config.yml.j2 index 01b80f772f..2d70023fc5 100644 --- a/ansible/roles/monasca/templates/monasca-thresh/thresh-config.yml.j2 +++ b/ansible/roles/monasca/templates/monasca-thresh/thresh-config.yml.j2 @@ -18,13 +18,51 @@ metricSpoutThreads: 2 metricSpoutTasks: 2 -#statsdConfig: -# host: "127.0.0.1" -# port: %MONASCA_STATSD_PORT% -# prefix: monasca.storm. -# dimensions: !!map -# service : monitoring -# component : storm +statsdConfig: + host: 127.0.0.1 + port: {{ monasca_agent_statsd_port }} + debugmetrics: {{ monasca_logging_debug }} + dimensions: !!map + service : monitoring + component : storm + whitelist: !!seq + - aggregation-bolt.execute-count.filtering-bolt_alarm-creation-stream + - aggregation-bolt.execute-count.filtering-bolt_default + - aggregation-bolt.execute-count.system_tick + - filtering-bolt.execute-count.event-bolt_metric-alarm-events + - filtering-bolt.execute-count.metrics-spout_default + - thresholding-bolt.execute-count.aggregation-bolt_default + - thresholding-bolt.execute-count.event-bolt_alarm-definition-events + - system.memory_heap.committedBytes + - system.memory_nonHeap.committedBytes + - system.newWorkerEvent + - system.startTimeSecs + - system.GC_ConcurrentMarkSweep.timeMs + metricmap: !!map + aggregation-bolt.execute-count.filtering-bolt_alarm-creation-stream : + monasca.threshold.aggregation-bolt.execute-count.filtering-bolt_alarm-creation-stream + aggregation-bolt.execute-count.filtering-bolt_default : + monasca.threshold.aggregation-bolt.execute-count.filtering-bolt_default + aggregation-bolt.execute-count.system_tick : + monasca.threshold.aggregation-bolt.execute-count.system_tick + filtering-bolt.execute-count.event-bolt_metric-alarm-events : + monasca.threshold.filtering-bolt.execute-count.event-bolt_metric-alarm-events + filtering-bolt.execute-count.metrics-spout_default : + monasca.threshold.filtering-bolt.execute-count.metrics-spout_default + thresholding-bolt.execute-count.aggregation-bolt_default : + monasca.threshold.thresholding-bolt.execute-count.aggregation-bolt_default + thresholding-bolt.execute-count.event-bolt_alarm-definition-events : + monasca.threshold.thresholding-bolt.execute-count.event-bolt_alarm-definition-events + system.memory_heap.committedBytes : + monasca.threshold.system.memory_heap.committedBytes + system.memory_nonHeap.committedBytes : + monasca.threshold.system.memory_nonHeap.committedBytes + system.newWorkerEvent : + monasca.threshold.system.newWorkerEvent + system.startTimeSecs : + monasca.threshold.system.startTimeSecs + system.GC_ConcurrentMarkSweep.timeMs : + monasca.threshold.system.GC_ConcurrentMarkSweep.timeMs metricSpoutConfig: