Commit a07b42e 1 parent 23961a3 commit a07b42e Copy full SHA for a07b42e
File tree 1 file changed +3
-3
lines changed
cookbooks/postgresql/recipes
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 17
17
# limitations under the License.
18
18
#
19
19
20
+ require "uri"
21
+
20
22
include_recipe "apt::postgresql"
21
23
include_recipe "munin"
22
24
include_recipe "prometheus"
131
133
labels "cluster" => name
132
134
scrape_interval "1m"
133
135
scrape_timeout "1m"
134
- user "postgres"
135
136
options %w[
136
137
--collector.database_wraparound
137
138
--collector.long_running_transactions
140
141
--collector.stat_wal_receiver
141
142
--collector.statio_user_indexes
142
143
]
143
- environment "DATA_SOURCE_NAME" => "postgres:///#{ prometheus_database } ?host=/run/postgresql&port=#{ details [ :port ] } "
144
+ environment "DATA_SOURCE_NAME" => "postgres:///#{ prometheus_database } ?host=/run/postgresql&port=#{ details [ :port ] } &user=prometheus&password= #{ URI . encode_www_form_component ( passwords [ 'prometheus' ] ) } "
144
145
restrict_address_families "AF_UNIX"
145
- remove_ipc false
146
146
subscribes :restart , "template[/etc/prometheus/exporters/postgres_queries.yml]"
147
147
end
148
148
You can’t perform that action at this time.
0 commit comments