Skip to content

Commit 5834e20

Browse files
authored
Merge pull request #39 from genegr/master
Proposed new 1.0.5 release.
2 parents 82b89ae + 84fc8ab commit 5834e20

16 files changed

+1333
-94
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ go.work
2121
out/
2222

2323
# Ignore macos DS_Store ghost files
24-
.DS_Store
24+
.DS_Store
25+
bin/

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ GOTEST=$(GOCMD) test
44
GOVET=$(GOCMD) vet
55
BINARY_NAME=pure-fa-om-exporter
66
MODULE_NAME=purestorage/fa-openmetrics-exporter
7-
VERSION?=1.0.4.hotfix1
7+
VERSION?=1.0.5
88
SERVICE_PORT?=9490
99
DOCKER_REGISTRY?= quay.io/purestorage/
1010
EXPORT_RESULT?=false # for CI please set EXPORT_RESULT to true

README.md

Lines changed: 48 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -211,51 +211,54 @@ A complete example monitoring stack implemented in Docker Compose which can be f
211211

212212
### Metrics Collected
213213

214-
|Metric Name |Description |
215-
|-----------------------------------------------------|------------------------------------------------------------|
216-
|purefa_info |FlashArray system information |
217-
|purefa_alerts_open |FlashArray open alert events |
218-
|purefa_array_performance_average_bytes |FlashArray array average operations size in bytes |
219-
|purefa_array_performance_bandwidth_bytes |FlashArray array throughput in bytes per second |
220-
|purefa_array_performance_latency_usec |FlashArray array latency in microseconds |
221-
|purefa_array_performance_queue_depth_ops |FlashArray array queue depth size |
222-
|purefa_array_performance_throughput_iops |FlashArray array throughput in iops |
223-
|purefa_array_space_bytes |FlashArray array space in bytes |
224-
|purefa_array_space_data_reduction_ratio |FlashArray array space data reduction |
225-
|purefa_array_space_utilization |FlashArray array space utilization in percent |
226-
|purefa_directory_performance_average_bytes |FlashArray directory average operations size in bytes |
227-
|purefa_directory_performance_bandwidth_bytes |FlashArray directory throughput in bytes per second |
228-
|purefa_directory_performance_latency_usec |FlashArray directory latency in microseconds |
229-
|purefa_directory_performance_throughput_iops |FlashArray directory throughput in iops |
230-
|purefa_directory_space_bytes |FlashArray directory space in bytes |
231-
|purefa_directory_space_data_reduction_ratio |FlashArray directory space data reduction |
232-
|purefa_host_connections_info |FlashArray host volumes connections |
233-
|purefa_host_performance_average_bytes |FlashArray host average operations size in bytes |
234-
|purefa_host_performance_bandwidth_bytes |FlashArray host bandwidth in bytes per second |
235-
|purefa_host_performance_latency_usec |FlashArray host latency in microseconds |
236-
|purefa_host_performance_throughput_iops |FlashArray host throughput in iops |
237-
|purefa_host_space_bytes |FlashArray host space in bytes |
238-
|purefa_host_space_data_reduction_ratio |FlashArray host space data reduction |
239-
|purefa_host_space_size_bytes |FlashArray host volumes size |
240-
|purefa_hw_component_status |FlashArray hardware component status |
241-
|purefa_hw_component_temperature_celsius |FlashArray hardware component temperature in C |
242-
|purefa_hw_component_voltage_volt |FlashArray hardware component voltage |
243-
|purefa_pod_performance_average_bytes |FlashArray pod average operations size |
244-
|purefa_pod_performance_bandwidth_bytes |FlashArray pod throughput in bytes per second |
245-
|purefa_pod_performance_latency_usec |FlashArray pod latency in microseconds |
246-
|purefa_pod_performance_throughput_iops |FlashArray pod throughput in iops |
247-
|purefa_pod_space_bytes |FlashArray pod space in bytes |
248-
|purefa_pod_space_data_reduction_ratio |FlashArray pod space data reduction |
249-
|purefa_pod_performance_replication_bandwidth_bytes |FlashArray pod replication bandwidth in bytes per second |
250-
|purefa_pod_replica_links_performance_bandwidth_bytes |FlashArray pod replica links throughput in bytes per second |
251-
|purefa_pod_replica_links_lag_average_sec |FlashArray pod replica links average lag in seconds |
252-
|purefa_pod_replica_links_lag_max_sec |FlashArray pod replica links maximum lag in seconds |
253-
|purefa_volume_performance_average_bytes |FlashArray volume average operations size in bytes |
254-
|purefa_volume_performance_bandwidth_bytes |FlashArray volume throughput in bytes per second |
255-
|purefa_volume_performance_latency_usec |FlashArray volume latency in microseconds |
256-
|purefa_volume_performance_throughput_iops |FlashArray volume throughput in iops |
257-
|purefa_volume_space_bytes |FlashArray volume space in bytes |
258-
|purefa_volume_space_data_reduction_ratio |FlashArray volume space data reduction |
214+
|Metric Name |Description |
215+
|-----------------------------------------------------|--------------------------------------------------------------|
216+
|purefa_info |FlashArray system information |
217+
|purefa_alerts_open |FlashArray open alert events |
218+
|purefa_array_performance_average_bytes |FlashArray array average operations size in bytes |
219+
|purefa_array_performance_bandwidth_bytes |FlashArray array throughput in bytes per second |
220+
|purefa_array_performance_latency_usec |FlashArray array latency in microseconds |
221+
|purefa_array_performance_queue_depth_ops |FlashArray array queue depth size |
222+
|purefa_array_performance_throughput_iops |FlashArray array throughput in iops |
223+
|purefa_array_space_bytes |FlashArray array space in bytes |
224+
|purefa_array_space_data_reduction_ratio |FlashArray array space data reduction |
225+
|purefa_array_space_utilization |FlashArray array space utilization in percent |
226+
|purefa_directory_performance_average_bytes |FlashArray directory average operations size in bytes |
227+
|purefa_directory_performance_bandwidth_bytes |FlashArray directory throughput in bytes per second |
228+
|purefa_directory_performance_latency_usec |FlashArray directory latency in microseconds |
229+
|purefa_directory_performance_throughput_iops |FlashArray directory throughput in iops |
230+
|purefa_directory_space_bytes |FlashArray directory space in bytes |
231+
|purefa_directory_space_data_reduction_ratio |FlashArray directory space data reduction |
232+
|purefa_host_connections_info |FlashArray host volumes connections |
233+
|purefa_host_performance_average_bytes |FlashArray host average operations size in bytes |
234+
|purefa_host_performance_bandwidth_bytes |FlashArray host bandwidth in bytes per second |
235+
|purefa_host_performance_latency_usec |FlashArray host latency in microseconds |
236+
|purefa_host_performance_throughput_iops |FlashArray host throughput in iops |
237+
|purefa_host_space_bytes |FlashArray host space in bytes |
238+
|purefa_host_space_data_reduction_ratio |FlashArray host space data reduction |
239+
|purefa_host_space_size_bytes |FlashArray host volumes size |
240+
|purefa_hw_component_status |FlashArray hardware component status |
241+
|purefa_hw_component_temperature_celsius |FlashArray hardware component temperature in C |
242+
|purefa_hw_component_voltage_volt |FlashArray hardware component voltage |
243+
|purefa_network_interface_performance_bandwidth_bytes network interfaces bandwidth in bytes per second |
244+
|purefa_network_interface_performance_throughput_pkts |FlashArray network interfaces throughput in packets per second|
245+
|purefa_network_interface_performance_errors |FlashArray network interfaces errors per second |
246+
|purefa_pod_performance_average_bytes |FlashArray pod average operations size |
247+
|purefa_pod_performance_bandwidth_bytes |FlashArray pod throughput in bytes per second |
248+
|purefa_pod_performance_latency_usec |FlashArray pod latency in microseconds |
249+
|purefa_pod_performance_throughput_iops |FlashArray pod throughput in iops |
250+
|purefa_pod_space_bytes |FlashArray pod space in bytes |
251+
|purefa_pod_space_data_reduction_ratio |FlashArray pod space data reduction |
252+
|purefa_pod_performance_replication_bandwidth_bytes |FlashArray pod replication bandwidth in bytes per second |
253+
|purefa_pod_replica_links_performance_bandwidth_bytes |FlashArray pod replica links throughput in bytes per second |
254+
|purefa_pod_replica_links_lag_average_sec |FlashArray pod replica links average lag in seconds |
255+
|purefa_pod_replica_links_lag_max_sec |FlashArray pod replica links maximum lag in seconds |
256+
|purefa_volume_performance_average_bytes |FlashArray volume average operations size in bytes |
257+
|purefa_volume_performance_bandwidth_bytes |FlashArray volume throughput in bytes per second |
258+
|purefa_volume_performance_latency_usec |FlashArray volume latency in microseconds |
259+
|purefa_volume_performance_throughput_iops |FlashArray volume throughput in iops |
260+
|purefa_volume_space_bytes |FlashArray volume space in bytes |
261+
|purefa_volume_space_data_reduction_ratio |FlashArray volume space data reduction |
259262

260263
## Monitoring On-Premise with Prometheus and Grafana
261264
Take a holistic overview of your Pure Storage FlashArray estate on-premise with Prometheus and Grafana to summarize statistics such as:

cmd/fa-om-exporter/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"gopkg.in/yaml.v3"
1919
)
2020

21-
var version string = "1.0.4.hotfix1"
21+
var version string = "1.0.5"
2222
var debug bool = false
2323
var arraytokens config.FlashArrayList
2424

examples/config/docker/prometheus/prometheus.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ scrape_configs:
77
authorization:
88
credentials: <YOUR_API_TOKEN>
99
params:
10-
endpoint: YOUR_FLASHARRAY_IP
10+
endpoint: [<YOUR_FLASHARRAY_IP>]
1111

1212
static_configs:
1313
- targets:
@@ -23,7 +23,7 @@ scrape_configs:
2323
authorization:
2424
credentials: <YOUR_API_TOKEN>
2525
params:
26-
endpoint: YOUR_FLASHARRAY_IP
26+
endpoint: [<YOUR_FLASHARRAY_IP>]
2727

2828
static_configs:
2929
- targets:
@@ -39,7 +39,7 @@ scrape_configs:
3939
authorization:
4040
credentials: <YOUR_API_TOKEN>
4141
params:
42-
endpoint: YOUR_FLASHARRAY_IP
42+
endpoint: [<YOUR_FLASHARRAY_IP>]
4343

4444
static_configs:
4545
- targets:
@@ -55,7 +55,7 @@ scrape_configs:
5555
authorization:
5656
credentials: <YOUR_API_TOKEN>
5757
params:
58-
endpoint: YOUR_FLASHARRAY_IP
58+
endpoint: [<YOUR_FLASHARRAY_IP>]
5959

6060
static_configs:
6161
- targets:
@@ -71,7 +71,7 @@ scrape_configs:
7171
authorization:
7272
credentials: <YOUR_API_TOKEN>
7373
params:
74-
endpoint: YOUR_FLASHARRAY_IP
74+
endpoint: [<YOUR_FLASHARRAY_IP>]
7575

7676
static_configs:
7777
- targets:

internal/openmetrics-exporter/collector.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@ func Collector(ctx context.Context, metrics string, registry *prometheus.Registr
2020
arrayperfcoll := NewArraysPerformanceCollector(faclient)
2121
arrayspacecoll := NewArraySpaceCollector(faclient)
2222
hwcoll := NewHardwareCollector(faclient)
23+
nicsperfcoll := NewNetworkInterfacesPerformanceCollector(faclient)
2324
registry.MustRegister(
2425
alertscoll,
2526
arrayperfcoll,
2627
arrayspacecoll,
2728
hwcoll,
29+
nicsperfcoll,
2830
)
2931
}
3032
if metrics == "all" || metrics == "directories" {
Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
package collectors
2+
3+
4+
import (
5+
"github.com/prometheus/client_golang/prometheus"
6+
"purestorage/fa-openmetrics-exporter/internal/rest-client"
7+
)
8+
9+
type NetworkInterfacesPerformanceCollector struct {
10+
BandwidthDesc *prometheus.Desc
11+
ThroughputDesc *prometheus.Desc
12+
ErrorsDesc *prometheus.Desc
13+
Client *client.FAClient
14+
}
15+
16+
func (c *NetworkInterfacesPerformanceCollector) Describe(ch chan<- *prometheus.Desc) {
17+
prometheus.DescribeByCollect(c, ch)
18+
}
19+
20+
func (c *NetworkInterfacesPerformanceCollector) Collect(ch chan<- prometheus.Metric) {
21+
nwl := c.Client.GetNetworkInterfacesPerformance()
22+
if len(nwl.Items) == 0 {
23+
return
24+
}
25+
for _, n := range nwl.Items {
26+
if n.InterfaceType == "eth" {
27+
ch <- prometheus.MustNewConstMetric(
28+
c.BandwidthDesc,
29+
prometheus.GaugeValue,
30+
n.Eth.ReceivedBytesPerSec,
31+
n.Name, "received_bytes_per_sec", n.InterfaceType,
32+
)
33+
ch <- prometheus.MustNewConstMetric(
34+
c.BandwidthDesc,
35+
prometheus.GaugeValue,
36+
n.Eth.TransmittedBytesPerSec,
37+
n.Name, "transmitted_bytes_per_sec", n.InterfaceType,
38+
)
39+
ch <- prometheus.MustNewConstMetric(
40+
c.ThroughputDesc,
41+
prometheus.GaugeValue,
42+
n.Eth.ReceivedPacketsPerSec,
43+
n.Name, "received_packets_per_sec", n.InterfaceType,
44+
)
45+
ch <- prometheus.MustNewConstMetric(
46+
c.ThroughputDesc,
47+
prometheus.GaugeValue,
48+
n.Eth.TransmittedPacketsPerSec,
49+
n.Name, "transmitted_packets_per_sec", n.InterfaceType,
50+
)
51+
ch <- prometheus.MustNewConstMetric(
52+
c.ErrorsDesc,
53+
prometheus.GaugeValue,
54+
n.Eth.OtherErrorsPerSec,
55+
n.Name, "other_errors_per_sec", n.InterfaceType,
56+
)
57+
ch <- prometheus.MustNewConstMetric(
58+
c.ErrorsDesc,
59+
prometheus.GaugeValue,
60+
n.Eth.ReceivedCrcErrorsPerSec,
61+
n.Name, "received_crc_errors_per_sec", n.InterfaceType,
62+
)
63+
ch <- prometheus.MustNewConstMetric(
64+
c.ErrorsDesc,
65+
prometheus.GaugeValue,
66+
n.Eth.ReceivedFrameErrorsPerSec,
67+
n.Name, "received_frame_errors_per_sec", n.InterfaceType,
68+
)
69+
ch <- prometheus.MustNewConstMetric(
70+
c.ErrorsDesc,
71+
prometheus.GaugeValue,
72+
n.Eth.TotalErrorsPerSec,
73+
n.Name, "total_errors_per_sec", n.InterfaceType,
74+
)
75+
ch <- prometheus.MustNewConstMetric(
76+
c.ErrorsDesc,
77+
prometheus.GaugeValue,
78+
n.Eth.TransmittedCarrierErrorsPerSec,
79+
n.Name, "transmitted_carrier_errors_per_sec", n.InterfaceType,
80+
)
81+
ch <- prometheus.MustNewConstMetric(
82+
c.ErrorsDesc,
83+
prometheus.GaugeValue,
84+
n.Eth.TransmittedDroppedErrorsPerSec,
85+
n.Name, "transmitted_dropped_errors_per_sec", n.InterfaceType,
86+
)
87+
}
88+
if n.InterfaceType == "fc" {
89+
ch <- prometheus.MustNewConstMetric(
90+
c.BandwidthDesc,
91+
prometheus.GaugeValue,
92+
n.Fc.ReceivedBytesPerSec,
93+
n.Name, "received_bytes_per_sec", n.InterfaceType,
94+
)
95+
ch <- prometheus.MustNewConstMetric(
96+
c.BandwidthDesc,
97+
prometheus.GaugeValue,
98+
n.Fc.TransmittedBytesPerSec,
99+
n.Name, "transmitted_bytes_per_sec", n.InterfaceType,
100+
)
101+
ch <- prometheus.MustNewConstMetric(
102+
c.ThroughputDesc,
103+
prometheus.GaugeValue,
104+
n.Fc.ReceivedFramesPerSec,
105+
n.Name, "received_frames_per_sec", n.InterfaceType,
106+
)
107+
ch <- prometheus.MustNewConstMetric(
108+
c.ThroughputDesc,
109+
prometheus.GaugeValue,
110+
n.Fc.TransmittedFramesPerSec,
111+
n.Name, "transmitted_frames_per_sec", n.InterfaceType,
112+
)
113+
ch <- prometheus.MustNewConstMetric(
114+
c.ErrorsDesc,
115+
prometheus.GaugeValue,
116+
n.Fc.ReceivedCrcErrorsPerSec,
117+
n.Name, "received_crc_errors_per_sec", n.InterfaceType,
118+
)
119+
ch <- prometheus.MustNewConstMetric(
120+
c.ErrorsDesc,
121+
prometheus.GaugeValue,
122+
n.Fc.ReceivedLinkFailuresPerSec,
123+
n.Name, "received_link_failures_per_sec", n.InterfaceType,
124+
)
125+
ch <- prometheus.MustNewConstMetric(
126+
c.ErrorsDesc,
127+
prometheus.GaugeValue,
128+
n.Fc.ReceivedLossOfSignalPerSec,
129+
n.Name, "received_loss_of_signal_per_sec", n.InterfaceType,
130+
)
131+
ch <- prometheus.MustNewConstMetric(
132+
c.ErrorsDesc,
133+
prometheus.GaugeValue,
134+
n.Fc.ReceivedLossOfSyncPerSec,
135+
n.Name, "received_loss_of_sync_per_sec", n.InterfaceType,
136+
)
137+
ch <- prometheus.MustNewConstMetric(
138+
c.ErrorsDesc,
139+
prometheus.GaugeValue,
140+
n.Fc.TotalErrorsPerSec,
141+
n.Name, "total_errors_per_sec", n.InterfaceType,
142+
)
143+
ch <- prometheus.MustNewConstMetric(
144+
c.ErrorsDesc,
145+
prometheus.GaugeValue,
146+
n.Fc.TransmittedInvalidWordsPerSec,
147+
n.Name, "transmitted_invalid_words_per_sec", n.InterfaceType,
148+
)
149+
}
150+
151+
}
152+
}
153+
154+
func NewNetworkInterfacesPerformanceCollector(fa *client.FAClient) *NetworkInterfacesPerformanceCollector {
155+
return &NetworkInterfacesPerformanceCollector{
156+
BandwidthDesc: prometheus.NewDesc(
157+
"purefa_network_interface_performance_bandwidth_bytes",
158+
"FlashArray network interface bandwidth",
159+
[]string{"name", "dimension", "type"},
160+
prometheus.Labels{},
161+
),
162+
ThroughputDesc: prometheus.NewDesc(
163+
"purefa_network_interface_performance_throughput_pkts",
164+
"FlashArray network interface throughput",
165+
[]string{"name", "dimension", "type"},
166+
prometheus.Labels{},
167+
),
168+
ErrorsDesc: prometheus.NewDesc(
169+
"purefa_network_interface_performance_errors",
170+
"FlashArray network interface errors",
171+
[]string{"name", "dimension", "type"},
172+
prometheus.Labels{},
173+
),
174+
Client: fa,
175+
}
176+
}

0 commit comments

Comments
 (0)