mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-18 14:54:19 +01:00
runtime: add new command to collect metrics from Kata containers
Add a new command to collect metrics and return metrics to Prometheus. Signed-off-by: bin liu <bin@hyper.sh>
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
// Copyright (c) 2020 Ant Financial
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
package virtcontainers
|
||||
|
||||
import (
|
||||
@@ -57,7 +62,7 @@ var (
|
||||
|
||||
agentRpcDurationsHistogram = prometheus.NewHistogramVec(prometheus.HistogramOpts{
|
||||
Namespace: namespaceKatashim,
|
||||
Name: "agent_rpc_durations_histogram_million_seconds",
|
||||
Name: "agent_rpc_durations_histogram_milliseconds",
|
||||
Help: "RPC latency distributions.",
|
||||
Buckets: prometheus.ExponentialBuckets(1, 2, 10),
|
||||
},
|
||||
@@ -65,7 +70,7 @@ var (
|
||||
)
|
||||
)
|
||||
|
||||
func RegMetrics() {
|
||||
func RegisterMetrics() {
|
||||
prometheus.MustRegister(hypervisorThreads)
|
||||
prometheus.MustRegister(hypervisorProcStatus)
|
||||
prometheus.MustRegister(hypervisorProcStat)
|
||||
|
||||
Reference in New Issue
Block a user