summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicolargo <nicolas@nicolargo.com>2019-07-03 22:25:33 +0200
committernicolargo <nicolas@nicolargo.com>2019-07-03 22:25:33 +0200
commitbfcf212c2c6286d6f11fce06a16aa546c4f47c41 (patch)
treebdbfb7e9804843fc8ed215197b6d07b719d53525
parent7edb99923addd3e74610e407072be52afbe6f804 (diff)
Prometheus integration broken with latest prometheus_client #1397
-rw-r--r--NEWS1
-rw-r--r--conf/glances.conf2
-rw-r--r--glances/exports/glances_prometheus.py4
3 files changed, 4 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 834a1a70..16acebc2 100644
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,7 @@ Bugs corrected:
* Getting an error when running with prometheus exporter #1469
* Stack trace when starts Glances on CentOS #1470
* UnicodeEncodeError: 'ascii' codec can't encode character u'\u25cf' - Raspbian stretch #1483
+ * Prometheus integration broken with latest prometheus_client #1397
Others:
diff --git a/conf/glances.conf b/conf/glances.conf
index 0f2cff82..1e985bf7 100644
--- a/conf/glances.conf
+++ b/conf/glances.conf
@@ -469,7 +469,7 @@ prefix=G
host=localhost
port=9091
#prefix=glances
-labels=system:`uname -s`
+labels=src:glances
[restful]
# Configuration for the --export RESTful option
diff --git a/glances/exports/glances_prometheus.py b/glances/exports/glances_prometheus.py
index eb15768c..31667f9e 100644
--- a/glances/exports/glances_prometheus.py
+++ b/glances/exports/glances_prometheus.py
@@ -41,8 +41,8 @@ class Export(GlancesExport):
# Load the Prometheus configuration file section
self.export_enable = self.load_conf('prometheus',
- mandatories=['host', 'port'],
- options=['prefix', 'labels'])
+ mandatories=['host', 'port', 'labels'],
+ options=['prefix'])
if not self.export_enable:
sys.exit(2)