Need more LIF details
Is your feature request related to a problem? Please describe. We need more details on LIFs to enable better sorting.
Describe the solution you'd like
I think you can use the net-interface-get-iter API to get this data. Here is a list of metrics I'd like captured:
[administrative-status]
[current-node]
[current-port]
[data-protocols]
[interface-name]
[ipspace]
[is-home]
[operational-status]
[vserver]
All of these attributes have RESTAPI equivalent, except "data-protocols" which is deprecated in RESTAPI and replaced with "services" field. FYI.
I think services or service-names might be better than data-protocol since it will also get intercluster traffic. However, it doesn't seem to collect anything on FC or NVMe/FC LIFs, but I don't think that would be an issue since we get that data elsewhere.
Check my response here. If it's not easy for you to create a custom template, let us know, we probably need to improve docs. Otherwise this is #wontfix.
I checked the net-interface-get-iter, there are two issues we should be aware of:
- The API contains no numeric metrics, therefore the
collect_only_labelsparameter must be added to the subtemplate. - The
data-protocolsis an array of strings, currently the Zapi collector can not collect this. Feel free to add a feature request. This is easy to do, however we need to think what's the best way to format this into a set of Prometheus-labels (or just add as a single, comma-saparated label?).
The subtemplate I created is conf/zapi/cdot/9.8.0/net_interface.yaml:
name: NetInterface
query: net-interface-get-iter
object: net_interface
collect_only_labels: true
counters:
net-interface-info:
- ^address => addr
- ^address-family => addr_famiy
- ^administrative-status => admin_status
- ^current-node => current_node
- ^current-port => current_port
- ^^home-node => home_node
- ^home-port => home_port
- ^^interface-name => interface
- ^ipspace => ipspace
- ^is-home => is_home
- ^operational-status => op_status
- ^^vserver => svm
plugins:
LabelAgent:
value_mapping: status op_status ok `0`
export_options:
include_all_labels: true
Don't forget to add the new Object to conf/zapi/custom.yaml:
objects:
...
NetInterface: net_interface.yaml
Example of the output:
net_interface_status{datacenter="MUCCBC",cluster="jamaica",home_port="a0a-192",svm="ohaensels3.local",addr="192.168.39.110",current_port="a0a-192",home_node="jamaica-01",interface="ohaensels3lif",ipspace="Default",is_home="true",op_status="up",addr_famiy="ipv4",admin_status="up",current_node="jamaica-01"} 0
net_interface_status{datacenter="MUCCBC",cluster="jamaica",addr="192.168.100.111",current_node="jamaica-01",current_port="a0b-192",home_port="a0b-192",ipspace="Default",is_home="true",op_status="up",addr_famiy="ipv4",admin_status="up",home_node="jamaica-01",interface="lif_svm_niels_SAN_753",svm="svm_niels_SAN"} 0
net_interface_status{datacenter="MUCCBC",cluster="jamaica",is_home="true",op_status="up",svm="svmluns_malte",current_node="jamaica-02",current_port="a0a-172",home_node="jamaica-02",home_port="a0a-172",interface="lun_lif_malte_25",addr="172.30.128.25",addr_famiy="ipv4",admin_status="up",ipspace="Default"} 0
net_interface_status{datacenter="MUCCBC",cluster="jamaica",addr="172.31.0.231",addr_famiy="ipv4",current_port="a0b-999",home_port="a0b-999",ipspace="InterclusterIP",op_status="up",admin_status="up",current_node="jamaica-01",home_node="jamaica-01",interface="ic_jamaica-01_lif1",is_home="true",svm="InterclusterIP"} 0
No idea? Could this be implemented similarly to the way resource maps are handled in workload details? https://github.com/NetApp/harvest/blob/main/conf/zapiperf/cdot/9.8.0/workload_detail.yaml
I can sort of read some code. No idea how to write it.
Updated Zapi template for 22.02 version onwards as value_mapping is deprecated
name: NetInterface
query: net-interface-get-iter
object: net_interface
collect_only_labels: true
counters:
net-interface-info:
- ^address => addr
- ^address-family => addr_famiy
- ^administrative-status => admin_status
- ^current-node => current_node
- ^current-port => current_port
- ^^home-node => home_node
- ^home-port => home_port
- ^^interface-name => interface
- ^ipspace => ipspace
- ^is-home => is_home
- ^operational-status => op_status
- ^^vserver => svm
plugins:
LabelAgent:
value_to_num:
- status op_status up up `0`
export_options:
include_all_labels: true
@jgasher LIF details added in Harvest Version 23.05 as part of issue #1875. Please let us know your feedback.
@jgasher Closing this issue as this information is available in Harvest as mentioned here.