Fix comments and docstring in getCrashLs

This commit is contained in:
Xavier Villaneau 2022-06-15 16:10:41 -04:00
parent c34a208ff6
commit 278bb873e1
1 changed files with 1 additions and 4 deletions

View File

@ -69,13 +69,10 @@ type cephCrashLs struct {
Archived string `json:"archived"` Archived string `json:"archived"`
} }
// getCrashLs runs the 'crash ls' command and parses its results // getCrashLs runs the 'ceph crash ls' command and process its results
func (c *CrashesCollector) getCrashLs() (map[crashEntry]int, error) { func (c *CrashesCollector) getCrashLs() (map[crashEntry]int, error) {
crashes := make(map[crashEntry]int) crashes := make(map[crashEntry]int)
// We parse the plain format because it is quite compact.
// The JSON output of this command is very verbose and might be too slow
// to process in an outage storm.
cmd, err := json.Marshal(map[string]interface{}{ cmd, err := json.Marshal(map[string]interface{}{
"prefix": "crash ls", "prefix": "crash ls",
"format": "json", "format": "json",