mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-16 08:26:16 +00:00
runtime: stop reporting net dev metrics for the shim
As part of the shim network metrics, the shim is reporting network interfaces from the host with no namespace isolation - this gives insight in interfaces not tied to the kata containers, and causes an increase in resource usage for kata metrics. As the shim itself is not using the network (all its communication with other processes is done with local unix sockets), there is no reason to keep gathering and reporting shim-specific network metrics. Actual network usage of the kata containers can be found from the existing hypervisor network metrics (kata_hypervisor_netdev) and from the agent network metrics (kata_guest_netdev_stat). Fixes: #5738 Signed-off-by: Julien Ropé <jrope@redhat.com>
This commit is contained in:
parent
5d3ae360ed
commit
9de65707ca
@ -49,14 +49,6 @@ var (
|
||||
[]string{"item"},
|
||||
)
|
||||
|
||||
katashimNetdev = prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Namespace: namespaceKatashim,
|
||||
Name: "netdev",
|
||||
Help: "Kata containerd shim v2 network devices statistics.",
|
||||
},
|
||||
[]string{"interface", "item"},
|
||||
)
|
||||
|
||||
katashimIOStat = prometheus.NewGaugeVec(prometheus.GaugeOpts{
|
||||
Namespace: namespaceKatashim,
|
||||
Name: "io_stat",
|
||||
@ -89,7 +81,6 @@ func registerMetrics() {
|
||||
prometheus.MustRegister(katashimThreads)
|
||||
prometheus.MustRegister(katashimProcStatus)
|
||||
prometheus.MustRegister(katashimProcStat)
|
||||
prometheus.MustRegister(katashimNetdev)
|
||||
prometheus.MustRegister(katashimIOStat)
|
||||
prometheus.MustRegister(katashimOpenFDs)
|
||||
prometheus.MustRegister(katashimPodOverheadCPU)
|
||||
@ -108,14 +99,6 @@ func updateShimMetrics() error {
|
||||
katashimOpenFDs.Set(float64(fds))
|
||||
}
|
||||
|
||||
// network device metrics
|
||||
if netdev, err := proc.NetDev(); err == nil {
|
||||
// netdev: map[string]NetDevLine
|
||||
for _, v := range netdev {
|
||||
mutils.SetGaugeVecNetDev(katashimNetdev, v)
|
||||
}
|
||||
}
|
||||
|
||||
// proc stat
|
||||
if procStat, err := proc.Stat(); err == nil {
|
||||
katashimThreads.Set(float64(procStat.NumThreads))
|
||||
|
Loading…
Reference in New Issue
Block a user