1
0
Fork 0
mirror of https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git synced 2024-11-21 13:20:11 +00:00

prometheus cleanups (#161)

This commit is contained in:
Fred Clausen 2024-11-15 09:57:22 -07:00 committed by GitHub
commit 414e1c0b02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 28 deletions

View file

@ -131,8 +131,8 @@ The general principle behind the port numbering, is:
| `31004/tcp` | MLATHUB Beast protocol input | | `31004/tcp` | MLATHUB Beast protocol input |
| `31005/tcp` | MLATHUB Beast protocol output | | `31005/tcp` | MLATHUB Beast protocol output |
| `31006/tcp` | MLATHUB Beast-reduce protocol output | | `31006/tcp` | MLATHUB Beast-reduce protocol output |
| `9273/tcp` | Prometheus web interface with data from `readsb` | | `9273/tcp` | Prometheus http endpoint with data from `telegraf` |
| `9274/tcp` | Prometheus web interface with data from `Telegraf` | | `9274/tcp` | Prometheus http endpoint with data from `readsb` |
| `80/tcp` | Tar1090 (map) web interface | | `80/tcp` | Tar1090 (map) web interface |
Any of these ports can be made available to the host system by using the `ports:` directive in your `docker-compose.yml`. The container's web interface is rendered to port `80` in the container. This can be mapped to a port on the host using the docker-compose `ports` directive. In the example [`docker-compose.yml`](docker-compose.yml) file, the container's Tar1090 interface is mapped to `8080` on the host system, and ports `9273-9274` are exposed as-is: Any of these ports can be made available to the host system by using the `ports:` directive in your `docker-compose.yml`. The container's web interface is rendered to port `80` in the container. This can be mapped to a port on the host using the docker-compose `ports` directive. In the example [`docker-compose.yml`](docker-compose.yml) file, the container's Tar1090 interface is mapped to `8080` on the host system, and ports `9273-9274` are exposed as-is:
@ -907,7 +907,6 @@ In order for Telegraf to serve a [Prometheus](https://prometheus.io) endpoint, t
| Variable | Description | | Variable | Description |
| ------------------- | ------------------------------------------------------------------------ | | ------------------- | ------------------------------------------------------------------------ |
| `PROMETHEUS_ENABLE` | Set to `true` for a Prometheus endpoint on `http://0.0.0.0:9273/metrics` | | `PROMETHEUS_ENABLE` | Set to `true` for a Prometheus endpoint on `http://0.0.0.0:9273/metrics` |
| `PROMETHEUSPORT` | TCP port for the Prometheus endpoint. Default value is `9273` |
### Output from Ultrafeeder to InfluxDBv2 ### Output from Ultrafeeder to InfluxDBv2

View file

@ -1,25 +0,0 @@
#!/command/with-contenv bash
#shellcheck shell=bash disable=SC1091
source /scripts/common
if ! chk_enabled "$PROMETHEUS_ENABLE"; then
exit 0
fi
# serve port 9274 always replying with stats.prom regardless of requested path
cat > /etc/nginx/sites-enabled/prometheus_9274 <<EOF
server {
listen 9274 default_server;
root /var/www/html;
server_name _;
location /metrics {
alias /run/readsb/stats.prom;
}
location / {
alias /run/readsb/stats.prom;
rewrite (.*) /metrics last;
}
}
EOF