#Is there a nwk_ctx::utilization graph in Harvest?

1 messages · Page 1 of 1 (latest)

drifting cipher
#

A customer is asking if there is a way to monitor nwk_ctx::utilization in Harvest? I don't know how to create a custom collector, so asking for them here. It can mimic PAS Network Context view.

proper forge
#

not sure offhand, but you should be able to.
There are stat counters for it
stats start nwk_ctx rw_ctx
Would start a normal stats collection, so it should be possible.
I would wait for somebody with more in depth knowledge to confirm, but I believe it should be possible

feral ether
#

Hi @drifting cipher yes that can be added for ZapiPerf, but not RestPerf. I'll paste a template you can try in a moment

drifting cipher
drifting cipher
#

I thought there was a way through REST to invoke custom commands, but I don't know if that works or not.

feral ether
#

RestPerf only supports a point-in-time set of objects and counters that Harvest collected a couple of years ago. We have to ask ONTAP to add new objects/counters for RestPerf, which nwk_ctx would be.

You can invoke ONTAP CLI statistics commands via private CLI, but Harvest doesn't currently support parsing the ONTAP CLI statistics response. That would require a new kind of collector since those responses are not JSON or even fully structured. The CLI responses were probably meant for humans not programs to parse

drifting cipher
#

Thanks Chris. Yeah that should work. ZAPI will be around for a while at least.

feral ether
#

Can you give this a try @drifting cipher

name:                     NetworkContext
query:                    nwk_ctx
object:                   nwk_ctx

instance_key:             uuid

counters:
  - instance_uuid
  - utilization

plugins:
  LabelAgent:
    split:
      - instance_uuid `:` node,kind,name

export_options:
  instance_keys:
    - name
    - node

Add NetworkContext: network_context.yaml to conf/zapiperf/default.yaml

Here are what the metrics look like:

curl -s 'http://localhost:14001/metrics' | grep -Ev '^#|metadata'
nwk_ctx_utilization{cluster="umeng-aff300-01-02",datacenter="dc-1",name="ctx_18",node="umeng-aff300-01"} 2
nwk_ctx_utilization{cluster="umeng-aff300-01-02",datacenter="dc-1",name="ctx_08",node="umeng-aff300-01"} 18
nwk_ctx_utilization{cluster="umeng-aff300-01-02",datacenter="dc-1",name="ctx_01",node="umeng-aff300-01"} 27
drifting cipher
#

Thanks. That should work. Let me test on my lab system.

#

Do I need to restart Harvest or anything?

feral ether
#

yes, the template files are only read at startup so any edits after Harvest has already started won't be picked up until you restart

drifting cipher
#

Which dashboard will that be on?

feral ether
#

None. The template above collects the metrics and makes them available to Prometheus (as shown in the curl).

Now that the metrics are being scrapped by Prometheus, a new dashboard panel could be created to display them, but there isn't one in Harvest today

drifting cipher
#

Ah ok.

drifting cipher
#

Layer 8 problem somewhere.