Skip to content

Commit aa76276

Browse files
committed
change default sd method backup to consul
1 parent 3fd856b commit aa76276

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

pigsty.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ all: # top-level namespace, match all hosts
399399
prometheus_data_dir: /export/prometheus/data # prometheus data dir
400400
prometheus_options: '--storage.tsdb.retention=30d'
401401
prometheus_reload: false # reload prometheus instead of recreate it
402-
prometheus_sd_method: static # service discovery method: static|consul|etcd
402+
prometheus_sd_method: consul # service discovery method: static|consul|etcd
403403
prometheus_scrape_interval: 2s # global scrape & evaluation interval
404404
prometheus_scrape_timeout: 1s # scrape timeout
405405
prometheus_sd_interval: 2s # service discovery refresh interval

roles/prometheus/tasks/main.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,16 @@
9898
wait_for: host=127.0.0.1 port=9093 state=started
9999

100100

101+
#------------------------------------------------------------------------------
102+
# Reload
103+
#------------------------------------------------------------------------------
104+
- name: Reload prometheus and alertmanager
105+
tags: prometheus_reload
106+
block:
107+
- name: Reload prometheus service
108+
systemd: name=prometheus state=reloaded enabled=yes daemon_reload=yes
109+
110+
101111
#------------------------------------------------------------------------------
102112
# Register prometheus & alertmanager service (optional)
103113
#------------------------------------------------------------------------------

0 commit comments

Comments
 (0)