Skip to content

Commit

Permalink
fix: volume rest template based on version (#2263)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hardikl authored Aug 7, 2023
1 parent db8a2c7 commit 5918213
Show file tree
Hide file tree
Showing 2 changed files with 142 additions and 0 deletions.
File renamed without changes.
142 changes: 142 additions & 0 deletions conf/rest/9.9.0/volume.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# This api would provide all volumes(but node).

name: Volume
query: api/storage/volumes
object: volume

counters:
- ^^name => volume
- ^^svm.name => svm
- ^aggregates.#.name => aggr
- ^aggregates.#.uuid => aggrUuid # handled in plugin for flexgroup
- ^encryption.enabled => isEncrypted
- ^is_svm_root => svm_root
- ^snaplock.type => snaplock_type
- ^snapshot_policy.name => snapshot_policy
- ^space.snapshot.autodelete.enabled => snapshot_autodelete
- ^state => state
- ^style => style
- ^type => type
- autosize.grow_threshold => autosize_grow_threshold_percent
- autosize.maximum => autosize_maximum_size
- snapshot_count
- space.afs_total => size_total
- space.available => size_available
- space.expected_available => space_expected_available
- space.filesystem_size => filesystem_size
- space.logical_space.available => space_logical_available
- space.logical_space.used => space_logical_used
- space.logical_space.used_by_afs => space_logical_used_by_afs
- space.logical_space.used_by_snapshots => space_logical_used_by_snapshots
- space.logical_space.used_percent => space_logical_used_percent
- space.overwrite_reserve => overwrite_reserve_total
- space.overwrite_reserve_used => overwrite_reserve_used
- space.percent_used => size_used_percent
- space.physical_used => space_physical_used
- space.physical_used_percent => space_physical_used_percent
- space.size => size
- space.size_available_for_snapshots => snapshots_size_available
- space.snapshot.reserve_available => snapshot_reserve_available
- space.snapshot.reserve_percent => snapshot_reserve_percent
- space.snapshot.reserve_size => snapshot_reserve_size
- space.snapshot.space_used_percent => snapshot_reserve_used_percent
- space.snapshot.used => snapshots_size_used
- space.used => size_used
- hidden_fields:
- autosize
- encryption.enabled
- is_svm_root
- snaplock.type
- space

endpoints:
- query: api/private/cli/volume
counters:
- ^^volume
- ^^vserver => svm
- ^is_sis_volume => is_sis_volume
- ^nodes => node
- compression_space_saved => sis_compress_saved
- compression_space_saved_percent => sis_compress_saved_percent
- dedupe_space_saved => sis_dedup_saved
- dedupe_space_saved_percent => sis_dedup_saved_percent
- files => inode_files_total
- files_used => inode_files_used
- sis_space_saved => sis_total_saved
- sis_space_saved_percent => sis_total_saved_percent

- query: api/storage/volumes
counters:
- ^^name => volume
- ^^svm.name => svm
- ^clone.parent_snapshot.name => clone_parent_snapshot
- ^clone.parent_svm.name => clone_parent_svm
- ^clone.parent_volume.name => clone_parent_volume
- clone.split_estimate => clone_split_estimate
- hidden_fields:
- clone
- filter:
- clone.is_flexclone=true

- query: api/private/cli/volume/efficiency/stat
counters:
- ^^volume
- ^^vserver => svm
- num_compress_attempts
- num_compress_fail
- filter:
- privilege_level=diagnostic

plugins:
- Volume:
schedule:
- data: 15m # should be multiple of poll duration
- 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:
exclude_equals:
- style `flexgroup_constituent`
value_to_num:
- new_status state online online `0`
replace:
- svm_root root_volume `false` `No`
- svm_root root_volume `true` `Yes`
# 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_.+`

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
- root_volume
- snaplock_type
- snapshot_autodelete
- snapshot_policy
- state
- svm_root
- type

0 comments on commit 5918213

Please sign in to comment.