Add metrics command / output to debug bundle

This commit is contained in:
davemay99
2020-10-05 22:30:01 -04:00
parent 9a36ebe228
commit bf8bdc94f8
6 changed files with 233 additions and 0 deletions

View File

@@ -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
}