Hi all 🙂
Previously Rahul help me to integrate the "^igroup.initiators" from the "api/protocols/san/lun-maps" endpoint in a custom "lun.yaml" :
query: api/storage/luns
object: lun
counters:
- ^^uuid
- ^location.node.name => node
- ^location.qtree.name => qtree
- ^location.volume.name => volume
- ^name => path
- ^status.state => state
- ^svm.name => svm
- space.size => size
- space.used => size_used
endpoints:
- query: api/protocols/san/lun-maps
counters:
- ^^lun.uuid => uuid
- ^igroup.initiators => initiators
plugins:
- MetricAgent:
compute_metric:
- size_used_percent PERCENT size_used size
- LabelAgent:
value_to_num:
- new_status state online online `0`
# There are two flavors of path names
# /vol/volName/lunName
# /vol/volName/lun401/lunName
split_regex:
- path `^/[^/]+/([^/]+)(?:/.*?|)/([^/]+)$` volume,lun
export_options:
instance_keys:
- lun
- node
- qtree
- svm
- volume
instance_labels:
- state
- initiators```
I'd like to manipulate the initaitors label with a regexp to cut the last 37 char.
I've try to add this :
plugins:
- MetricAgent:
compute_metric:
- size_used_percent PERCENT size_used size - LabelAgent:
value_to_num:
- new_status state online online0There are two flavors of path names
/vol/volName/lunName
/vol/volName/lun401/lunName
split_regex:
- path^/[^/]+/([^/]+)(?:/.*?|)/([^/]+)$volume,lun
replace_regex:
- initiators instance_name(.+).{37}$$1
...
instance_labels:- state
- initiators
- instance_name```
But my new label is empty.
Clearly I failed, but, if you could point me out where, I'll be greatfull 🙂