Merge pull request #120 from alram/luminous

health: adds unclean PGs for luminous
This commit is contained in:
Alexandre Marangone 2019-06-20 12:59:38 -07:00 committed by GitHub
commit 41bf098e2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -989,6 +989,14 @@ func (c *ClusterHealthCollector) collect(ch chan<- prometheus.Metric) error {
}
c.DegradedObjectsCount.Set(float64(v))
}
matched = uncleanRegex.FindStringSubmatch(check.Summary.Message)
if len(matched) == 2 {
v, err := strconv.Atoi(matched[1])
if err != nil {
return err
}
c.UncleanPGs.Set(float64(v))
}
}
if k == "OBJECT_MISPLACED" {

View File

@ -473,6 +473,7 @@ $ sudo ceph -s
}`,
regexes: []*regexp.Regexp{
regexp.MustCompile(`degraded_objects{cluster="ceph"} 1.54443937e\+08`),
regexp.MustCompile(`unclean_pgs{cluster="ceph"} 4886`),
},
},
{