mirror of
https://github.com/gravitl/netmaker.git
synced 2024-11-10 17:48:25 +08:00
20 lines
447 B
Go
20 lines
447 B
Go
package metrics
|
|
|
|
import (
|
|
"github.com/gravitl/netmaker/cli/functions"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var metricsNodeCmd = &cobra.Command{
|
|
Use: "node [NETWORK NAME] [NODE ID]",
|
|
Args: cobra.ExactArgs(2),
|
|
Short: "Retrieve node metrics",
|
|
Long: `Retrieve node metrics`,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
functions.PrettyPrint(functions.GetNodeMetrics(args[0], args[1]))
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(metricsNodeCmd)
|
|
}
|