NetApp / harvest

Open-metrics endpoint for ONTAP and StorageGRID
https://netapp.github.io/harvest/latest
Apache License 2.0
150 stars 37 forks source link

Limit which instances are collected #868

Open cgrinds opened 2 years ago

cgrinds commented 2 years ago

Discussed in https://github.com/NetApp/harvest/discussions/867

Originally posted by **luddite516** February 17, 2022 We have a use case where we are collecting file lock statistics for a specific vserver. I have built the following template to collect lock stats: name: Locks query: lock-get-iter object: lock collect_only_labels: true counters: lock-info: - ^node - ^volume - ^vserver - ^path - ^^lockid - ^client-address => client_ip - ^smb-open-type => smb_open_type export_options: instance_keys: - lockid instance_labels: - vserver - volume - node - path - client_ip - smb_open_type The above template collects all the locks in the cluster, and there may be hundreds of thousands of them. Is there any way to limit which instances are collected, to reduce load on cluster? For example, limit collection to only a specific vserver or volume? Thanks.
cgrinds commented 8 months ago

@luddite516 as of Harvest 24.02, filtering is supported by the Rest and ZapiPerf collectors. We still don't have filtering for Zapi, would moving to Rest work you?

ONTAP added api/protocols/locks in ONTAP 9.10.0, REST private CLI for 9.6+ may also work for you if you're unable to upgrade.

luddite516 commented 7 months ago

Yes, I believe we could move to REST. We are going to have to get there eventually.

On Wed, Feb 28, 2024 at 9:10 AM Chris Grindstaff @.***> wrote:

@luddite516 https://github.com/luddite516 as of Harvest 24.02, filtering is supported by the Rest and ZapiPerf collectors. We still don't have filtering for Zapi, would moving to Rest work you?

ONTAP added api/protocols/locks in ONTAP 9.10.0, REST private CLI for 9.6+ may also work for you if you're unable to upgrade.

— Reply to this email directly, view it on GitHub https://github.com/NetApp/harvest/issues/868#issuecomment-1964879359, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKO2LMWI4HLIVG7IEK45SYTYV43E7AVCNFSM5OVRZM3KU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJWGQ4DOOJTGU4Q . You are receiving this because you were mentioned.Message ID: @.***>

rahulguptajss commented 5 months ago

@luddite516 See if the lock templates for Zapi and Rest are helpful. These templates only provide the count of locks at the node, svm, lif, and volume levels. They are designed to avoid collecting thousands of lock instances, as requested in this issue.