mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
Add metrics command / output to debug bundle
This commit is contained in:
@@ -200,6 +200,7 @@ func (c *OperatorDebugCommand) Run(args []string) int {
|
||||
flags.StringVar(&c.vault.tls.ClientKey, "vault-client-key", os.Getenv("VAULT_CLIENT_KEY"), "")
|
||||
|
||||
if err := flags.Parse(args); err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("Error parsing arguments: %q", err))
|
||||
return 1
|
||||
}
|
||||
|
||||
@@ -575,6 +576,9 @@ func (c *OperatorDebugCommand) collectNomad(dir string, client *api.Client) erro
|
||||
vs, _, err := client.CSIVolumes().List(qo)
|
||||
c.writeJSON(dir, "volumes.json", vs, err)
|
||||
|
||||
metrics, err := client.Operator().Metrics(qo)
|
||||
c.writeJSON(dir, "metrics.json", metrics, err)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user