Collect network data from a custom-named NIC
Scenario Description
After a business cluster is created, platform monitoring can only recognize ’eth.|’ by defaulten.|For the NIC name defined by the user, the network traffic data cannot be viewed on the monitoring page, so the platform supports modifying the relevant resource parameters to manually capture the NIC traffic data.
Steps
-
Click Global.
-
In the global cluster, find the resource name of the moduleinfo corresponding to the business cluster:
kubectl get moduleinfo | grep -E 'prometheus|victoriametrics'
An example of the output is as follows:
```
global-6448ef7f7e5e3924c1629fad826372e7 global prometheus prometheus Running v3.15.0-zz231204040711-9d1fc12474c2 v3.15.0-zz231204040711-9d1fc12474c2 v3.15. 0-zz231204040711-9d1fc12474c2
ovn-0954f21f0359720e8c115804376b3e7e ovn prometheus prometheus Running v3.15.0-zz231204040711-9d1fc12474c2 v3.15.0-zz231204040711-9d1fc12474c2 v3.15. 0-zz231204040711-9d1fc12474c2
```
-
Edit the moduleinfo resource of the service cluster and replace ‘ovn-0954f21f0359720e8c115804376b3e7e’ with the name of the moduleinfo resource of the service cluster output in the previous step.
kubectl edit moduleinfo ovn-0954f21f0359720e8c115804376b3e7e -
Add the valuesOverride field to modify the field and regular expression based on the comment information:
spec: valuesOverride: # If this field does not exist, you need to add the valuesOverride field and the following parameters to the spec ait/chart-cpaas-monitor: ovn: # Replace the cluster name of the service cluster indicator: networkDevice: eth.*|em.*|en.*|wl.*|ww.*|[A-Z].*i|custom_interface # Replace custom_interface with a custom regular expression to ensure that the NIC name is correctly matched -
After waiting for 10 minutes, check the network charts on the node’s monitoring page to ensure that the changes take effect.