Skip to content

Commit

Permalink
Merge pull request #6 from brendanbank/5-several-recommendations
Browse files Browse the repository at this point in the history
5 several recommendations
  • Loading branch information
brendanbank committed Dec 22, 2023
2 parents 1503e76 + 6b07803 commit 3af95a8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
7 changes: 4 additions & 3 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion gpsd_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3af95a8

Please sign in to comment.