#Harvest zapi template for counts ?

1 messages · Page 1 of 1 (latest)

lyric echo
#

I am trying to create a harvest template for doing a 'count' of the number of locks on the filers. I don't want to capture all the locks, there could be thousands of them, but what I want is a count of locks per node.

What we have previously done is use the Netapp_API call and search throught the data. For each record returned, we loop and search for a node list we provide (via another call) and if the node is in the list, we increment the dictionary to increase the number of locks that each node has.

The metric we publish looks like this:

fileserver_locks{filername="nodename"} 58
etc.

We then use this data in prometheus to set alerts that are sent if this number exceeds the total we would LIKE to not see.

Here's what I believe is a starting point for this data, but I know it returns a list of all of the data, not just a count.

name: Locks
query: lock-get-iter
object: lock

collect_only_labels: true

counters:
lock-info:

  • ^node
  • ^^lockid

I'd guess that this would return node and lock id for each unique value of both, which is NOT what I would like to publish to prometheus.

Thanks,

warped robin
#

@lyric echo We'll need to build support for this. Can you open a feature request for this?
Do you want to count locks by node?

lyric echo
#

yes, that's how they are done today. Maybe someone would want them by cluster as well. Having both wouldn't be that many records.

#

can you provide a link to 'feature request' and how to do it? I have never done that before.

warped robin
lyric echo
#

Done, feature submitted