File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ prometheus:
1616 - name: prod
1717 port: 9090 # docker published port, nginx will forward /prod to it
1818 image: prom/prometheus
19- #retention_time: 30d # optional
19+ extra_args: '--web.enable-remote-write-receiver' # optional, extra command-line flags appended to prometheus container command
20+ retention_time: 30d # optional
2021 auth:
2122 - developer1: password1
2223 - developer2: password2
Original file line number Diff line number Diff line change @@ -297,7 +297,12 @@ prometheus_container_{{ loop.index }}_{{ i_loop.index }}:
297297 {% else % }
298298 {% set retention_time_arg = ' ' % }
299299 {% endif % }
300- - command: -- config.file= / prometheus- data/ etc/ prometheus.yml -- storage.tsdb.path= / prometheus- data {{ retention_time_arg }} -- web.external- url= https:// {{ domain[' name' ] }}/ {{ instance[' name' ] }}/ -- web.enable- admin- api
300+ {% if instance[' extra_args' ] is defined and instance[' extra_args' ] is not none % }
301+ {% set extra_args = instance[' extra_args' ] % }
302+ {% else % }
303+ {% set extra_args = ' ' % }
304+ {% endif % }
305+ - command: -- config.file= / prometheus- data/ etc/ prometheus.yml -- storage.tsdb.path= / prometheus- data {{ retention_time_arg }} -- web.external- url= https:// {{ domain[' name' ] }}/ {{ instance[' name' ] }}/ -- web.enable- admin- api {{ extra_args }}
301306
302307prometheus_container_restart_{{ loop.index }}_{{ i_loop.index }}:
303308 cmd.run:
@@ -539,4 +544,3 @@ nginx_reload_cron:
539544 - hour: 6
540545
541546{% endif % }
542-
You can’t perform that action at this time.
0 commit comments