network_ext.go 521 B

1234567891011121314151617181920
  1. package metrics
  2. import (
  3. "github.com/gravitl/netmaker/cli/functions"
  4. "github.com/spf13/cobra"
  5. )
  6. var metricsNetworkExtCmd = &cobra.Command{
  7. Use: "network_ext [NETWORK NAME]",
  8. Args: cobra.ExactArgs(1),
  9. Short: "Retrieve metrics of external clients on a given network",
  10. Long: `Retrieve metrics of external clients on a given network`,
  11. Run: func(cmd *cobra.Command, args []string) {
  12. functions.PrettyPrint(functions.GetNetworkExtMetrics(args[0]))
  13. },
  14. }
  15. func init() {
  16. rootCmd.AddCommand(metricsNetworkExtCmd)
  17. }