...
1 package cmd
2
3 import (
4 "github.com/spf13/cobra"
5 )
6
7
8 func newCmdDiagnostics() *cobra.Command {
9
10 diagnosticsCmd := &cobra.Command{
11 Use: "diagnostics [flags]",
12 Aliases: []string{"dg"},
13 Args: cobra.NoArgs,
14 Short: "Commands used to diagnose Linkerd components",
15 Long: `Commands used to diagnose Linkerd components.
16
17 This command provides subcommands to diagnose the functionality of Linkerd.`,
18 Example: ` # Get control-plane component metrics
19 linkerd diagnostics controller-metrics
20
21 # Get metrics from the web deployment in the emojivoto namespace.
22 linkerd diagnostics proxy-metrics -n emojivoto deploy/web
23
24 # Get the endpoints for authorities in Linkerd's control-plane itself
25 linkerd diagnostics endpoints web.linkerd-viz.svc.cluster.local:8084
26 `,
27 }
28
29 diagnosticsCmd.AddCommand(newCmdControllerMetrics())
30 diagnosticsCmd.AddCommand(newCmdEndpoints())
31 diagnosticsCmd.AddCommand(newCmdMetrics())
32 diagnosticsCmd.AddCommand(newCmdPolicy())
33 diagnosticsCmd.AddCommand(newCmdDiagnosticsProfile())
34
35 return diagnosticsCmd
36 }
37
View as plain text