diff --git a/Pipfile.lock b/Pipfile.lock index a53c97d..6e95a40 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -18,11 +18,12 @@ "default": { "prometheus-client": { "hashes": [ - "sha256:1b12ba48cee33b9b0b9de64a1047cbd3c5f2d0ab6ebcead7ddda613a750ec3c5", - "sha256:317453ebabff0a1b02df7f708efbab21e3489e7072b61cb6957230dd004a0af0" + "sha256:4585b0d1223148c27a225b10dbec5ae9bc4c81a99a3fa80774fa6209935324e1", + "sha256:c88b1e6ecf6b41cd8fb5731c7ae919bf66df6ec6fafa555cd6c0e16ca169ae92" ], "index": "pypi", - "version": "==0.12.0" + "markers": "python_version >= '3.8'", + "version": "==0.19.0" } }, "develop": {} diff --git a/README.md b/README.md index 41c3b38..e38cf5a 100644 --- a/README.md +++ b/README.md @@ -15,21 +15,22 @@ It connects to the TCP port of the GPSD daemon and records relevant statistics a Make sure gpsd, prometheus and grafana are properly running. `gpsd-prometheus-exporter`needs `python3` and the following python libraries: * [prometheus_client](https://github.com/prometheus/client_python) -* gps-python libraries [gps](https://gpsd.gitlab.io/gpsd/) Note that this exporter needs at least version 3.19 of the lib's. Normally this comes with the instalation of gpsd. +* gps-python libraries [gps](https://gpsd.gitlab.io/gpsd/) Note that this exporter needs at least version 3.19 of the lib's. Normally this comes with the instalation of gpsd. To install: - pip3 install prometheus_client - pip3 install gps + apt update + atp install python3-prometheus-client + atp install python3-gps If you want the `gpsd-prometheus-exporter` to be loaded automatically by `systemd` please copy `gpsd_monitor.defaults` to `/etc/default/gpsd_monitor.defaults` and `gpsd_monitor.service` to `/lib/systemd/system` - git clone git@github.com:brendanbank/gpsd-prometheus-exporter.git + git clone https://github.com/brendanbank/gpsd-prometheus-exporter.git cd gpsd-prometheus-exporter - sudo cp gpsd_exporter.defaults /etc/default - sudo cp gpsd_exporter.service /lib/systemd/system - sudo cp gpsd_exporter.py /usr/local/bin + cp gpsd_exporter.defaults /etc/default + cp gpsd_exporter.service /etc/systemd/system + cp gpsd_exporter.py /usr/local/bin Make sure `gpsd_exporter.py` has the execution bit set: diff --git a/gpsd_exporter.py b/gpsd_exporter.py index 08dee6f..183c090 100755 --- a/gpsd_exporter.py +++ b/gpsd_exporter.py @@ -173,7 +173,7 @@ def main(argv=None): # IGNORE:C0111 metrics = init_metrics(args) - start_http_server(args.exporter_port, registry=metrics['registry']) + start_http_server(args.exporter_port, addr = '::', registry=metrics['registry']) while True: try: