Skip to content

Commit 229e6ae

Browse files
committed
Update prometheus.yml
* changed namespace: 'purefa' to namespace: ['purefa'] to avoid prometheus parsing error. * Added ' marks to all strings to avoid unfamiliar users getting caught out by yaml parsing bad errors caused by whitespace characters. * removed location and site parameters to clean up config not required by the dashboard. * updated all comments and standardised layout.
1 parent 8c73418 commit 229e6ae

File tree

1 file changed

+126
-186
lines changed

1 file changed

+126
-186
lines changed

extra/prometheus/prometheus.yml

Lines changed: 126 additions & 186 deletions
Original file line numberDiff line numberDiff line change
@@ -1,245 +1,185 @@
11
global:
2-
scrape_interval: 30s # Set the scrape interval to every 30 seconds. Default is every 1 minute.
3-
scrape_timeout: 30s # Set the scrape timeout to shorter than or equal to scrape_interval. Default is every 1 minute.
4-
# evaluation_interval: 60s # is set to the default every 1 minute.
5-
6-
# Alertmanager configuration (optional)
7-
#alerting:
8-
# alertmanagers:
9-
# - static_configs:
10-
# - targets:
11-
# - alertmanager:9093
12-
13-
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'. (optional)
14-
#rule_files:
15-
# - "purefa_alerts_rules.yml"
16-
# - "purefa_pods_rules.yml"
17-
18-
# A scrape configuration containing exactly one endpoint to scrape:
19-
# Here it's Prometheus itself
2+
scrape_interval: '60s' # Set the global scrape interval (default: 1 minute)
3+
scrape_timeout: '60s' # Timeout must be ≤ scrape_interval
4+
5+
# -----------------------------------------
6+
# Optional: Alertmanager Configuration
7+
# -----------------------------------------
8+
# alerting:
9+
# alertmanagers:
10+
# - static_configs:
11+
# - targets:
12+
# - 'alertmanager:9093'
13+
14+
# -----------------------------------------
15+
# Optional: Prometheus Rule Files
16+
# -----------------------------------------
17+
# rule_files:
18+
# - 'purefa_alerts_rules.yml'
19+
# - 'purefa_pods_rules.yml'
20+
21+
# -----------------------------------------
22+
# Prometheus Self-Monitoring
23+
# -----------------------------------------
2024
scrape_configs:
2125

22-
- job_name: "prometheus"
26+
- job_name: 'prometheus'
2327
static_configs:
24-
- targets: ["prometheus-server.fqdn.com:9090"]
25-
26-
# ################################## #
27-
# Pure Storage FlashArray Number 1 #
28-
# Running Purity//FA 6.7.0 or higher #
29-
# ################################## #
30-
# Create a single scrape job for each selected metric endpoint per FlashArray.
31-
# It is NOT recommended to scrape the root /metrics endpoint as it can be an expensive query.
32-
# Scrape job for Pure Storage FlashArray 1 scraping /metrics/array
28+
- targets: ['localhost:9090']
29+
30+
# ==============================================
31+
# FlashArray 1 — arrayname01 (Purity//FA ≥ 6.7.x)
32+
# ==============================================
33+
34+
# /metrics/array
3335
- job_name: 'purefa_array_arrayname01'
34-
metrics_path: /metrics/array
35-
scheme: https
36+
metrics_path: '/metrics/array'
37+
scheme: 'https'
3638
tls_config:
3739
insecure_skip_verify: true
38-
# Bearer authorization token
3940
authorization:
40-
credentials: 11111111-1111-1111-1111-111111111111
41+
credentials: '11111111-1111-1111-1111-111111111111'
4142
params:
42-
namespace: purefa
43-
43+
namespace: ['purefa']
4444
static_configs:
45-
# purefa openmetrics exporter
46-
- targets:
47-
- arrayname01.fqdn.com
48-
labels:
49-
location: uk
50-
site: London
51-
instance: arrayname01
52-
env: production
53-
54-
# Scrape job for Pure Storage FlashArray 1 scraping /metrics/volumes
45+
- targets: ['arrayname01.fqdn.com']
46+
labels:
47+
instance: 'arrayname01'
48+
env: 'production'
49+
50+
# /metrics/volumes
5551
- job_name: 'purefa_volumes_arrayname01'
56-
metrics_path: /metrics/volumes
57-
scheme: https
52+
metrics_path: '/metrics/volumes'
53+
scheme: 'https'
5854
tls_config:
5955
insecure_skip_verify: true
60-
# Bearer authorization token
6156
authorization:
62-
credentials: 11111111-1111-1111-1111-111111111111
57+
credentials: '11111111-1111-1111-1111-111111111111'
6358
params:
64-
namespace: purefa
65-
59+
namespace: ['purefa']
6660
static_configs:
67-
# purefa openmetrics exporter
68-
- targets:
69-
- arrayname01.fqdn.com
70-
labels:
71-
location: uk
72-
site: London
73-
instance: arrayname01
74-
env: production
75-
76-
# Scrape job for Pure Storage FlashArray 1 scraping /metrics/hosts
61+
- targets: ['arrayname01.fqdn.com']
62+
labels:
63+
instance: 'arrayname01'
64+
env: 'production'
65+
66+
# /metrics/hosts
7767
- job_name: 'purefa_hosts_arrayname01'
78-
metrics_path: /metrics/hosts
79-
scheme: https
68+
metrics_path: '/metrics/hosts'
69+
scheme: 'https'
8070
tls_config:
8171
insecure_skip_verify: true
82-
# Bearer authorization token
8372
authorization:
84-
credentials: 11111111-1111-1111-1111-111111111111
73+
credentials: '11111111-1111-1111-1111-111111111111'
8574
params:
86-
namespace: purefa
87-
75+
namespace: ['purefa']
8876
static_configs:
89-
# purefa openmetrics exporter
90-
- targets:
91-
- arrayname01.fqdn.com
92-
labels:
93-
instance: arrayname01
94-
location: uk
95-
site: London
96-
env: production
97-
98-
# Scrape job for Pure Storage FlashArray 1 scraping /metrics/pods
77+
- targets: ['arrayname01.fqdn.com']
78+
labels:
79+
instance: 'arrayname01'
80+
env: 'production'
81+
82+
# /metrics/pods
9983
- job_name: 'purefa_pods_arrayname01'
100-
metrics_path: /metrics/pods
101-
scheme: https
84+
metrics_path: '/metrics/pods'
85+
scheme: 'https'
10286
tls_config:
10387
insecure_skip_verify: true
104-
# Bearer authorization token
10588
authorization:
106-
credentials: 11111111-1111-1111-1111-111111111111
89+
credentials: '11111111-1111-1111-1111-111111111111'
10790
params:
108-
namespace: purefa
109-
91+
namespace: ['purefa']
11092
static_configs:
111-
# purefa openmetrics exporter
112-
- targets:
113-
- arrayname01.fqdn.com
114-
labels:
115-
instance: arrayname01
116-
location: uk
117-
site: London
118-
env: production
119-
120-
# Scrape job for Pure Storage FlashArray 1 scraping /metrics/directories
93+
- targets: ['arrayname01.fqdn.com']
94+
labels:
95+
instance: 'arrayname01'
96+
env: 'production'
97+
98+
# /metrics/directories — Expensive query; scrape less often
12199
- job_name: 'purefa_directories_arrayname01'
122-
metrics_path: /metrics/directories
123-
scheme: https
100+
metrics_path: '/metrics/directories'
101+
scheme: 'https'
102+
scrape_interval: '30m' # Less frequent scraping to reduce load
103+
scrape_timeout: '15m' # Must be shorter than scrape_interval
124104
tls_config:
125105
insecure_skip_verify: true
126-
# It is recommended to collect expensive queries less frequently such as /metrics/directories.
127-
scrape_interval: 15m # Set the scrape interval to every 15min. Default is every 1 minute. This overrides the global setting.
128-
scrape_timeout: 15m # Set the scrape timeout to shorter than or equal to scrape_interval. Default is every 1 minute.
129-
# Bearer authorization token
130106
authorization:
131-
credentials: 11111111-1111-1111-1111-111111111111
107+
credentials: '11111111-1111-1111-1111-111111111111'
132108
params:
133-
namespace: purefa
134-
109+
namespace: ['purefa']
135110
static_configs:
136-
# purefa openmetrics exporter
137-
- targets:
138-
- arrayname01.fqdn.com
139-
labels:
140-
instance: arrayname01
141-
location: uk
142-
site: London
143-
env: production
144-
145-
# ################################ #
146-
# Pure Storage FlashArray Number 2 #
147-
# Running Purity//FA 6.6.x or less #
148-
# ################################ #
149-
# Scrape job for Pure Storage FlashArray 2 scraping /metrics/array
111+
- targets: ['arrayname01.fqdn.com']
112+
labels:
113+
instance: 'arrayname01'
114+
env: 'production'
115+
116+
# ==============================================
117+
# FlashArray 2 — arrayname02 (Purity//FA ≤ 6.6.x)
118+
# ==============================================
119+
120+
# /metrics/array
150121
- job_name: 'purefa_array_arrayname02'
151-
metrics_path: /metrics/array
152-
# Bearer authorization token
122+
metrics_path: '/metrics/array'
153123
authorization:
154-
credentials: 22222222-2222-2222-2222-222222222222
124+
credentials: '22222222-2222-2222-2222-222222222222'
155125
params:
156126
endpoint: ['arrayname02.fqdn.com']
157-
158127
static_configs:
159-
# purefa openmetrics exporter
160-
- targets:
161-
- purefa-openmetrics-exporter.fqdn.com:9490
162-
labels:
163-
location: fr
164-
site: Paris
165-
instance: arrayname02
166-
env: production
167-
168-
# Scrape job for Pure Storage FlashArray 2 scraping /metrics/volumes
128+
- targets: ['purefa-openmetrics-exporter.fqdn.com:9490']
129+
labels:
130+
instance: 'arrayname02'
131+
env: 'production'
132+
133+
# /metrics/volumes
169134
- job_name: 'purefa_volumes_arrayname02'
170-
metrics_path: /metrics/volumes
171-
# Bearer authorization token
135+
metrics_path: '/metrics/volumes'
172136
authorization:
173-
credentials: 22222222-2222-2222-2222-222222222222
137+
credentials: '22222222-2222-2222-2222-222222222222'
174138
params:
175139
endpoint: ['arrayname02.fqdn.com']
176-
177140
static_configs:
178-
# purefa openmetrics exporter
179-
- targets:
180-
- purefa-openmetrics-exporter.fqdn.com:9490
181-
labels:
182-
instance: arrayname02
183-
location: fr
184-
site: Paris
185-
env: test
186-
187-
# Scrape job for Pure Storage FlashArray 2 scraping /metrics/hosts
141+
- targets: ['purefa-openmetrics-exporter.fqdn.com:9490']
142+
labels:
143+
instance: 'arrayname02'
144+
env: 'test'
145+
146+
# /metrics/hosts
188147
- job_name: 'purefa_hosts_arrayname02'
189-
metrics_path: /metrics/hosts
190-
# Bearer authorization token
148+
metrics_path: '/metrics/hosts'
191149
authorization:
192-
credentials: 22222222-2222-2222-2222-222222222222
150+
credentials: '22222222-2222-2222-2222-222222222222'
193151
params:
194152
endpoint: ['arrayname02.fqdn.com']
195-
196153
static_configs:
197-
# purefa openmetrics exporter
198-
- targets:
199-
- purefa-openmetrics-exporter.fqdn.com:9490
200-
labels:
201-
instance: arrayname02
202-
location: fr
203-
site: Paris
204-
env: test
205-
206-
# Scrape job for Pure Storage FlashArray 2 scraping /metrics/pods
154+
- targets: ['purefa-openmetrics-exporter.fqdn.com:9490']
155+
labels:
156+
instance: 'arrayname02'
157+
env: 'test'
158+
159+
# /metrics/pods
207160
- job_name: 'purefa_pods_arrayname02'
208-
metrics_path: /metrics/pods
209-
# Bearer authorization token
161+
metrics_path: '/metrics/pods'
210162
authorization:
211-
credentials: 22222222-2222-2222-2222-222222222222
163+
credentials: '22222222-2222-2222-2222-222222222222'
212164
params:
213165
endpoint: ['arrayname02.fqdn.com']
214-
215166
static_configs:
216-
# purefa openmetrics exporter
217-
- targets:
218-
- purefa-openmetrics-exporter.fqdn.com:9490
219-
labels:
220-
instance: arrayname02
221-
location: fr
222-
site: Paris
223-
env: test
224-
225-
# Scrape job for Pure Storage FlashArray 2 scraping /metrics/directories
167+
- targets: ['purefa-openmetrics-exporter.fqdn.com:9490']
168+
labels:
169+
instance: 'arrayname02'
170+
env: 'test'
171+
172+
# /metrics/directories — Expensive query; scrape less often
226173
- job_name: 'purefa_directories_arrayname02'
227-
metrics_path: /metrics/directories
228-
# It is recommended to collect expensive queries less frequently such as /metrics/directories.
229-
scrape_interval: 15m # Set the scrape interval to every 15min. Default is every 1 minute. This overrides the global setting.
230-
scrape_timeout: 15m # Set the scrape timeout to shorter than or equal to scrape_interval. Default is every 1 minute.
231-
# Bearer authorization token
174+
metrics_path: '/metrics/directories'
175+
scrape_interval: '30m' # Less frequent scraping to reduce load
176+
scrape_timeout: '15m' # Must be shorter than scrape_interval
232177
authorization:
233-
credentials: 22222222-2222-2222-2222-222222222222
178+
credentials: '22222222-2222-2222-2222-222222222222'
234179
params:
235180
endpoint: ['arrayname02.fqdn.com']
236-
237181
static_configs:
238-
# purefa openmetrics exporter
239-
- targets:
240-
- purefa-openmetrics-exporter.fqdn.com:9490
241-
labels:
242-
instance: arrayname02
243-
location: fr
244-
site: Paris
245-
env: test
182+
- targets: ['purefa-openmetrics-exporter.fqdn.com:9490']
183+
labels:
184+
instance: 'arrayname02'
185+
env: 'test'

0 commit comments

Comments
 (0)