Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 992c449d authored by Arnaud RIESS's avatar Arnaud RIESS
Browse files

puppetdb_status: added "deactivated" label

parent 600aad27
No related branches found
No related tags found
No related merge requests found
......@@ -144,9 +144,9 @@ func (e *Exporter) Scrape(interval time.Duration, unreportedNode string, categor
case "unchanged":
statusState[2] = 1
}
e.metrics["status"].With(prometheus.Labels{"environment": node.ReportEnvironment, "host": node.Certname, "state": "failed"}).Set(statusState[0])
e.metrics["status"].With(prometheus.Labels{"environment": node.ReportEnvironment, "host": node.Certname, "state": "changed"}).Set(statusState[1])
e.metrics["status"].With(prometheus.Labels{"environment": node.ReportEnvironment, "host": node.Certname, "state": "unchanged"}).Set(statusState[2])
e.metrics["status"].With(prometheus.Labels{"environment": node.ReportEnvironment, "host": node.Certname, "deactivated": deactivated, "state": "failed"}).Set(statusState[0])
e.metrics["status"].With(prometheus.Labels{"environment": node.ReportEnvironment, "host": node.Certname, "deactivated": deactivated, "state": "changed"}).Set(statusState[1])
e.metrics["status"].With(prometheus.Labels{"environment": node.ReportEnvironment, "host": node.Certname, "deactivated": deactivated, "state": "unchanged"}).Set(statusState[2])
}
reportMetrics, _ := e.client.ReportMetrics(node.LatestReportHash)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment