#metrics for iscsci seesion

1 messages · Page 1 of 1 (latest)

fluid helm
#

Hey,
we need to poll the netapp filers and get the intiator of the iscsi sessions. It can be queried from /api/protocols/san/iscsi/sessions/{svm.uuid}/{target_portal_group}/{tsih}.
I have not found any template for this, so I assume I need to create a template myself, beginning with

name:     IscsiSession
query:    api/protocols/san/iscsi/sessions
object:   iscsi_session

will this possibly work? could you please give me some guidance how to continue this, as this will be the first template for me to create.

Best,
Chuan

fallen turtle
#

hi @fluid helm I believe the /protocols/san/iscsi/sessions endpoint has what you want. Can you run this and confirm? Replace user, pass, and $ip with your values.
curl --user user:pass -snk 'https://$ip/api/protocols/san/iscsi/sessions?fields=**'

If that looks good we can help you create a template for that object

#

I created a template and here's what the exported metrics look like. Is this what you're looking for?

fluid helm
#

Thanks Chris, the result looks good. The fields we would like to get is the initiator.name or/and connections[].intiator_address. Would it be possible to add them to the labels?

fallen turtle
#

yes, initiator.name is in the screenshot above as the label initiator. Let me check on connections

fluid helm
#

thanks a lot

fallen turtle
#

if this looks good. I'll create a github discussion with the template and you can give it a try

fluid helm
#

yes, that looks great

#

besides, I am wondering if we can split the initiator label, and add a hostname label, (second part of the initaiator name)?

fallen turtle
#

and if so, we can iterate on splitting

fluid helm
#

hey, pls see my comment on github