netmaker/cli/cmd/metrics/network.go
2022-11-28 19:27:17 +05:30

21 lines
450 B
Go

package metrics
import (
"github.com/gravitl/netmaker/cli/functions"
"github.com/spf13/cobra"
)
var metricsNetworkCmd = &cobra.Command{
Use: "network [NETWORK NAME]",
Args: cobra.ExactArgs(1),
Short: "Retrieve network metrics",
Long: `Retrieve network metrics`,
Run: func(cmd *cobra.Command, args []string) {
functions.PrettyPrint(functions.GetNetworkNodeMetrics(args[0]))
},
}
func init() {
rootCmd.AddCommand(metricsNetworkCmd)
}