Commit 0fd52fb authored Jan 2, 2020 Verified
File tree 4 files changed +19
-14
lines changed
bosh_tsdb_exporter/templates/bin
credhub_exporter/templates/bin
redis_exporter/templates/bin
shield_exporter/templates/bin
4 files changed +19
-14
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ case $1 in
21
21
pid_guard ${PIDFILE} " bosh_tsdb_exporter"
22
22
echo $$ > ${PIDFILE}
23
23
24
+ < % if_p(' bosh_tsdb_exporter.web.auth_password' ) do | auth_password| %>
25
+ export BOSH_TSDB_EXPORTER_WEB_AUTH_PASSWORD=" <%= auth_password %>"
26
+ < % end %>
27
+
24
28
exec bosh_tsdb_exporter \
25
29
< % if_p(' bosh_tsdb_exporter.log_format' ) do | log_format| %> \
26
30
--log.format=" <%= log_format %>" \
@@ -40,9 +44,6 @@ case $1 in
40
44
< % if_p(' bosh_tsdb_exporter.web.auth_username' ) do | auth_username| %> \
41
45
--web.auth.username=" <%= auth_username %>" \
42
46
< % end %> \
43
- < % if_p(' bosh_tsdb_exporter.web.auth_password' ) do | auth_password| %> \
44
- --web.auth.password=" <%= auth_password %>" \
45
- < % end %> \
46
47
< % if_p(' bosh_tsdb_exporter.web.tls_cert' , ' bosh_tsdb_exporter.web.tls_key' ) do %> \
47
48
--web.tls.cert_file=" /var/vcap/jobs/bosh_tsdb_exporter/config/web_tls_cert.pem" \
48
49
--web.tls.key_file=" /var/vcap/jobs/bosh_tsdb_exporter/config/web_tls_key.pem" \
Original file line number Diff line number Diff line change @@ -46,10 +46,14 @@ case $1 in
46
46
end
47
47
%>
48
48
49
+ export CREDHUB_EXPORTER_CLIENT_SECRET=" <%= p('credhub_exporter.credhub.client_secret') %>"
50
+ < % if_p(' credhub_exporter.web.auth_password' ) do | auth_password| %>
51
+ export CREDHUB_EXPORTER_WEB_AUTH_PASSWORD=" <%= auth_password %>"
52
+ < % end %>
53
+
49
54
exec credhub_exporter \
50
55
--credhub.api-url=" <%= url %>" \
51
56
--credhub.client-id=" <%= p('credhub_exporter.credhub.client_id') %>" \
52
- --credhub.client-secret=" <%= p('credhub_exporter.credhub.client_secret') %>" \
53
57
< % if not ca_certs.empty? %> \
54
58
--credhub.ca-certs-path=" /var/vcap/jobs/credhub_exporter/config/credhub_tls_ca_cert.pem" \
55
59
< % end %> \
@@ -83,9 +87,6 @@ case $1 in
83
87
< % if_p(' credhub_exporter.web.auth_username' ) do | auth_username| %> \
84
88
--web.auth.username=" <%= auth_username %>" \
85
89
< % end %> \
86
- < % if_p(' credhub_exporter.web.auth_password' ) do | auth_password| %> \
87
- --web.auth.password=" <%= auth_password %>" \
88
- < % end %> \
89
90
< % if_p(' credhub_exporter.web.tls_cert' , ' credhub_exporter.web.tls_key' ) do %> \
90
91
--web.tls.cert_file=" /var/vcap/jobs/credhub_exporter/config/web_tls_cert.pem" \
91
92
--web.tls.key_file=" /var/vcap/jobs/credhub_exporter/config/web_tls_key.pem" \
Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ case $1 in
21
21
pid_guard ${PIDFILE} " redis_exporter"
22
22
echo $$ > ${PIDFILE}
23
23
24
+ < % if_p(' redis_exporter.redis.password' ) do | password| %>
25
+ export REDIS_PASSWORD=" <%= password %>"
26
+ < % end %>
27
+
24
28
exec redis_exporter \
25
29
< % if_p(' redis_exporter.redis.check_keys' ) do | check_keys| %> \
26
30
-check-keys=" <%= check_keys %>" \
@@ -55,9 +59,6 @@ case $1 in
55
59
< % if_p(' redis_exporter.redis.address' ) do | address| %> \
56
60
-redis.addr=" <%= address %>" \
57
61
< % end %> \
58
- < % if_p(' redis_exporter.redis.password' ) do | password| %> \
59
- -redis.password=" <%= password %>" \
60
- < % end %> \
61
62
< % if_p(' redis_exporter.redis.script' ) do | script| %> \
62
63
-script=" /var/vcap/jobs/redis_exporter/config/script" \
63
64
< % end %> \
Original file line number Diff line number Diff line change @@ -42,10 +42,15 @@ case $1 in
42
42
export SHIELD_TRACE=" <%= trace %>"
43
43
< % end %>
44
44
45
+ export SHIELD_EXPORTER_SHIELD_PASSWORD=" <%= p('shield_exporter.shield.password') %>"
46
+
47
+ < % if_p(' shield_exporter.web.auth_password' ) do | auth_password| %>
48
+ export SHIELD_EXPORTER_WEB_AUTH_PASSWORD=" <%= auth_password %>"
49
+ < % end %>
50
+
45
51
exec shield_exporter \
46
52
--shield.backend_url=" <%= p('shield_exporter.shield.backend_url') %>" \
47
53
--shield.username=" <%= p('shield_exporter.shield.username') %>" \
48
- --shield.password=" <%= p('shield_exporter.shield.password') %>" \
49
54
< % if_p(' shield_exporter.filter.collectors' ) do | collectors| %> \
50
55
--filter.collectors=" <%= collectors %>" \
51
56
< % end %> \
@@ -66,9 +71,6 @@ case $1 in
66
71
< % if_p(' shield_exporter.web.auth_username' ) do | auth_username| %> \
67
72
--web.auth.username=" <%= auth_username %>" \
68
73
< % end %> \
69
- < % if_p(' shield_exporter.web.auth_password' ) do | auth_password| %> \
70
- --web.auth.password=" <%= auth_password %>" \
71
- < % end %> \
72
74
< % if_p(' shield_exporter.web.tls_cert' , ' shield_exporter.web.tls_key' ) do %> \
73
75
--web.tls.cert_file=" /var/vcap/jobs/shield_exporter/config/web_tls_cert.pem" \
74
76
--web.tls.key_file=" /var/vcap/jobs/shield_exporter/config/web_tls_key.pem" \
You can’t perform that action at this time.
0 commit comments