#Is the "-comment" field captured for volumes?
1 messages · Page 1 of 1 (latest)
hi @raw lintel the comment field is not currently captured for volumes. We recently added a similar feature that might be useful - convert volume tags to Prometheus labels https://github.com/NetApp/harvest/discussions/3799
It's also possible to collect the comment field if that's what you need also
Are you using the Rest or Zapi collector and how did you install Harvest?
If possible I would prefer to collect the comment field as it provides a note of which customer the volume belongs to.
I am targeting Rest but I could do either or both. Long term, which will be supported?
Oh, this is a native install on Rocky 8
hi @raw lintel one of the issues with the comment field is that it can be quite long (up to 1023 characters) It also looks like some tools store JSON metadata there. 😮 I'm not sure about enabling it by default, but if you want to give it a try, can you try these steps?
Edit your conf/rest/9.12.0/volume.yaml file and add the comment counter like so:
counters:
- ^^volume
- ^^vserver => svm
- ^aggr_list => aggr
- ^clone_parent_name => clone_parent_volume
- ^clone_parent_vserver => clone_parent_svm
- ^comment => comment
then near the bottom of the file in the instance_labels section export the counter like so:
instance_labels:
- antiRansomwareState
- clone_parent_snapshot
- clone_parent_svm
- clone_parent_volume
- comment
Make these same changes in the conf/rest/9.14.0/volume.yaml file too. After making these changes, restart your pollers, and you should see the comment field collected. If that looks good, I explain who to add the column column to the Volume table like so
Awesome! This works great. I like how simple it was to add to the YAML...alphabetically. It's like it was well thought out...
thanks!
excellent!
Verified too:
volume_labels{antiRansomwareState="disabled",clone_parent_snapshot="",clone_parent_svm="",clone_parent_volume="",comment="Ansible Playbooks",isEncrypted="false",isHardwareEncrypted="false",is_sis_volume="true",is_space_enforcement_logical="false",is_space_reporting_logical="false",junction_path="/ansible_data",root_volume="No",snaplock_type="non_snaplock",snapshot_autodelete="false",snapshot_policy="default",state="online",svm_root="false",tags="",type="rw",datacenter="cts-lab-storage",cluster="labnasclus01",aggr="labcnas02_ssd_vm4",node="labcnas02",style="flexvol",svm="labvnas02",volume="ansible_data"} 1.0
Thanks again. This will be a huge win