Hi, does harvest scrape hwassist status? I can see it in zapi api, cf-hwassist-status. harvest show attrs returns all the attrs but show data returns nothing with "API request rejected => Missing input: node; Extra input: max-records". So not sure how to write a custom zapi template. Also can't find a REST api for this. Thanks!
#hwassist status
1 messages · Page 1 of 1 (latest)
we should be able to scrape it if there's a zapi @idle pumice let me take a look and get back to you
looks like hw_assist was added to REST as of 9.11 at this endpoint https://library.netapp.com/ecmdocs/ECMLP2884821/html/#/cluster/nodes_get
e.g. curl https://10.193.48.154/api/cluster/nodes?fields=**
Earlier versions of ONTAP you can use private CLI to retrieve similar like so
https://10.193.48.11/api/private/cli/storage/failover/hwassist?fields=node,partner-name,enabled,local-status,local-ip,local-port,local-inactive,local-action
ZAPI would require some Harvest changes since that ZAPI is not an iter ZAPI and as you mentioned requires that you pass the node (and does not support wildcards)
we are on ontap 9.10.1p10. will give the REST api a try. Thanks!
I added the following but it not working
name: HWASSIST
query: api/private/cli/storage/failover/hwassist
object: hwassist
counters:
- ^^node => node
- ^partner-name => partner-name
- ^enabled => enabled
- ^local-status => local-status
- ^local-ip => local-ip
- ^local-port => local-port
- ^local-inactive => local-inactive
- ^local-action => local-action
export_options:
instance_keys:
- node
instance_labels:
- partner-name
- enabled
- local-status
- local-ip
- local-port
- local-inactive
- local-action
This is what i see from the log
│ 2023-02-15T19:27:36Z INF collector/collector.go:483 > Collected Poller=flc1-noprod-phx-storage apiMs=305 calcMs=0 collector=Rest:DQP instances=4 metrics=12 parseMs=0 pluginMs=0 │
│ 2023-02-15T19:27:36Z INF collector/collector.go:483 > Collected Poller=flc1-noprod-phx-storage apiMs=309 calcMs=0 collector=Rest:HWASSIST instances=4 metrics=8 parseMs=0 pluginMs=0
DQP used to work and now stopped working
anything i missed?
those logs msgs mean the poller is collecting the metrics and exporting them. If I use your template unchanged, I see the metrics being published like so
there are some empty strings there, not sure if those are expected
based on what i pasted earlier via curl, I'm thinking those should not be empty
yeah
curl worked for me
{
"records": [
{
"node": "flc1-01-lab-ash-storage",
"partner_name": "flc1-02-lab-ash-storage",
"enabled": true,
"local_status": "active",
"local_ip": "10.74.64.47",
"local_port": 4444
},
{
"node": "flc1-02-lab-ash-storage",
"partner_name": "flc1-01-lab-ash-storage",
"enabled": true,
"local_status": "active",
"local_ip": "10.74.64.48",
"local_port": 4444
}
],
"num_records": 2
}
we'll see 🙂
interesting, in the curl cli it's hyphen not underscore
yes on the request side it is, but on the response side it's underscores. I thought we had some code to do that translation for you, but maybe that helper is only in the zapi collector. I'll check
when I update your template to use underscores, I get the same response as curl
cool. i will change my template and try again
ok, i found the code that replaces dashes with underscores. Looks like it does that automatically when you don't use the rename => marker, and yes, that behavior is used extensively in some zapi templates. Perhaps the idea is if you rename, you get the final call to decide on the name (even if it's wrong). That may be questionable 🙂 It's an easy fix to always replace. More pondering required, I'll open an issue to track. Are you all set?
still waiting prometheus collect metrics. at lease my dqp (disk qual) is back working again
hwassist_labels{cluster="flc1-lab-lon-storage", datacenter="LON", enabled="true", instance="flc1-lab-lon-storage", ip="10.62.21.11", job="netapp-harvest", node="flc1-01-lab-lon-storage", partner="flc1-02-lab-lon-storage", port="4444", status="active"}
thank you very much for your help!
excellent
here is the template
name: HWASSIST
query: api/private/cli/storage/failover/hwassist
object: hwassist
counters:
- ^^node => node
- ^partner_name => partner
- ^enabled => enabled
- ^local_status => status
- ^local_ip => ip
- ^local_port => port
- ^local_inactive => inactive
- ^local_action => action
export_options:
instance_keys:
- node
instance_labels:
- partner
- enabled
- status
- ip
- port
- inactive
- action