You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -5,8 +5,23 @@ How to setup Prometheus to scrape metrics and display dashboards in Grafana usin
5
5
This exporter is provided under Best Efforts support by the Pure Portfolio Solutions Group, Open Source Integrations team. For feature requests and bugs please use GitHub Issues. We will address these as soon as we can, but there are no specific SLAs.
6
6
7
7
## TL;DR
8
-
1. Configure Pure Storage OpenMetrics Exporter ([pure-fa-openmetrics-exporter][1]).
9
-
2. Deploy and configure Prometheus ([prometheus-docs][2]). [Example prometheus.yml here](../prometheus/prometheus.yml).
8
+
9
+
1. Confirm Purity version.
10
+
<details>
11
+
<summary>Expand for Purity//FA ≥ 6.7.x (Native Exporter)</summary>
12
+
13
+
From 6.7.0 onwards the Pure Storage OpenMetrics exporter was integrated natively into Purity FA to allow agents to scrape FlashArray directly. [FlashArray Native Exporter](https://support.purestorage.com/bundle/m_purityfa_general_administration/page/FlashArray/PurityFA/PurityFA_General_Administration/topics/concept/t_prometheus.yml.html)
14
+
15
+
</details>
16
+
17
+
<details>
18
+
<summary>Expand for Purity//FA ≤ 6.6.x (Open Source Expoter)</summary>
19
+
20
+
Deploy Pure Storage OpenSource Exporter ([pure-fa-openmetrics-exporter][1])
21
+
22
+
</details>
23
+
24
+
2. Deploy and configure Prometheus ([prometheus-docs][2]). Here is an example [prometheus.yml](../prometheus/prometheus.yml) file.
10
25
3. Deploy and configure Grafana ([grafana-docs][3]).
11
26
4. Import [grafana-purefa-flasharray-overview.json](grafana-purefa-flasharray-overview.json) into Grafana.
12
27
@@ -48,7 +63,7 @@ Grafana can be configured to query all of the metrics available in the Prometheu
48
63
49
64
# Setup
50
65
## Prerequisites and Dependencies
51
-
This deployment assumes the [Pure Storage FlashArray OpenMetrics Exporter][1] is previously setup and configured.
66
+
This deployment assumes the Pure Storage FlashArray OpenMetrics Exporter is contactable.
52
67
Prometheus and Grafana are open source platforms which are under constant development, therefore updates to our overview dashboard cannot be tested with every version. When new versions of the dashboard is released we endeavor to test between current and previous tested versions.
53
68
We have tested our dashboard with the following versions:
54
69
@@ -95,43 +110,95 @@ Dashboards may have limited functionality with earlier versions and some modific
95
110
96
111
Let's take a walkthrough an example of scraping the `/metrics/array` endpoint.
97
112
113
+
<details>
114
+
<summary>Expand for Purity//FA ≥ 6.7.x prometheus.yml example (Native Exporter)</summary>
115
+
98
116
```yaml
99
117
# Scrape job for one Pure Storage FlashArray scraping /metrics/array
100
-
# Each Prometheus scrape requires a job name. In this example we have structures the name `exporter_endpoint_arrayname`
101
-
- job_name: 'purefa_array_arrayname01'
102
-
# Specify the array endpoint from /metrics/array
103
-
metrics_path: /metrics/array
104
-
# Provide FlashArray authorization API token
105
-
authorization:
106
-
credentials: 11111111-1111-1111-1111-111111111111
107
-
# Provide parameters to pass the exporter the device to connect to. Provide FQDN or IP address
108
-
params:
109
-
endpoint: ['arrayname01.fqdn.com']
110
-
111
-
static_configs:
112
-
# Tell Prometheus which exporter to make the request
113
-
- targets:
114
-
- 10.0.2.10:9490
118
+
# Each Prometheus scrape requires a job name. In this example we have structured the name `exporter_endpoint_arrayname`
# Provide parameters to pass the exporter the device to connect to. Provide FQDN or IP address
133
+
params:
134
+
namespace: ['purefa']
135
+
136
+
static_configs:
137
+
# Tell Prometheus which exporter to make the request
138
+
- targets:
139
+
- 'purefa-openmetrics-exporter.fqdn.com:9490'
115
140
# Finally provide labels to the device.
116
141
labels:
117
142
# Instance should be the device name and is used to correlate metrics between different endpoints in Prometheus and Grafana. Ensure this is the same for each endpoint for the same device.
118
-
instance: arrayname01
143
+
instance: 'arrayname01'
119
144
# location, site and env are specific to your environment. Feel free to add more labels but maintain these three to minimize changes to Grafana which is expecting to use location, site and env as filter variables.
120
-
location: uk
121
-
site: London
122
-
env: production
145
+
env: 'production'
146
+
147
+
# Repeat for the above for end points:
148
+
# /metrics/volumes
149
+
# /metrics/hosts
150
+
# /metrics/pods
151
+
# /metrics/directories
152
+
# It is recommended to collect expensive queries less frequently such as /metrics/directories.
153
+
scrape_interval: '30m' # Set the scrape interval to every 30min. Default is every 1 minute. This overrides the global setting.
154
+
scrape_timeout: '15m' # Set the scrape timeout to shorter than or equal to scrape_interval. Default is every 1 minute.
155
+
156
+
# Repeat again for more Pure Storage FlashArrays
157
+
```
123
158
124
-
# Repeat for the above for end points:
125
-
# /metrics/volumes
126
-
# /metrics/hosts
127
-
# /metrics/pods
128
-
# /metrics/directories
129
-
# It is recommended to collect expensive queries less frequently such as /metrics/directories.
130
-
scrape_interval: 15m # Set the scrape interval to every 15min. Default is every 1 minute. This overrides the global setting.
131
-
scrape_timeout: 15m # Set the scrape timeout to shorter than or equal to scrape_interval. Default is every 1 minute.
159
+
</details>
132
160
133
-
# Repeat again for more Pure Storage FlashArrays
134
-
```
161
+
<details>
162
+
<summary>Expand for Purity//FA ≤ 6.6.x prometheus.yml example (Open Source Exporter)</summary>
163
+
164
+
```yaml
165
+
# Scrape job for one Pure Storage FlashArray scraping /metrics/array
166
+
# Each Prometheus scrape requires a job name. In this example we have structured the name `exporter_endpoint_arrayname`
# Provide parameters to pass the exporter the device to connect to. Provide FQDN or IP address
175
+
params:
176
+
endpoint: ['arrayname01.fqdn.com']
177
+
178
+
static_configs:
179
+
# Tell Prometheus which exporter to make the request
180
+
- targets:
181
+
- 'purefa-openmetrics-exporter.fqdn.com:9490'
182
+
# Finally provide labels to the device.
183
+
labels:
184
+
# Instance should be the device name and is used to correlate metrics between different endpoints in Prometheus and Grafana. Ensure this is the same for each endpoint for the same device.
185
+
instance: 'arrayname01'
186
+
# location, site and env are specific to your environment. Feel free to add more labels but maintain these three to minimize changes to Grafana which is expecting to use location, site and env as filter variables.
187
+
env: 'production'
188
+
189
+
# Repeat for the above for end points:
190
+
# /metrics/volumes
191
+
# /metrics/hosts
192
+
# /metrics/pods
193
+
# /metrics/directories
194
+
# It is recommended to collect expensive queries less frequently such as /metrics/directories.
195
+
scrape_interval: '30m' # Set the scrape interval to every 30min. Default is every 1 minute. This overrides the global setting.
196
+
scrape_timeout: '15m' # Set the scrape timeout to shorter than or equal to scrape_interval. Default is every 1 minute.
197
+
198
+
# Repeat again for more Pure Storage FlashArrays
199
+
```
200
+
201
+
</details>
135
202
136
203
4. Test the prometheus.yml file is valid
137
204
@@ -147,7 +214,7 @@ Dashboards may have limited functionality with earlier versions and some modific
147
214
- Type `purefa_info` in the query box and hit return
148
215
149
216
7. All going well, you will see your device listed:
@@ -179,10 +246,29 @@ Check the data is accessible to each component in the stack. If at any on these
179
246
* Check Grafana
180
247
181
248
### Check Pure OpenMetrics Exporter
182
-
1. Run cURL against the exporter and pass is the bearer token and endpoint.
183
-
```
184
-
curl -H 'Authorization: Bearer 11111111-1111-1111-1111-111111111111' -X GET 'http://<exporter_ip>:9490/metrics/array?endpoint=arrayname01.fqdn.com'
185
-
```
249
+
1. A great way to confirm the exporter is working is with a simple `cURL` command. The query to perform this test is slightly different between native and open source instances of the exporter.
250
+
251
+
<details>
252
+
<summary>Expand for Purity//FA ≥ 6.7.x example</summary>
253
+
254
+
Run cURL against the exporter and pass is the bearer token and endpoint.
<summary>Expand for Purity//FA ≤ 6.6.x example</summary>
264
+
265
+
Run cURL against the exporter and pass is the bearer token and endpoint.
266
+
267
+
```console
268
+
curl -H 'Authorization: Bearer <your-api-token>' -X GET 'http://<exporter_ip>:9490/metrics/array?endpoint=<array_address>'
269
+
```
270
+
271
+
</details>
186
272
187
273
### Check Prometheus
188
274
2. Using the Prometheus UI, run a simple query to see if any results are returned.
@@ -198,8 +284,6 @@ Check the data is accessible to each component in the stack. If at any on these
198
284
# Instance should be the device name and is used to correlate metrics between different endpoints in Prometheus and Grafana. Ensure this is the same for each endpoint for the same device.
199
285
instance: arrayname01
200
286
# location, site and env are specific to your environment. Feel free to add more labels but maintain these three to minimize changes to Grafana which is expecting to use location, site and env as filter variables.
0 commit comments