Skip to content
Snippets Groups Projects
Commit 5025c163 authored by Marin Jankovski's avatar Marin Jankovski
Browse files

Merge branch 'bjk/prometheus_flags' into 'master'

Add `web.listen-address` to Prometheus flags

See merge request !1261
parents 6fd732f3 57b0a78b
No related branches found
No related tags found
1 merge request!1261Add `web.listen-address` to Prometheus flags
......@@ -976,6 +976,7 @@ default['gitlab']['prometheus']['scrape_interval'] = 15
default['gitlab']['prometheus']['scrape_timeout'] = 15
default['gitlab']['prometheus']['listen_address'] = 'localhost:9090'
default['gitlab']['prometheus']['flags'] = {
'web.listen-address' => node['gitlab']['prometheus']['listen_address'],
'storage.local.path' => File.join(node['gitlab']['prometheus']['home'], 'data'),
'storage.local.memory-chunks' => '50000',
'storage.local.max-chunks-to-persist' => '40000',
......@@ -988,10 +989,11 @@ default['gitlab']['prometheus']['flags'] = {
default['gitlab']['node-exporter']['enable'] = false
default['gitlab']['node-exporter']['home'] = '/var/opt/gitlab/node-exporter'
default['gitlab']['node-exporter']['log_directory'] = '/var/log/gitlab/node-exporter'
default['gitlab']['node-exporter']['listen_address'] = 'localhost:9100'
default['gitlab']['node-exporter']['flags'] = {
'web.listen-address' => node['gitlab']['node-exporter']['listen_address'],
'collector.textfile.directory' => File.join(node['gitlab']['node-exporter']['home'], 'textfile_collector')
}
default['gitlab']['node-exporter']['listen_address'] = 'localhost:9100'
####
# Redis exporter
......
......@@ -26,7 +26,7 @@ describe PrometheusHelper do
it 'returns the correct default config string' do
chef_run.converge('gitlab::default')
expect(subject.flags('prometheus')).to eq(
'-storage.local.path=/var/opt/gitlab/prometheus/data -storage.local.memory-chunks=50000 -storage.local.max-chunks-to-persist=40000 -config.file=/var/opt/gitlab/prometheus/prometheus.yml')
'-web.listen-address=localhost:9090 -storage.local.path=/var/opt/gitlab/prometheus/data -storage.local.memory-chunks=50000 -storage.local.max-chunks-to-persist=40000 -config.file=/var/opt/gitlab/prometheus/prometheus.yml')
end
end
......@@ -38,7 +38,7 @@ describe PrometheusHelper do
chef_run.converge('gitlab::default')
expect(subject.flags('prometheus')).to eq(
'-storage.local.path=/fake/dir/data -storage.local.memory-chunks=50000 -storage.local.max-chunks-to-persist=40000 -config.file=/fake/dir/prometheus.yml')
'-web.listen-address=localhost:9090 -storage.local.path=/fake/dir/data -storage.local.memory-chunks=50000 -storage.local.max-chunks-to-persist=40000 -config.file=/fake/dir/prometheus.yml')
end
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment