Skip to content

Commit 9480fa5

Browse files
committed
Update README.md
Updates to include instructions for native exporter.
1 parent 229e6ae commit 9480fa5

File tree

1 file changed

+123
-39
lines changed

1 file changed

+123
-39
lines changed

extra/grafana/README.md

Lines changed: 123 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,23 @@ How to setup Prometheus to scrape metrics and display dashboards in Grafana usin
55
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.
66

77
## 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.
1025
3. Deploy and configure Grafana ([grafana-docs][3]).
1126
4. Import [grafana-purefa-flasharray-overview.json](grafana-purefa-flasharray-overview.json) into Grafana.
1227

@@ -48,7 +63,7 @@ Grafana can be configured to query all of the metrics available in the Prometheu
4863

4964
# Setup
5065
## 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.
5267
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.
5368
We have tested our dashboard with the following versions:
5469

@@ -95,43 +110,95 @@ Dashboards may have limited functionality with earlier versions and some modific
95110

96111
Let's take a walkthrough an example of scraping the `/metrics/array` endpoint.
97112

113+
<details>
114+
<summary>Expand for Purity//FA ≥ 6.7.x prometheus.yml example (Native Exporter)</summary>
115+
98116
```yaml
99117
# 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`
119+
120+
# /metrics/array
121+
# Specify the array endpoint from /metrics/array
122+
- job_name: 'purefa_array_arrayname01'
123+
metrics_path: '/metrics/array'
124+
# Target port 443 https
125+
scheme: 'https'
126+
# Configure skip TLS verification unless required
127+
tls_config:
128+
insecure_skip_verify: true
129+
# Provide FlashArray authorization API token
130+
authorization:
131+
credentials: '11111111-1111-1111-1111-111111111111'
132+
# 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'
115140
# Finally provide labels to the device.
116141
labels:
117142
# 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'
119144
# 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+
```
123158

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>
132160

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`
167+
168+
- job_name: 'purefa_array_arrayname01'
169+
# Specify the array endpoint from /metrics/array
170+
metrics_path: '/metrics/array'
171+
# Provide FlashArray authorization API token
172+
authorization:
173+
credentials: '11111111-1111-1111-1111-111111111111'
174+
# 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>
135202

136203
4. Test the prometheus.yml file is valid
137204

@@ -147,7 +214,7 @@ Dashboards may have limited functionality with earlier versions and some modific
147214
- Type `purefa_info` in the query box and hit return
148215
149216
7. All going well, you will see your device listed:
150-
```
217+
```console
151218
purefa_info{array_name="ARRAYNAME01", env="production", instance="arrayname01", job="purefa_array_arrayname01", location="uk", os="Purity//FA", site="London", system_id="11111111-1111-1111-1111-111111111111", version="6.5.0"}
152219
```
153220

@@ -179,10 +246,29 @@ Check the data is accessible to each component in the stack. If at any on these
179246
* Check Grafana
180247

181248
### 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.
255+
256+
```console
257+
curl -k 'https://<array_address>/metrics/array?namespace=purefa' --header 'Authorization: Bearer <your-api-token>'
258+
```
259+
260+
</details>
261+
262+
<details>
263+
<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>
186272

187273
### Check Prometheus
188274
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
198284
# 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.
199285
instance: arrayname01
200286
# 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.
201-
location: uk
202-
site: London
203287
env: production
204288
```
205289

0 commit comments

Comments
 (0)