#protocol connection total metrics
1 messages · Page 1 of 1 (latest)
@wanton crypt See if below templates help
name: NFSClients
query: api/protocols/nfs/connected-clients
object: nfs_clients
counters:
- ^^client_ip => client_ip
- ^^node.name => node
- ^^protocol => protocol
- ^^server_ip => server_ip
- ^^svm.name => svm
- ^^volume.name => volume
plugins:
- LabelAgent:
value_to_num_regex:
- count protocol .* .* `0`
- Aggregator:
# plugin will create summary/average for each object
# any names after the object names will be treated as
# label names that will be added to instances
- node
- svm
- volume
# only export node/aggr aggregations from plugin
# set this true or comment, to get data for each lock
export_data: false
name: ISCSISessions
query: api/protocols/san/iscsi/sessions
object: iscsi_sessions
counters:
- ^^tsih => tsih
- ^^target_portal_group => target_portal_group
- ^^initiator.name => initiator
- ^^isid => isid
- ^^svm.name => svm
plugins:
- LabelAgent:
value_to_num_regex:
- count initiator .* .* `0`
- Aggregator:
# plugin will create summary/average for each object
# any names after the object names will be treated as
# label names that will be added to instances
- svm
# only export node/aggr aggregations from plugin
# set this true or comment, to get data for each lock
export_data: false
Below queries shall get you the total count.
Do we support these metrics for ZAPI?
What is your ONTAP version?
These Rest Points are available from 9.6/9.7 versions. For iscsi, i see that iscsi-session-get-iter is available.
@hushed walrus 9.11 and above
Yes, I mean that do they support in ZAPI template?
Or only in REST?
The templates I shared above are for REST. If you are using clusters with version 9.7 or higher, you can use these templates. For ZAPI, you can create a template for ISCSI using the iscsi-session-get-iter ZAPI. For NFS, see if the nfs-service-get-iter ZAPI is helpful.
So I have to create two templates under /zapi/cdot/9.8.0/, one for iscsi_session.yaml, and another is nfs_service.yaml?
@hushed walrus I found this metric: https://netapp.github.io/harvest/23.02/ontap-metrics/#node_cifs_connections
node_cifs_connections.
And user want to monitor the counts of the connection of a node. From the HWU, the limit of this value match to which of the two following?
Could you share links of HWU?
@hushed walrus From the description, it says "Maximum number of NAS (SMB and NFS) TCP connections that a node can support", but isn't this metric only for CIFS?
Yes, This is for CIFS only.
But how does this match the maximum number? (which says SMB and NFS)
I am afraid that we set the wrong threshold using this metric to monitor the connection of a node
Does that mean that we have to add this CIFS metric with the NFS metric for NFS connected clients counts, which I had opened a feature request and compare the sum to this limitation?
The ZapiPerf template for SMB2 includes a metric called connected_shares. Currently, Harvest does not collect this metric. Also, the RestPerf does not have this metric at all.
It will probably be cifs + smb2 + nfs
which is TCP connections
Are we able to create a metric for this value?
Didn't get your question. Metric for which value?
Metric for the "maximum number of connections - NAS" value from HWU,
Which shows 100,000.
Sure. Please open a feature request for the same.
@wanton crypt I have updated issue with relevant steps
https://github.com/NetApp/harvest/issues/3136#issuecomment-2360217955
Please check and let us know if it works for you. Thanks.
Is it possible to support ZAPI?
Could you provide cluster version?
9.11.1
The REST endpoint api/protocols/nfs/connected-clients is available from ONTAP version 9.7 onwards. Similarly, the REST endpoint api/protocols/san/iscsi/sessions is available from ONTAP version 9.6 onwards.
Therefore, if your clusters are running these versions or later, collecting data via REST should work fine for you.
For iSCSI, there is a ZAPI mapping available with the iscsi-session-get-iter call. However, I couldn't find a relevant ZAPI call for NFS clients.
Please note that the NFS clients API provides data for clients active in the last 48 hours. If you need real-time data, you will need to add a filter for idle_duration in the template.
@hushed walrus Here is the update.
We tested the nfs connection metric
And it matches the CLI: "vserver nfs connected-clients show",
But the node limits should be using the CLI: "network connections active show -protocol nfs -node XXX"
I think there is a gap between this two value
Or if adding idle_duration filter to the template, they will be the same value?
I think so. More details about these are here
https://docs.netapp.com/us-en/ontap-cli/network-connections-active-show.html#description
https://docs.netapp.com/us-en/ontap-cli/vserver-nfs-connected-clients-show.html
I think network connections active show is refreshing data every 30 seconds and it is likley that it only shows active connections whole vserver nfs connected-clients show displays last 48h connections.
So is it is possible to create a template for this connected-clients right? Using network connections active show
Yes
@hushed walrus I cannot find related API for this command
“network connections active show”
Have you tried api/private/cli/network/connections/active ?
This works, I'll try to create the template
Sure, Let us know if any issues.
Is this correct?
With "?service=nfs" after the query
Could you share template in text format?
`name: NFSClientsConnection
query: api/private/cli/network/connections/active?service=nfs
object: nfs_clients
counters:
- ^^node => node
- ^^vserver => svm
plugins:
- LabelAgent:
value_to_num_regex:
- count protocol .* .*0 - Aggregator:
plugin will create summary/average for each object
any names after the object names will be treated as
label names that will be added to instances
- node
- svm
- volume
only export node/aggr aggregations from plugin
set this true or comment, to get data for each lock
export_data: false`
Thanks. Let me check.
Can you try this
name: NFSClientsConnection
query: api/private/cli/network/connections/active
object: nfs_clients
counters:
- ^^cid
- ^node => node
- ^vserver => svm
- filter:
- service=nfs
plugins:
- LabelAgent:
value_to_num_regex:
- count cid .* .* 0
- Aggregator:
- node
# only export node/aggr aggregations from plugin
# set this true or comment, to get data for each lock
export_data: false
@hushed walrus
Seems like in older version of ONTAP, ex:9.7,
The number is different.
And in version before 9.5, do we support ZAPI for this?
1842 vs 375 counts in ONTAP 9.7
Okay. Do you see any duplicate warnings in Harvest logs?
Could you email the output of below curl @ ng-harvest-files@netapp.com
curl -s -k -u USER:PASS 'https://CLUSTER_IP/api/private/cli/network/connections/active?service=nfs'
The curl output is the same as the metric
Could you email the output
I can only took the screenshot
Thanks. Seems like Harvest number is matching then?
Yes,
Seems like API number is not the same as the CLI number
Possibily related to 9.7 version. Seems correct in 9.15
9.9 and above version are correct