Skip to content

Commit 987063b

Browse files
committed
Update prometheus job properties
1 parent 04a91bb commit 987063b

File tree

4 files changed

+19
-62
lines changed

4 files changed

+19
-62
lines changed

ci/release_notes.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### Breaking changes
44

55
* The grafana password must be explicitelly set (it does not default to `admin` anymore)
6+
* Prometheus properties `prometheus.storage.remote.graphite*`, `prometheus.storage.remote.influxdb*` and `prometheus.storage.remote.opentsdb*` have been removed in favor of the new `prometheus.remote_write` configuration.
67

78
### Fixes
89

jobs/prometheus/spec

+7-25
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,12 @@ properties:
3737
description: "Array of paths to Prometheus rule files"
3838
prometheus.scrape_configs:
3939
description: "Array of scrape configurations"
40+
prometheus.alerting:
41+
description: "Alerting configuration"
4042
prometheus.remote_write:
41-
description: "Remote storage configuration"
43+
description: "Remote write storage configuration"
44+
prometheus.remote_read:
45+
description: "Remote read storage configuration"
4246

4347
prometheus.alertmanager.notification_queue_capacity:
4448
description: "The capacity of the queue for pending alert manager notifications"
@@ -70,10 +74,6 @@ properties:
7074
description: "The size in bytes for the label name to label values index cache"
7175
prometheus.storage.local.index_cache_size.label_pair_to_fingerprints:
7276
description: "The size in bytes for the label pair to fingerprints index cache"
73-
prometheus.storage.local.max_chunks_to_persist:
74-
description: "How many chunks can be waiting for persistence before sample ingestion will be throttled "
75-
prometheus.storage.local.memory_chunks:
76-
description: "How many chunks to keep in memory"
7777
prometheus.storage.local.num_fingerprint_mutexes:
7878
description: "The number of mutexes used for fingerprint locking"
7979
prometheus.storage.local.pedantic_checks:
@@ -84,26 +84,8 @@ properties:
8484
description: "If 0 or smaller, truncation will be performed even for a single dropped chunk, while 1 or larger will effectively prevent any truncation"
8585
prometheus.storage.local.series_sync_strategy:
8686
description: "When to sync series files after modification"
87-
prometheus.storage.remote.graphite.address:
88-
description: "The host:port of the remote Graphite server to send samples to. None, if empty"
89-
prometheus.storage.remote.graphite.prefix:
90-
description: "The prefix to prepend to all metrics exported to Graphite. None, if empty"
91-
prometheus.storage.remote.graphite.transport:
92-
description: "Transport protocol to use to communicate with Graphite"
93-
prometheus.storage.remote.influxdb.url:
94-
description: "The URL of the remote InfluxDB server to send samples to. None, if empty"
95-
prometheus.storage.remote.influxdb.database:
96-
description: "The name of the database to use for storing samples in InfluxDB"
97-
prometheus.storage.remote.influxdb.retention_policy:
98-
description: "The InfluxDB retention policy to use"
99-
prometheus.storage.remote.influxdb.username:
100-
description: "The username to use when sending samples to InfluxDB"
101-
prometheus.storage.remote.influxdb.password:
102-
description: "The password to use when sending samples to InfluxDB"
103-
prometheus.storage.remote.opentsdb.url:
104-
description: "The URL of the remote OpenTSDB server to send samples to. None, if empty"
105-
prometheus.storage.remote.timeout:
106-
description: "The timeout to use when sending samples to the remote storage"
87+
prometheus.storage.local.target_heap_size:
88+
description: "The metrics storage attempts to limit its own memory usage such that the total heap size approaches this value"
10789

10890
prometheus.web.console.libraries:
10991
description: "Path to the console library directory"

jobs/prometheus/templates/bin/prometheus_ctl

+2-36
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ case $1 in
2121

2222
ulimit -n 65536
2323

24-
<% if_p('prometheus.storage.remote.influxdb.password') do |influxdb_password| %> \
25-
export INFLUXDB_PW="<%= influxdb_password %>"
26-
<% end %> \
27-
2824
exec prometheus \
2925
-config.file=/var/vcap/jobs/prometheus/config/prometheus.yml \
3026
<% if_p('prometheus.alertmanager.notification_queue_capacity') do |notification_queue_capacity| %> \
@@ -78,12 +74,6 @@ case $1 in
7874
<% if_p('prometheus.storage.local.index_cache_size.label_pair_to_fingerprints') do |label_pair_to_fingerprints| %> \
7975
-storage.local.index-cache-size.label-pair-to-fingerprints="<%= label_pair_to_fingerprints %>" \
8076
<% end %> \
81-
<% if_p('prometheus.storage.local.max_chunks_to_persist') do |max_chunks_to_persist| %> \
82-
-storage.local.max-chunks-to-persist="<%= max_chunks_to_persist %>" \
83-
<% end %> \
84-
<% if_p('prometheus.storage.local.memory_chunks') do |memory_chunks| %> \
85-
-storage.local.memory-chunks="<%= memory_chunks %>" \
86-
<% end %> \
8777
<% if_p('prometheus.storage.local.num_fingerprint_mutexes') do |num_fingerprint_mutexes| %> \
8878
-storage.local.num-fingerprint-mutexes="<%= num_fingerprint_mutexes %>" \
8979
<% end %> \
@@ -100,32 +90,8 @@ case $1 in
10090
<% if_p('prometheus.storage.local.series_sync_strategy') do |series_sync_strategy| %> \
10191
-storage.local.series-sync-strategy="<%= series_sync_strategy %>" \
10292
<% end %> \
103-
<% if_p('prometheus.storage.remote.graphite.address') do |graphite_address| %> \
104-
-storage.remote.graphite-address="<%= graphite_address %>" \
105-
<% end %> \
106-
<% if_p('prometheus.storage.remote.graphite.prefix') do |graphite_prefix| %> \
107-
-storage.remote.graphite-prefix="<%= graphite_prefix %>" \
108-
<% end %> \
109-
<% if_p('prometheus.storage.remote.graphite.transport') do |graphite_transport| %> \
110-
-storage.remote.graphite-transport="<%= graphite_transport %>" \
111-
<% end %> \
112-
<% if_p('prometheus.storage.remote.influxdb.url') do |influxdb_url| %> \
113-
-storage.remote.influxdb-url="<%= influxdb_url %>" \
114-
<% end %> \
115-
<% if_p('prometheus.storage.remote.influxdb.database') do |influxdb_database| %> \
116-
-storage.remote.influxdb.database="<%= influxdb_database %>" \
117-
<% end %> \
118-
<% if_p('prometheus.storage.remote.influxdb.retention_policy') do |influxdb_retention_policy| %> \
119-
-storage.remote.influxdb.retention-policy="<%= influxdb_retention_policy %>" \
120-
<% end %> \
121-
<% if_p('prometheus.storage.remote.influxdb.username') do |influxdb_username| %> \
122-
-storage.remote.influxdb.username="<%= influxdb_username %>" \
123-
<% end %> \
124-
<% if_p('prometheus.storage.remote.opentsdb.url') do |opentsdb_url| %> \
125-
-storage.remote.opentsdb-url="<%= opentsdb_url %>" \
126-
<% end %> \
127-
<% if_p('prometheus.storage.remote.timeout') do |timeout| %> \
128-
-storage.remote.timeout="<%= timeout %>" \
93+
<% if_p('prometheus.storage.local.target_heap_size') do |target_heap_size| %> \
94+
-storage.local.target-heap-size="<%= target_heap_size %>" \
12995
<% end %> \
13096
<% if_p('prometheus.web.console.libraries') do |libraries| %> \
13197
-web.console.libraries="<%= libraries %>" \

jobs/prometheus/templates/config/prometheus.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,15 @@ rule_files: <%= p('prometheus.rule_files', []).to_json %>
2424
# A list of scrape configurations.
2525
scrape_configs: <%= p('prometheus.scrape_configs', []).to_json %>
2626

27+
# Alerting specifies settings related to the Alertmanager.
28+
alerting: <%= p('prometheus.alerting', {}).to_json %>
29+
2730
<% if_p('prometheus.remote_write') do |remote_write| %>
28-
# Write samples to remote storage.
31+
# Settings related to the experimental remote write feature.
2932
remote_write: <%= remote_write.to_json %>
3033
<% end %>
34+
35+
<% if_p('prometheus.remote_read') do |remote_read| %>
36+
# Settings related to the experimental remote read feature.
37+
remote_read: <%= remote_read.to_json %>
38+
<% end %>

0 commit comments

Comments
 (0)