#custom rest tmplate

1 messages · Page 1 of 1 (latest)

old pewter
#

Hi, I am trying to port our custome zapi volume template to rest template. We added 2 labels in our custom template.

      - ^is-enabled             => autosize_is_enabled

    - volume-id-attributes:
      - ^junction-path              => junction_path
But after adding these to rest template, they are empty strings in the returned metrics
My custom rest volume template is attached. Thanks!
simple chasm
#

We can check if they are available through private cli

#

We can use autosize-mode for is-enabled

covert wyvern
#

yep i was going to ask what version of ONTAP you have because we don't see that property

old pewter
#

ontap 9.10.1P10 and harvest 23.02

simple chasm
#

junction-path is available through private cli api/private/cli/volume?fields=junction_path

covert wyvern
old pewter
#

can i change the query in the template to private cli?

simple chasm
#

It's already there.. you only need to add one line

covert wyvern
#

you should also check if the public api has what you want via

#

otherwise private CLI should cover your case by adding the junction-path Rahul found in this section of the template

#

since line 56 is already using the private CLI

old pewter
#

i see. i added junction to the wrong section

covert wyvern
#

this works with your template

#

and if you want autosize_is_enabled to be published with true|false you can do that like this (edited your example)

old pewter
#

both are working! now i will see if the File System Analytics dashboard will have data. thanks lot!

simple chasm
#

Just FYI for File System Analytics

This dashboard requires ONTAP 9.8+ and the APIs are only available via REST. Please enable the REST collector in your harvest config. To collect and display usage data such as capacity analytics, you need to enable File System Analytics on a volume. Please see https://docs.netapp.com/us-en/ontap/task_nas_file_system_analytics_enable.html for more details.

old pewter
#

yeah all our clusters are 9.8+ and now i can use rest volume template, will this be enough?

simple chasm
old pewter
#

yes i have that enabled

old pewter
#

the FSA dashboard still has no data. from the variable defination

label_values(volume_analytics_dir_bytes_used{datacenter=~"$Datacenter",cluster=~"$Cluster",svm=~"$SVM"}, volume)

I dot't see volume_analytics_dir_bytes_used in prometheus. so it can't find svm and volume
also i see this these in the log

│ 2023-02-28T18:21:30Z INF collector/collector.go:483 > Collected Poller=flc1-noprod-ash-storage apiMs=402 calcMs=1 collector=ZapiPerf:Volume instances=328 metrics=3608 parseMs=75 pluginMs=2 skips=0                                 │
│ 2023-02-28T18:21:38Z INF collector/collector.go:346 > no instances, entering standby Poller=flc1-noprod-ash-storage collector=Rest:VolumeAnalytics task=data  ```
do i need enable something on the filer to make Rest:VolumeAnalytics work?
covert wyvern
#

it's "different" in that way from most ONTAP features

old pewter
#

ahh sorry i missed that

covert wyvern
#

no worries! we'll try to make that more clear in the dashboard

#

maybe this makes it more clear? Although I guess you know what to look for now and can never see it as a newbie again 😁

#

is that better?

old pewter
#

sigh. now i have other issues. after i moved REST ahead of Zapi in harvest.yml, it ignores my custom zapi for node.yaml which as nvram battery status. need fix that first.

old pewter
#

it's working!