Closed lenkeybalis closed 1 month ago
I checked with native python scrip based execution. It seems to be working fine without issue. So maybe there will be the problem with my docker configuration or setup.
(pihole-exporter) blenkey@lcloud-bastion:~/pihole-influxdb-monitor$ python3 pihole-influxdb.py --pihole-alias "pihole" --pihole-address "http://192.168.0.30" --pihole-token "***" --pihole-num-top-items 25 --pihole-num-top-clients 25 --influxdb-address "https://influxdb" --influxdb-org "influx" --influxdb-token "----------" --influxdb-bucket "pihole" 21:29:15 [INFO] ================== Configuration ================== 21:29:15 [INFO] Pi-holes: pihole http://192.168.0.30 (Auth token provided) 21:29:15 [INFO] Poll interval: 60 seconds 21:29:15 [INFO] InfluxDB address: https://influxdb 21:29:15 [INFO] InfluxDB org: influxdata 21:29:15 [INFO] InfluxDB token: ** 21:29:15 [INFO] InfluxDB bucket: pihole 21:29:15 [INFO] InfluxDB verify SSL: True 21:29:15 [INFO] =================================================== 21:29:15 [INFO] Starting... 21:29:15 [INFO] [pihole] Queried successfully in 24ms 21:29:17 [INFO] [pihole] Wrote to InfluxDB successfully in 2418ms
Now I found the issue I needed to use this option in the docker-compose.yaml file.:
network_mode: "host"
root@lcloud-bastion:~/pihole-exporter-to-influx2# docker compose up
WARN[0000] /root/pihole-exporter-to-influx2/docker-compose.yaml: version
is obsolete
[+] Running 0/1
⠙ Container pihole-influxdb Recreated 0.2s
Attaching to pihole-influxdb
pihole-influxdb | 19:38:23 [INFO] ================== Configuration ==================
pihole-influxdb | 19:38:23 [INFO] Pi-holes: pihole http://192.168.0.30 (Auth token provided)
pihole-influxdb | 19:38:23 [INFO] Poll interval: 60 seconds
pihole-influxdb | 19:38:23 [INFO] InfluxDB address: https://influxdb
pihole-influxdb | 19:38:23 [INFO] InfluxDB org: influx
pihole-influxdb | 19:38:23 [INFO] InfluxDB token: **
pihole-influxdb | 19:38:23 [INFO] InfluxDB bucket: pihole
pihole-influxdb | 19:38:23 [INFO] InfluxDB verify SSL: True
pihole-influxdb | 19:38:23 [INFO] ===================================================
pihole-influxdb | 19:38:23 [INFO] Starting...
pihole-influxdb | 19:38:23 [INFO] [pihole] Queried successfully in 30ms
pihole-influxdb | 19:38:24 [INFO] [pihole] Wrote to InfluxDB successfully in 151ms
Dear Maintainer,
I use the docker-compose base setup. The pihole-exporter is running with PiHole server on the same server.
There are the following errors In the log :
I checked the connection from the same machine via cUrl.
The connection is working fine. Did you observe this kind of problem in the past or it would be a specific problem only for me?
Thank you so much for your help!
Regards, Balazs