Fix: Label pool.Name on metric was missing
This commit is contained in:
parent
a23e9f0c27
commit
510d087da9
1 changed files with 2 additions and 2 deletions
|
@ -135,10 +135,10 @@ func (e *Exporter) Collect(ch chan<- prometheus.Metric) {
|
|||
e.PoolManager.Update()
|
||||
|
||||
for _, pool := range e.PoolManager.Pools {
|
||||
ch <- prometheus.MustNewConstMetric(e.scrapeFailues, prometheus.CounterValue, float64(pool.ScrapeFailures))
|
||||
ch <- prometheus.MustNewConstMetric(e.scrapeFailues, prometheus.CounterValue, float64(pool.ScrapeFailures), pool.Name)
|
||||
|
||||
if pool.ScrapeError != nil {
|
||||
ch <- prometheus.MustNewConstMetric(e.up, prometheus.GaugeValue, 0)
|
||||
ch <- prometheus.MustNewConstMetric(e.up, prometheus.GaugeValue, 0, pool.Name)
|
||||
log.Error("Error scraping PHP-FPM: %v", pool.ScrapeError)
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue