-
Hi @cgrinds, @rahulguptajss . I am trying to grab security_style parameter for volumes and trying to modify the Volume.yaml template. I tried to modify it as below but with no luck. Any idea what the issue might be? . I added 2 lines which i mentioned below with a comment "Added this line". Thanks for your help!
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
hi @s-kuchi the security style is returned under a different attribute. Here's one way to see that bin/harvest zapi -p u2 show attrs --api volume-get-iter | grep -C 10 style Results
Given that, this template should work for you. Can you give this a try? I annotated the additions with name: Volume
query: volume-get-iter
object: volume
# increase client timeout for volumes
client_timeout: 2m
counters:
volume-attributes:
- ^encrypt => isEncrypted
- volume-autosize-attributes:
- grow-threshold-percent
- maximum-size
- volume-id-attributes:
- ^^instance-uuid => uuid
- ^containing-aggregate-uuid => aggrUuid
- ^junction-path => junction_path
- ^name => volume
- ^owning-vserver-name => svm
- ^style-extended => style
- ^type => type
- aggr-list:
- ^aggr-name => aggr
- nodes:
- ^node-name => node
- volume-inode-attributes:
- files-total
- files-used
- volume-sis-attributes:
- ^is-sis-volume => is_sis_volume
- compression-space-saved => sis_compress_saved
- deduplication-space-saved => sis_dedup_saved
- percentage-compression-space-saved => sis_compress_saved_percent
- percentage-deduplication-space-saved => sis_dedup_saved_percent
- percentage-total-space-saved => sis_total_saved_percent
- total-space-saved => sis_total_saved
- volume-snapshot-attributes:
- ^auto-snapshots-enabled => auto_snapshots_enabled
- ^snapshot-policy
- snapshot-count
- volume-snapshot-autodelete-attributes:
- ^is-autodelete-enabled => snapshot_autodelete
- volume-space-attributes:
- expected-available
- filesystem-size => filesystem_size
- logical-available
- logical-used
- logical-used-by-afs
- logical-used-by-snapshots
- logical-used-percent
- overwrite-reserve => overwrite_reserve_total
- overwrite-reserve-used => overwrite_reserve_used
- percentage-size-used => size_used_percent
- percentage-snapshot-reserve => snapshot_reserve_percent
- percentage-snapshot-reserve-used => snapshot_reserve_used_percent
- physical-used
- physical-used-percent
- size => size
- size-available => size_available
- size-available-for-snapshots => snapshots_size_available
- size-total => size_total
- size-used => size_used
- size-used-by-snapshots => snapshots_size_used
- snapshot-reserve-available => snapshot_reserve_available
- snapshot-reserve-size => snapshot_reserve_size
- volume-state-attributes:
- ^is-node-root => node_root
- ^is-vserver-root => svm_root
- ^state
- ^status
- volume-security-attributes: # ADDME
- ^style => security_style # ADDME
plugins:
- Volume:
schedule:
- data: 15m # should be multiple of data poll duration
include_constituents: false
- MetricAgent:
compute_metric:
- inode_used_percent PERCENT inode_files_used inode_files_total
- snapshot_reserve_used SUBTRACT snapshot_reserve_size snapshot_reserve_available
- overwrite_reserve_available SUBTRACT overwrite_reserve_total overwrite_reserve_used
- LabelAgent:
# metric label zapi_value rest_value `default_value`
value_to_num:
- new_status state online online `0`
# To prevent visibility of transient volumes, uncomment the following lines
# exclude_regex:
# # Exclude SnapProtect/CommVault Intellisnap, Clone volumes have a “_CVclone” suffix
# - volume `.+_CVclone`
# # Exclude SnapCenter, Clone volumes have a “DDMMYYhhmmss” suffix
# - volume `.+(0[1-9]|[12][0-9]|3[01])(0[1-9]|1[012])\d\d[0-9]{6}`
# # Exclude manually created SnapCreator clones, Clone volumes have a “cl_” prefix and a “_YYYYMMDDhhmmss” suffix
# - volume `cl_.+_(19|20)\d\d(0[1-9]|1[012])( 0[1-9]|[12][0-9]|3[01])[0-9]{6}`
# # Exclude SnapDrive/SnapManager, Clone volumes have a “sdw_cl_” prefix
# - volume `sdw_cl_.+`
# # Exclude Metadata volumes, CRS volumes in SVM-DR or MetroCluster have a “MDV_CRS_” prefix
# - volume `MDV_CRS_.+`
# # Exclude Metadata volumes, Audit volumes have a “MDV_aud_” prefix
# - volume `MDV_aud_.+`
replace:
- node_root root_volume `false` `No`
- svm_root root_volume `false` `No`
- node_root root_volume `true` `Yes`
- svm_root root_volume `true` `Yes`
# - ChangeLog
export_options:
instance_keys:
- aggr
- node
- style
- svm
- volume
instance_labels:
- clone_parent_snapshot
- clone_parent_svm
- clone_parent_volume
- isEncrypted
- isHardwareEncrypted
- is_sis_volume
- junction_path
- node_root
- root_volume
- security_style # ADDME
- snapshot_autodelete
- snapshot_policy
- state
- svm_root
- type |
Beta Was this translation helpful? Give feedback.
-
Awesome. That worked. Thank you @cgrinds . and thank you for the "bin/harvest zapi -p u2 show attrs --api volume-get-iter | grep -C 10 style" for future reference. |
Beta Was this translation helpful? Give feedback.
hi @s-kuchi the security style is returned under a different attribute. Here's one way to see that
bin/harvest zapi -p u2 show attrs --api volume-get-iter | grep -C 10 style
Results