PureStorage-OpenConnect / pure-fa-openmetrics-exporter

Pure Storage OpenMetrics exporter for FlashArray
Apache License 2.0
20 stars 27 forks source link

Collect Frontent WWPN Information #105

Closed LukasBr1337 closed 7 months ago

LukasBr1337 commented 7 months ago

For our internal PerformanceWarehouse we need the WWPNs from the front end ports. Would be great to implement that. We want to have a full view from Host to Storage in Grafana.

BR

Lukas

chrroberts-pure commented 7 months ago

Hi Lukas,

I agree this is a good request.

This information is available in the Purity API in GET /ports. That URI has not been implemented in the OpenMetrics exporter.

@LukasBr1337 do you have any suggests on Semantic Conventions for this new suggested info metric? (eg for purefa-metrics.md ) or any suggestion what this metric output should look like?

LukasBr1337 commented 7 months ago

for other vendors we know it like that -> /23:43:00:02:ac:02:5c:07/3:4:3/iops" 3:4:3 would be in this case Node:Slot:port

chrroberts-pure commented 7 months ago

Here's a POC that I've built in my environment

I went ahead and wrote it for all port types. NVMe, iSCSI, and FC. My testing results are below.

Would this fit your requirements @LukasBr1337 ?

# HELP purefa_ports_fc_info FlashArray ports fc info
# TYPE purefa_ports_fc_info gauge
purefa_ports_fc_info{name="CT0.FC0",wwn="XX:XX:XX:XX:XX:XX:XX:00"} 1
purefa_ports_fc_info{name="CT0.FC1",wwn="XX:XX:XX:XX:XX:XX:XX:01"} 1
purefa_ports_fc_info{name="CT0.FC2",wwn="XX:XX:XX:XX:XX:XX:XX:02"} 1
purefa_ports_fc_info{name="CT0.FC3",wwn="XX:XX:XX:XX:XX:XX:XX:03"} 1
purefa_ports_fc_info{name="CT0.FC8",wwn="XX:XX:XX:XX:XX:XX:XX:08"} 1
purefa_ports_fc_info{name="CT0.FC9",wwn="XX:XX:XX:XX:XX:XX:XX:09"} 1
purefa_ports_fc_info{name="CT1.FC0",wwn="XX:XX:XX:XX:XX:XX:XX:10"} 1
purefa_ports_fc_info{name="CT1.FC1",wwn="XX:XX:XX:XX:XX:XX:XX:11"} 1
purefa_ports_fc_info{name="CT1.FC2",wwn="XX:XX:XX:XX:XX:XX:XX:12"} 1
purefa_ports_fc_info{name="CT1.FC3",wwn="XX:XX:XX:XX:XX:XX:XX:13"} 1
purefa_ports_fc_info{name="CT1.FC8",wwn="XX:XX:XX:XX:XX:XX:XX:18"} 1
purefa_ports_fc_info{name="CT1.FC9",wwn="XX:XX:XX:XX:XX:XX:XX:19"} 1
# HELP purefa_ports_iscsi_info FlashArray port iscsi info
# TYPE purefa_ports_iscsi_info gauge
purefa_ports_iscsi_info{iqn="iqn.2010-06.com.purestorage:flasharray.xxxxxxxxxxxxxxxx",name="CT0.ETH4",portal="192.168.x.1:3260"} 1
purefa_ports_iscsi_info{iqn="iqn.2010-06.com.purestorage:flasharray.xxxxxxxxxxxxxxxx",name="CT0.ETH5",portal="192.168.x.2:3260"} 1
purefa_ports_iscsi_info{iqn="iqn.2010-06.com.purestorage:flasharray.xxxxxxxxxxxxxxxx",name="CT1.ETH4",portal="192.168.x.3:3260"} 1
purefa_ports_iscsi_info{iqn="iqn.2010-06.com.purestorage:flasharray.xxxxxxxxxxxxxxxx",name="CT1.ETH5",portal="192.168.x.4:3260"} 1
# HELP purefa_ports_nvmeof_info FlashArray ports nvmeof info
# TYPE purefa_ports_nvmeof_info gauge
purefa_ports_nvmeof_info{name="CT0.ETH14",nqn="nqn.2010-06.com.purestorage:flasharray.xxxxxxxxxxxxxxxx",portal="192.168.x.5:4420"} 1
purefa_ports_nvmeof_info{name="CT0.ETH15",nqn="nqn.2010-06.com.purestorage:flasharray.xxxxxxxxxxxxxxxx",portal="192.168.x.6:4420"} 1
purefa_ports_nvmeof_info{name="CT1.ETH14",nqn="nqn.2010-06.com.purestorage:flasharray.xxxxxxxxxxxxxxxx",portal="192.168.x.7:4420"} 1
purefa_ports_nvmeof_info{name="CT1.ETH15",nqn="nqn.2010-06.com.purestorage:flasharray.xxxxxxxxxxxxxxxx",portal="192.168.x.8:4420"} 1

Note, none of the names, descriptions..etc are finalized - just demonstrating for now.

LukasBr1337 commented 7 months ago

looks pretty good for us :)

BR

Lukas

LukasBr1337 commented 7 months ago

only request... lower cases would be great :D

sdodsley commented 7 months ago

@LukasBr1337 FlashArrays produce their WWNs in uppercase and we are just directly reporting what the array sends us. Is there a specific reason why you would prefer them lowercase?

sdodsley commented 7 months ago

Alos, we currently report the hosts WWN information in uppercase as well, so moving to lowercase would create a misnatch of cases across different responses.

LukasBr1337 commented 7 months ago

From other vendors and from the brocade switches we are getting them in lowercase so it would match better like that

chrroberts-pure commented 7 months ago

@LukasBr1337 It is common for observability platforms to convert all tags to lowercase - such as this example in Datadog. This would convert the tags to lowercase like you are requesting

https://docs.datadoghq.com/getting_started/tagging/#define-tags

This example is with Datadog

Screenshot 2024-02-13 at 2 05 02 PM