#Need information about Qtree plugins
1 messages · Page 1 of 1 (latest)
@prime flower We have yesterday only added these metrics to our documents which are yet to be published to doc site but you can get details about these from here for now
https://github.com/NetApp/harvest/blob/release/23.02.0/docs/ontap-metrics.md#quota_disk_limit
Make sure, you are using minimum 22.11 harvest release.
sure, thank you!
@solar grove another question:
here is my qtree template:
`name: Qtree
query: qtree-list-iter
object: qtree
client_timeout: 2m
counters:
qtree-info:
- ^^volume
- ^^vserver => svm
- ^^qtree => qtree
collect_only_labels: true
plugins:
- LabelAgent:
exclude_equals:
- qtree ``
include_contains:
- volumetrident - Qtree:
objects:
- disk-limit => size_used
- disk-used => size_total
quotaType:
- tree
- user
- group
export_options:
instance_keys:- qtree
- volume
- svm
Can I change the instance key^^qtree => internal_volume_name` like this?
@prime flower Yes, you can change the instance key internal_volume_name like this. You would need to change it in counters section, exclude_equals section and instance_key section in this template. But, qtree_labels metric would be generated with your new label, not quota_xxxxmetrics, Because they are generated from plugin and they will have qtree label.
@bleak mortar not sure what am I missing here it does not seem to be changing:
this is the updated template:
`name: Qtree
query: qtree-list-iter
object: qtree
client_timeout: 2m
counters:
qtree-info:
- ^^volume
- ^^vserver => svm
- ^^qtree => internal_volume_name
collect_only_labels: true
plugins:
- LabelAgent:
exclude_equals:
- internal_volume_name ``
include_contains:
- volumetrident - Qtree:
objects:
- disk-limit => size_used
- disk-used => size_total
quotaType:
- tree
- user
- group
export_options:
instance_keys:- internal_volume_name
- volume
- svm`
Metrics O/P
qtree_size_used{cluster="aff250-astra-01-02",datacenter="DC-01",index="3",unit="Kbyte",type="tree",qtree="trident_pvc_825a0f89_6468_4208_b8e5_c1078da1dc10",volume="trident_qtree_pool_trident_HJWDMGQKGD",svm="msaravan-nas-eco-vm"} 8388608
As I mentioned above, Only qtree_labels metric will be changed as per your use-case as it's template generated. quota_xxxxx and qtree_xxxx metrics which are generated from plugin won't have this new label.
oh!! got it.
@bleak mortar Then is it possible that I could add a new field as internal_volume_name which has the value from qtree?
something that yields this:
qtree_size_used{cluster="aff250-astra-01-02",datacenter="DC-01",index="3",unit="Kbyte",type="tree",qtree="trident_pvc_825a0f89_6468_4208_b8e5_c1078da1dc10",internal_volume_name="trident_pvc_825a0f89_6468_4208_b8e5_c1078da1dc10",volume="trident_qtree_pool_trident_HJWDMGQKGD",svm="msaravan-nas-eco-vm"} 8388608
@prime flower custom plugin generated metrics which in your case Qtree https://github.com/NetApp/harvest/blob/main/cmd/collectors/zapi/plugins/qtree/qtree.go doesn't provide this flexibility of adding extra labels. If you have such requirement then you can file a github issue.
Few points to note based on the template changes I see from your side.
1: Renaming metrics in Qtree plugin like below is only supported in Zapi. Rest collector does not provide this https://github.com/NetApp/harvest/blob/main/conf/rest/9.12.0/qtree.yaml#L29.
- Qtree:
objects:
- disk-limit => size_used
- disk-used => size_total
2: We suggest you to use quota_disk_limit and quota_disk_used metrics. If you are just starting consuming these then better not to use deprecated ones. As highlighted in 22.11 release notes
Deprecation: Earlier versions of Harvest published quota metrics prefixed with qtree. Harvest release 22.11 deprecates the quota metrics prefixed with qtree and instead publishes quota metrics prefixed with quota. All dashboards have been updated. If you are consuming these metrics outside the default dashboards, please change to quota prefixed metrics. Harvest release 23.02 will remove the deprecated quota metrics prefixed with qtree.
FYI: We are not removing them in 23.02.