Use default Sensu redact
authorMartin Mágr <mmagr@redhat.com>
Tue, 8 Nov 2016 09:04:41 +0000 (10:04 +0100)
committerMartin Mágr <mmagr@redhat.com>
Fri, 11 Nov 2016 10:16:02 +0000 (11:16 +0100)
By default sensu-puppet is overring default list of varibles which should
be redacted. This patch enables to configure redact list and uses default
value given by [1]. This patch also serves as a workaround until [2]
is merged in the module itself (or in case it won't get merged).

[1] https://sensuapp.org/docs/0.24/reference/clients.html
[2] https://github.com/sensu/sensu-puppet/pull/580

Closes-Bug: #1641080
Closes-Bug: rhbz#1392473
Change-Id: I21201f734d2fbf5f571091603126cf11cfdd8c40

puppet/services/monitoring/sensu-base.yaml

index d7350d0..e576232 100644 (file)
@@ -43,7 +43,19 @@ parameters:
     description: The RabbitMQ vhost used for monitoring purposes.
     type: string
     default: '/sensu'
-
+  SensuRedactVariables:
+    description: Variables from Sensu configuration, which have to be redacted.
+    type: array
+    default:
+      - password
+      - passwd
+      - pass
+      - api_key
+      - api_token
+      - access_key
+      - secret_key
+      - private_key
+      - secret
 
 outputs:
   role_data:
@@ -61,8 +73,7 @@ outputs:
         sensu::rabbitmq_ssl: {get_param: MonitoringRabbitUseSSL}
         sensu::rabbitmq_user: {get_param: MonitoringRabbitUserName}
         sensu::rabbitmq_vhost: {get_param: MonitoringRabbitVhost}
-        #sensu::redis_host: {get_param: MonitoringRedisHost}
-        #sensu::redis_password: {get_param: MonitoringRedisPassword}
+        sensu::redact: {get_param: SensuRedactVariables}
         sensu::sensu_plugin_provider: 'yum'
         sensu::sensu_plugin_name: 'rubygem-sensu-plugin'
         sensu::version: 'present'