We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c63447 commit d6b3b77Copy full SHA for d6b3b77
postgres_exporter.go
@@ -477,12 +477,13 @@ func (e *Exporter) scrape(ch chan<- prometheus.Metric) {
477
478
for namespace, mapping := range e.metricMap {
479
log.Debugln("Querying namespace: ", namespace)
480
- func () { // Don't fail on a bad scrape of one metric
+ func () {
481
query, er := queryOverrides[namespace]
482
if er == false {
483
query = fmt.Sprintf("SELECT * FROM %s;", namespace)
484
}
485
486
+ // Don't fail on a bad scrape of one metric
487
rows, err := db.Query(query)
488
if err != nil {
489
log.Println("Error running query on database: ", namespace, err)
0 commit comments