Skip to content

Commit dad5b8b

Browse files
authored
Merge pull request #44 from james-laing/update-grafana-dash-and-docs
Grafana dash and docs update
2 parents 0143e48 + c03ac9c commit dad5b8b

File tree

4 files changed

+172
-92
lines changed

4 files changed

+172
-92
lines changed

extra/grafana/README.md

Lines changed: 59 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -51,28 +51,45 @@ Grafana can be configured to query all of the metrics available in the Prometheu
5151
This deployment assumes the [Pure Storage FlashBlade OpenMetrics Exporter][1] is previously been setup and configured.
5252
Supported operating system platforms are available to install Prometheus and Grafana.
5353

54+
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.
55+
5456
The Grafana dashboards have been developed and tested using the following software versions:
55-
* Prometheus v2.41.1
56-
* Grafana v9.3.2 & v9.4.1
57-
* Pure Storage OpenMetrics Exporter v1.0.5.hotfix1
57+
| OME | Prometheus | Grafana |
58+
| -------------- | ----------- |--------------- |
59+
| v1.0.7 | 2.45.1 | 9.3.2, 10.1.15, 10.2.2 |
60+
| v1.0.7 | 2.45.0 | 9.3.2, 10.0.1 |
61+
| v1.0.5.hotfix1 | 2.41.1 | 9.3.2, 9.4.1 |
5862

63+
Purity 6.1.0 and above (REST API 2.x continues to be developed in later Purity versions)
5964
Dashboards may have limited functionality with earlier versions and some modifications may be required.
6065

6166
## Prometheus
6267
1. Install Prometheus on your chosen OS platform ([prometheus-docs][2]).
6368

6469
2. Generate an API token for your chosen user account.
6570
In this case we are using a remote LDAP user account with read-only permissions.
66-
```console
67-
pureuser@arrayname01> pureadmin list
68-
Name Type Role
69-
pureuser local array_admin
70-
svc-readonly remote readonly
71-
72-
pureuser@arrayname01> pureadmin create --api-token svc-readonly
73-
Name Type API Token Created Expires
74-
svc-readonly remote a12345bc6-d78e-901f-23a4-56b07b89012 2022-11-30 08:58:40 EST -
75-
```
71+
72+
<details>
73+
<summary>Expand for CLI example</summary>
74+
75+
```console
76+
pureuser@arrayname01> pureadmin list
77+
Name Type Role
78+
pureuser local array_admin
79+
o11y-readonly remote readonly
80+
81+
pureuser@arrayname01> pureadmin create --api-token o11y-readonly
82+
Name Type API Token Created Expires
83+
o11y-readonly remote T-11111111-1111-1111-1111-111111111111 2023-01-01 12:00:00 EST -
84+
```
85+
86+
</details>
87+
88+
<details>
89+
<summary>Expand for GUI example</summary>
90+
91+
![Alt text](images/purefb_create_api_token.png)
92+
</details>
7693

7794
3. Configure `/etc/prometheus/prometheus.yaml` to point use the OpenMetrics exporter to query the device endpoint.
7895

@@ -88,15 +105,15 @@ Let's take a walkthrough an example of scraping the `/metrics/array` endpoint.
88105
metrics_path: /metrics/array
89106
# Provide FlashBlade authorization API token
90107
authorization:
91-
credentials: T-a12345bc6-d78e-901f-23a4-56b07b89012
108+
credentials: T-11111111-1111-1111-1111-111111111111
92109
# Provide parameters to pass the exporter the device to connect to. Provide FQDN or IP address
93110
params:
94111
endpoint: ['arrayname01.fqdn.com']
95112

96113
static_configs:
97114
# Tell Prometheus which exporter to make the request
98115
- targets:
99-
- 10.0.2.10:9491
116+
- purefa-openmetrics-exporter.fqdn.com:9491
100117
# Finally provide labels to the device.
101118
labels:
102119
# 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.
@@ -106,27 +123,30 @@ Let's take a walkthrough an example of scraping the `/metrics/array` endpoint.
106123
site: London
107124
env: production
108125

109-
# Repeat for the above for additional endpoints but note the limitations of collecting these in https://github.com/PureStorage-OpenConnect/pure-fb-openmetrics-exporter.
126+
# Repeat for the above for additional endpoints (if required) but note the limitations of collecting these in https://github.com/PureStorage-OpenConnect/pure-fb-openmetrics-exporter.
110127
# /metrics/usage
111128
# /metrics/clients
112129

113130
# Repeat again for more Pure Storage FlashBlades
114131
```
115132
4. Test the prometheus.yaml file is valid
116-
```console
117-
> promtool check config /etc/prometheus/prometheus.yml
118-
Checking prometheus.yml
119-
SUCCESS: prometheus.yml is valid prometheus config file syntax
120-
```
133+
134+
```console
135+
> promtool check config /etc/prometheus/prometheus.yml
136+
Checking prometheus.yml
137+
SUCCESS: prometheus.yml is valid prometheus config file syntax
138+
```
139+
121140
5. Restart Prometheus to ensure changes take effect
122141

123-
6. Navigate to your Prometheus instance via web browser http://prometheus:9090
142+
6. Navigate to your Prometheus instance via web browser http://prometheus-server.fqdn.com:9090
124143
- Type `purefb_info` in the query box and hit return
125144
126145
7. All going well, you will see your device listed:
127-
```
128-
purefb_info{array_name="ARRAYNAME01", env="production", instance="arrayname01", job="purefb_array_arrayname01", location="uk", os="Purity//FB", site="London", system_id="a1234bc5-a111-3c31-4170-a5a4-ae72f5e9ad9f", version="4.1.0"}
129-
```
146+
147+
```
148+
purefb_info{array_name="ARRAYNAME01", env="production", instance="arrayname01", job="purefb_array_arrayname01", location="uk", os="Purity//FB", site="London", system_id="11111111-1111-1111-1111-1111-111111111111", version="4.3.1"}
149+
```
130150

131151
## Grafana
132152

@@ -157,9 +177,10 @@ Check the data is accessible at component in the stack. If at any on these point
157177

158178
### Check Pure OpenMetrics Exporter
159179
1. Run cURL against the exporter and pass is the bearer token and endpoint.
160-
```
161-
curl -H 'Authorization: Bearer a12345bc6-d78e-901f-23a4-56b07b89012' -X GET 'http://<exporter_ip>:9490/metrics/array?endpoint=arrayname01.fqdn.com'
162-
```
180+
181+
```
182+
curl -H 'Authorization: Bearer T-11111111-1111-1111-1111-111111111111' -X GET 'http://<exporter_ip>:9491/metrics/array?endpoint=arrayname01.fqdn.com'
183+
```
163184

164185
### Check Prometheus
165186
2. Using the Prometheus UI, run a simple query to see if any results are returned.
@@ -171,12 +192,15 @@ curl -H 'Authorization: Bearer a12345bc6-d78e-901f-23a4-56b07b89012' -X GET 'htt
171192
<br>
172193
<img src="./images/prometheus_purefb_target_status.png" width="40%" height="40%">
173194
<br>
174-
4. Run prometheus.yaml through the yaml checker. Check the configuration is correct and retsart Prometheus.
175-
```console
176-
> promtool check config /etc/prometheus/prometheus.yml
177-
Checking prometheus.yml
178-
SUCCESS: prometheus.yml is valid prometheus config file syntax
179-
```
195+
196+
4. Run prometheus.yaml through the yaml checker. Check the configuration is correct and restart Prometheus.
197+
198+
```console
199+
> promtool check config /etc/prometheus/prometheus.yml
200+
Checking prometheus.yml
201+
SUCCESS: prometheus.yml is valid prometheus config file syntax
202+
```
203+
180204
5. Check messages log for Prometheus errors.
181205

182206
### Check Grafana
@@ -254,4 +278,4 @@ Data Reduction Rate also has a threshold set for informational purposes to highl
254278
[1]: https://github.com/PureStorage-OpenConnect/pure-fb-openmetrics-exporter "pure-fb-openmetrics-exporter"
255279
[2]: https://prometheus.io/docs/introduction/overview/ "prometheus-docs"
256280
[3]: https://grafana.com/docs/grafana/latest/ "grafana-docs"
257-
[4]: https://grafana.com/docs/grafana/latest/administration/data-source-management/ "grafana-datasource"
281+
[4]: https://grafana.com/docs/grafana/latest/administration/data-source-management/ "grafana-datasource"

0 commit comments

Comments
 (0)