#protocol connection total metrics

1 messages · Page 1 of 1 (latest)

wanton crypt
hushed walrus
#

@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.

wanton crypt
#

Do we support these metrics for ZAPI?

hushed walrus
#

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.

wanton crypt
#

@hushed walrus 9.11 and above
Yes, I mean that do they support in ZAPI template?
Or only in REST?

hushed walrus
#

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.

wanton crypt
#

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
#

Yes

#

Pls do check if NFS zapi is giving you the results as you expect.

wanton crypt
hushed walrus
#

Could you share links of HWU?

hushed walrus
#

It should be

#

You can double check from ONTAP team once.

wanton crypt
#

@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?

hushed walrus
#

Yes, This is for CIFS only.

wanton crypt
#

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?

hushed walrus
#

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

wanton crypt
#

which is TCP connections
Are we able to create a metric for this value?

hushed walrus
#

Didn't get your question. Metric for which value?

wanton crypt
#

Metric for the "maximum number of connections - NAS" value from HWU,
Which shows 100,000.

hushed walrus
#

Sure. Please open a feature request for the same.

hushed walrus
wanton crypt
#

Is it possible to support ZAPI?

hushed walrus
#

Could you provide cluster version?

wanton crypt
#

9.11.1

hushed walrus
#

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.

wanton crypt
#

@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?

hushed walrus
wanton crypt
#

So is it is possible to create a template for this connected-clients right? Using network connections active show

hushed walrus
#

Yes

wanton crypt
#

@hushed walrus I cannot find related API for this command

#

“network connections active show”

hushed walrus
#

Have you tried api/private/cli/network/connections/active ?

wanton crypt
hushed walrus
#

Sure, Let us know if any issues.

wanton crypt
#

Is this correct?
With "?service=nfs" after the query

hushed walrus
#

Could you share template in text format?

wanton crypt
#

`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`

hushed walrus
#

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
wanton crypt
#

@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

hushed walrus
#

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'
wanton crypt
#

The curl output is the same as the metric

hushed walrus
#

Could you email the output

wanton crypt
#

I can only took the screenshot

hushed walrus
#

Thanks. Seems like Harvest number is matching then?

wanton crypt
#

Yes,
Seems like API number is not the same as the CLI number

hushed walrus
#

Possibily related to 9.7 version. Seems correct in 9.15

wanton crypt
#

9.9 and above version are correct