diff --git a/.dictionary.txt b/.dictionary.txt new file mode 100644 index 0000000..9ac17d5 --- /dev/null +++ b/.dictionary.txt @@ -0,0 +1 @@ +crate diff --git a/.dockerignore b/.dockerignore index a001b00..fb8fade 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,4 +4,4 @@ .gitattributes READMETEMPLATE.md README.md -buildx.sh \ No newline at end of file +buildx.sh diff --git a/.github/workflows/cancel_dupes.yml b/.github/workflows/cancel_dupes.yml index f83f0d9..3381918 100644 --- a/.github/workflows/cancel_dupes.yml +++ b/.github/workflows/cancel_dupes.yml @@ -2,10 +2,10 @@ name: Cancelling Duplicates on: workflow_run: workflows: - - 'Deploy' - - 'Check Linting' - - 'Tests' - types: ['requested'] + - "Deploy" + - "Check Linting" + - "Tests" + types: ["requested"] jobs: cancel-duplicate-workflow-runs: diff --git a/.github/workflows/hadolint.yml b/.github/workflows/hadolint.yml index c481123..64665c7 100644 --- a/.github/workflows/hadolint.yml +++ b/.github/workflows/hadolint.yml @@ -7,10 +7,9 @@ on: branches: - main paths: - - 'Dockerfile' + - "Dockerfile" jobs: - hadolint: name: Run hadolint against docker files runs-on: ubuntu-latest diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml index b409485..6605760 100644 --- a/.github/workflows/markdownlint.yml +++ b/.github/workflows/markdownlint.yml @@ -8,8 +8,8 @@ on: - main # only run these if markdown files are updated paths: - - '**.md' - - '**.MD' + - "**.md" + - "**.MD" jobs: markdownlint: diff --git a/.github/workflows/on_pr.yml b/.github/workflows/on_pr.yml index 4b2d1c5..9e0de74 100644 --- a/.github/workflows/on_pr.yml +++ b/.github/workflows/on_pr.yml @@ -11,16 +11,15 @@ on: - main # Don't trigger if it's just a documentation update paths-ignore: - - '**.md' - - '**.MD' - - '**.yml' - - 'LICENSE' - - '.gitattributes' - - '.gitignore' - - '.dockerignore' + - "**.md" + - "**.MD" + - "**.yml" + - "LICENSE" + - ".gitattributes" + - ".gitignore" + - ".dockerignore" jobs: - test-build: name: Test uses: sdr-enthusiasts/common-github-workflows/.github/workflows/build_and_push_image.yml@main diff --git a/.github/workflows/pre-commit-updates.yaml b/.github/workflows/pre-commit-updates.yaml new file mode 100644 index 0000000..4d04a2b --- /dev/null +++ b/.github/workflows/pre-commit-updates.yaml @@ -0,0 +1,23 @@ +name: Update pre-commit hooks + +on: + workflow_dispatch: + schedule: + - cron: 0 0 * * * + +jobs: + update: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.1 + with: + fetch-depth: 0 + - uses: vrslev/pre-commit-autoupdate@v1.0.0 + - uses: peter-evans/create-pull-request@v5 + with: + branch: pre-commit-autoupdate + title: "chore(deps): Update pre-commit hooks" + commit-message: "chore(deps): Update pre-commit hooks" + body: Update pre-commit hooks + labels: dependencies + delete-branch: True diff --git a/.github/workflows/yamllint.yml b/.github/workflows/yamllint.yml index 26ddd92..6e1a877 100644 --- a/.github/workflows/yamllint.yml +++ b/.github/workflows/yamllint.yml @@ -8,7 +8,7 @@ on: - main # only run when yaml files are updated paths: - - '**.yml' + - "**.yml" jobs: yamllint: diff --git a/.hadolint.yaml b/.hadolint.yaml index e2901b4..d4da35e 100644 --- a/.hadolint.yaml +++ b/.hadolint.yaml @@ -1,3 +1,3 @@ ignored: - DL3008 - - SC2086 \ No newline at end of file + - SC2086 diff --git a/.markdownlint.json b/.markdownlint.json index 2514d57..ef7802a 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -1,5 +1,5 @@ { - "MD029": false, - "MD013": false, - "MD009": false + "MD029": false, + "MD013": false, + "MD009": false } diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..7603ee6 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,65 @@ +repos: + # lint yaml, line and whitespace + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace + - id: requirements-txt-fixer + - id: mixed-line-ending + - id: check-executables-have-shebangs + - id: check-shebang-scripts-are-executable + + # lint the dockerfiles + - repo: https://github.com/hadolint/hadolint + rev: v2.12.1-beta + hooks: + - id: hadolint + + # prettier + - repo: https://github.com/pre-commit/mirrors-prettier + rev: "v3.0.3" # Use the sha / tag you want to point at + hooks: + - id: prettier + types_or: [file, bash, sh, javascript, jsx, ts, tsx] + additional_dependencies: + - prettier@2.5.1 + exclude: ^(Dockerfile*) + + - repo: https://github.com/codespell-project/codespell.git + rev: "v2.2.6" # Use the sha / tag you want to point at + hooks: + - id: codespell + types: [text] + args: [--ignore-words=.dictionary.txt] + exclude: ^(Dockerfile*) + + - repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.9.0.6 + hooks: + - id: shellcheck + + - repo: https://github.com/sirosen/check-jsonschema + rev: 0.27.0 + hooks: + - id: check-github-actions + - id: check-github-workflows + + - repo: https://github.com/doublify/pre-commit-rust + rev: v1.0 + hooks: + - id: fmt + - id: cargo-check + + # lint python formatting + - repo: https://github.com/psf/black + rev: 23.10.0 + hooks: + - id: black + + - repo: https://github.com/pycqa/flake8 + rev: "6.1.0" # pick a git hash / tag to point to + hooks: + - id: flake8 + args: ["--extend-ignore=W503,W504,E501"] diff --git a/README.md b/README.md index e2475d7..ce9f635 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ - [Container Configuration](#container-configuration) - [`tar1090` Configuration](#tar1090-configuration) - [`tar1090` Core Configuration](#tar1090-core-configuration) + - [Using a locally modified tar1090 version](#using-a-locally-modified-tar1090-version) - [`tar1090` `config.js` Configuration - Title](#tar1090-configjs-configuration---title) - [`tar1090` `config.js` Configuration - Output](#tar1090-configjs-configuration---output) - [`tar1090` `config.js` Configuration - Map Settings](#tar1090-configjs-configuration---map-settings) @@ -40,12 +41,13 @@ - [globe-history or sometimes ironically called destroy-sd-card](#globe-history-or-sometimes-ironically-called-destroy-sd-card) - [Metrics](#metrics) - [Output to InfluxDBv2](#output-to-influxdbv2) + - [Output to InfluxDBv1.8](#output-to-influxdbv18) - [Output to Prometheus](#output-to-prometheus) - [Minimalist setup](#minimalist-setup) ## Introduction -This container [`tar1090`](https://github.com/wiedehopf/tar1090) runs [`@wiedehopf's readsb fork`](https://github.com/wiedehopf/readsb) ADS-B decoding engine in to feed the graphic tar1090 viewing webinterface, also by [wiedehopf](https://github.com/wiedehopf) (as is the viewadsb text-based output) to provide digital representations of the readsb output. +This container [`tar1090`](https://github.com/wiedehopf/tar1090) runs [`@wiedehopf's readsb fork`](https://github.com/wiedehopf/readsb) ADS-B decoding engine in to feed the graphic tar1090 viewing webinterface, also by [wiedehopf](https://github.com/wiedehopf) (as is the viewadsb text-based output) to provide digital representations of the readsb output. At the time of writing this README, it provides: @@ -142,7 +144,7 @@ You should now be able to browse to: An example `docker-compose.xml` file is below: ```yaml -version: '3.8' +version: "3.8" services: tar1090: @@ -177,22 +179,22 @@ You should now be able to browse to: - to see a different heatmap for the past 24 hours. - to see performance graphs -*Note*: the example above excludes `MLATHOST` as `readsb` alone cannot provide MLAT data. You'll need a feeder container for this. +_Note_: the example above excludes `MLATHOST` as `readsb` alone cannot provide MLAT data. You'll need a feeder container for this. ## Ports Some common ports are as follows (which may or may not be in use depending on your configuration): -| Port | Details | -|------|---------| -| `30001/tcp` | Raw protocol input | -| `30002/tcp` | Raw protocol output | +| Port | Details | +| ----------- | ------------------------------- | +| `30001/tcp` | Raw protocol input | +| `30002/tcp` | Raw protocol output | | `30003/tcp` | SBS/Basestation protocol output | -| `32006/tcp` | SBS/Basestation protocol input | -| `30004/tcp` | Beast protocol input | -| `30005/tcp` | Beast protocol output | -| `30006/tcp` | Beast reduce protocol output | -| `30047/tcp` | Json position output | +| `32006/tcp` | SBS/Basestation protocol input | +| `30004/tcp` | Beast protocol input | +| `30005/tcp` | Beast protocol output | +| `30006/tcp` | Beast reduce protocol output | +| `30047/tcp` | Json position output | Json position output: @@ -210,7 +212,7 @@ Aircraft.json: This container will try to connect to the `BEASTHOST` on TCP port `30005` by default. This can be changed by setting the `BEASTPORT` environment variable. -If `MLATHOST` is set, this container will try to connecto the `MLATHOST` on TCP port `30105` by default. This can be changed to setting the `MLATPORT` environment variable. +If `MLATHOST` is set, this container will try to connect the `MLATHOST` on TCP port `30105` by default. This can be changed to setting the `MLATPORT` environment variable. ### Incoming @@ -220,25 +222,25 @@ This container accepts HTTP connections on TCP port `80` by default. You can cha ### Container Configuration -| Environment Variable | Purpose | Default | -|----------------------|---------|---------| -| `BEASTHOST` | Required. IP/Hostname of a Mode-S/Beast provider (`dump1090`/`readsb`) | | -| `BEASTPORT` | Optional. TCP port number of Mode-S/Beast provider (`dump1090`/`readsb`) | `30005` | -| `LAT` | Optional. The latitude of your antenna | | -| `LONG` | Optional. The longitude of your antenna | | -| `MLATHOST` | Optional. IP/Hostname of an MLAT provider (`mlat-client`) | | -| `MLATPORT` | Optional. TCP port number of an MLAT provider (`mlat-client`) | 30105 | -| `TZ` | Optional. Your local timezone in [TZ-database-name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) format | | -| `HEYWHATSTHAT_PANORAMA_ID` | Optional. Your `heywhatsthat.com` panorama ID. See . | | -| `HEYWHATSTHAT_ALTS` | Optional. Comma separated altitudes for multiple outlines. Use no units or `ft` for feet, `m` for meters, or `km` for kilometers. Only integer numbers are accepted, no decimals please | `12192m` (=40000 ft) | -| `HTTP_ACCESS_LOG` | Optional. Set to `true` to display HTTP server access logs. | `false` | -| `HTTP_ERROR_LOG` | Optional. Set to `false` to hide HTTP server error logs. | `true` | -| `READSB_MAX_RANGE` | Optional. Maximum range (in nautical miles). | Unset | -| `ENABLE_TIMELAPSE1090` | Optional / Legacy. Set to any value to enable btimelapse1090. Once enabled, can be accessed via . | Unset | -| `READSB_EXTRA_ARGS` | Optional, allows to specify extra parameters for readsb | Unset | -| `READSB_DEBUG` | Optional, used to set debug mode. `n`: network, `P`: CPR, `S`: speed check | Unset | -| `S6_SERVICES_GRACETIME` | Optional, set to 30000 when saving traces / globe_history | `3000` | -| `ENABLE_AIRSPY` | Optional, set to any non-empty value if you want to enable the special AirSpy graphs. See below for additional configuration requirements | Unset | +| Environment Variable | Purpose | Default | +| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | +| `BEASTHOST` | Required. IP/Hostname of a Mode-S/Beast provider (`dump1090`/`readsb`) | | +| `BEASTPORT` | Optional. TCP port number of Mode-S/Beast provider (`dump1090`/`readsb`) | `30005` | +| `LAT` | Optional. The latitude of your antenna | | +| `LONG` | Optional. The longitude of your antenna | | +| `MLATHOST` | Optional. IP/Hostname of an MLAT provider (`mlat-client`) | | +| `MLATPORT` | Optional. TCP port number of an MLAT provider (`mlat-client`) | 30105 | +| `TZ` | Optional. Your local timezone in [TZ-database-name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) format | | +| `HEYWHATSTHAT_PANORAMA_ID` | Optional. Your `heywhatsthat.com` panorama ID. See . | | +| `HEYWHATSTHAT_ALTS` | Optional. Comma separated altitudes for multiple outlines. Use no units or `ft` for feet, `m` for meters, or `km` for kilometers. Only integer numbers are accepted, no decimals please | `12192m` (=40000 ft) | +| `HTTP_ACCESS_LOG` | Optional. Set to `true` to display HTTP server access logs. | `false` | +| `HTTP_ERROR_LOG` | Optional. Set to `false` to hide HTTP server error logs. | `true` | +| `READSB_MAX_RANGE` | Optional. Maximum range (in nautical miles). | Unset | +| `ENABLE_TIMELAPSE1090` | Optional / Legacy. Set to any value to enable btimelapse1090. Once enabled, can be accessed via . | Unset | +| `READSB_EXTRA_ARGS` | Optional, allows to specify extra parameters for readsb | Unset | +| `READSB_DEBUG` | Optional, used to set debug mode. `n`: network, `P`: CPR, `S`: speed check | Unset | +| `S6_SERVICES_GRACETIME` | Optional, set to 30000 when saving traces / globe_history | `3000` | +| `ENABLE_AIRSPY` | Optional, set to any non-empty value if you want to enable the special AirSpy graphs. See below for additional configuration requirements | Unset | READSB_EXTRA_ARGS just passes arguments to the commandline, you can check this file for more options for wiedehofps readsb fork: @@ -250,21 +252,21 @@ All of the variables below are optional. #### `tar1090` Core Configuration -| Environment Variable | Purpose | Default | -|----------------------|---------|---------| -| `READSB_JSON_INTERVAL` | Update data update interval for the webinterface in seconds | `1.0` | -| `UPDATE_TAR1090` | At startup update tar1090 and tar1090db to the latest versions | `true` | -| `INTERVAL` | Interval at which the track history is saved | `8` | -| `HISTORY_SIZE` | How many points in time are stored in the track history | `450` | -| `URL_978` | The URL needs to point at where your skyaware978 webinterface is located, this will also enable UAT-specific graphs in graphs1090 | `http://dump978/skyaware978` | -| `ENABLE_978` | Set to `true` to enable deprecated UAT/978 display in `tar1090` fetch data via json (not beast / raw) from `URL_978`. | Unset | -| `GZIP_LVL` | `1`-`9` are valid, lower lvl: less CPU usage, higher level: less network bandwidth used when loading the page | `3` | -| `PTRACKS` | Shows the last `$PTRACKS` hours of traces you have seen at the `?pTracks` URL | `8` | -| `TAR1090_FLIGHTAWARELINKS` | Set to any value to enable FlightAware links in the web interface | `null` | -| `TAR1090_ENABLE_AC_DB` | Set to `true` to enable extra information, such as aircraft type and registration, to be included in in `aircraft.json` output. Will use more memory; use caution on older Pis or similar devices. | Unset | -| `TAR1090_IMAGE_CONFIG_LINK` | An optional URL shown at the top of page, designed to be used for a link back to a configuration page. The token `HOSTNAME` in the link is replaced with the current host that tar1090 is accessed on. | `null` | -| `TAR1090_IMAGE_CONFIG_TEXT` | Text to display for the config link | `null` | -| `TAR1090_DISABLE` | Set to `true` to disable the web server and all websites (including the map, `graphs1090`, `heatmap`, `pTracks`, etc.) | Unset | +| Environment Variable | Purpose | Default | +| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------- | +| `READSB_JSON_INTERVAL` | Update data update interval for the webinterface in seconds | `1.0` | +| `UPDATE_TAR1090` | At startup update tar1090 and tar1090db to the latest versions | `true` | +| `INTERVAL` | Interval at which the track history is saved | `8` | +| `HISTORY_SIZE` | How many points in time are stored in the track history | `450` | +| `URL_978` | The URL needs to point at where your skyaware978 webinterface is located, this will also enable UAT-specific graphs in graphs1090 | `http://dump978/skyaware978` | +| `ENABLE_978` | Set to `true` to enable deprecated UAT/978 display in `tar1090` fetch data via json (not beast / raw) from `URL_978`. | Unset | +| `GZIP_LVL` | `1`-`9` are valid, lower lvl: less CPU usage, higher level: less network bandwidth used when loading the page | `3` | +| `PTRACKS` | Shows the last `$PTRACKS` hours of traces you have seen at the `?pTracks` URL | `8` | +| `TAR1090_FLIGHTAWARELINKS` | Set to any value to enable FlightAware links in the web interface | `null` | +| `TAR1090_ENABLE_AC_DB` | Set to `true` to enable extra information, such as aircraft type and registration, to be included in in `aircraft.json` output. Will use more memory; use caution on older Pis or similar devices. | Unset | +| `TAR1090_IMAGE_CONFIG_LINK` | An optional URL shown at the top of page, designed to be used for a link back to a configuration page. The token `HOSTNAME` in the link is replaced with the current host that tar1090 is accessed on. | `null` | +| `TAR1090_IMAGE_CONFIG_TEXT` | Text to display for the config link | `null` | +| `TAR1090_DISABLE` | Set to `true` to disable the web server and all websites (including the map, `graphs1090`, `heatmap`, `pTracks`, etc.) | Unset | - For documentation on the aircraft.json format see this page: - TAR1090_ENABLE_AC_DB causes readsb to load the tar1090 database as a csv file from this repository: @@ -278,80 +280,80 @@ All of the variables below are optional. #### `tar1090` `config.js` Configuration - Title -| Environment Variable | Purpose | Default | -|----------------------|---------|---------| -| `TAR1090_PAGETITLE` | Set the tar1090 web page title | `tar1090` | -| `TAR1090_PLANECOUNTINTITLE` | Show number of aircraft in the page title | `false` | -| `TAR1090_MESSAGERATEINTITLE` | Show number of messages per second in the page title | `false` | +| Environment Variable | Purpose | Default | +| ---------------------------- | ---------------------------------------------------- | --------- | +| `TAR1090_PAGETITLE` | Set the tar1090 web page title | `tar1090` | +| `TAR1090_PLANECOUNTINTITLE` | Show number of aircraft in the page title | `false` | +| `TAR1090_MESSAGERATEINTITLE` | Show number of messages per second in the page title | `false` | #### `tar1090` `config.js` Configuration - Output -| Environment Variable | Purpose | Default | -|----------------------|---------|---------| +| Environment Variable | Purpose | Default | +| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | | `TAR1090_DISPLAYUNITS` | The DisplayUnits setting controls whether nautical (ft, NM, knots), metric (m, km, km/h) or imperial (ft, mi, mph) units are used in the plane table and in the detailed plane info. Valid values are "`nautical`", "`metric`", or "`imperial`". | `nautical` | #### `tar1090` `config.js` Configuration - Map Settings -| Environment Variable | Purpose | Default | -|----------------------|---------|---------| -| `TAR1090_BINGMAPSAPIKEY` | Provide a Bing Maps API key to enable the Bing imagery layer. You can obtain a free key (with usage limits) at (you need a "basic key"). | `null` | -| `TAR1090_DEFAULTCENTERLAT` | Default center (latitude) of the map. This setting is overridden by any position information provided by dump1090/readsb. All positions are in decimal degrees. | `45.0` | -| `TAR1090_DEFAULTCENTERLON` | Default center (longitude) of the map. This setting is overridden by any position information provided by dump1090/readsb. All positions are in decimal degrees. | `9.0` | -| `TAR1090_DEFAULTZOOMLVL` | The google maps zoom level, `0` - `16`, lower is further out. | `7` | -| `TAR1090_SITESHOW` | Center marker. If dump1090 provides a receiver location, that location is used and these settings are ignored. Set to `true` to show a center marker. | `false` | -| `TAR1090_SITELAT` | Center marker. If dump1090 provides a receiver location, that location is used and these settings are ignored. Position of the marker (latitude). | `45.0` | -| `TAR1090_SITELON` | Center marker. If dump1090 provides a receiver location, that location is used and these settings are ignored. Position of the marker (longitude). | `9.0` | -| `TAR1090_SITENAME` | The tooltip of the center marker. | `My Radar Site` | -| `TAR1090_RANGE_OUTLINE_COLOR` | Colour for the range outline. | `#0000DD` | -| `TAR1090_RANGE_OUTLINE_WIDTH` | Width for the range outline. | `1.7` | -| `TAR1090_RANGE_OUTLINE_COLORED_BY_ALTITUDE` | Range outline is coloured by altitude. | `false` | -| `TAR1090_RANGE_OUTLINE_DASH` | Range outline dashing. Syntax `[L, S]` where `L` is the pixel length of the line, and `S` is the pixel length of the space. | Unset | -| `TAR1090_ACTUAL_RANGE_OUTLINE_COLOR` | Colour for the actual range outline | `#00596b` | -| `TAR1090_ACTUAL_RANGE_OUTLINE_WIDTH` | Width of the actual range outline | `1.7` | -| `TAR1090_ACTUAL_RANGE_OUTLINE_DASH` | Dashed style for the actual range outline. Unset for solid line. `[5,5]` for a dashed line with 5 pixel lines and spaces in between | Unset | -| `TAR1090_MAPTYPE_TAR1090` | Which map is displayed to new visitors. Valid values for this setting are `osm`, `esri`, `carto_light_all`, `carto_light_nolabels`, `carto_dark_all`, `carto_dark_nolabels`, `gibs`, `osm_adsbx`, `chartbundle_sec`, `chartbundle_tac`, `chartbundle_hel`, `chartbundle_enrl`, `chartbundle_enra`, `chartbundle_enrh`, and only with bing key `bing_aerial`, `bing_roads`. | `carto_light_all` | -| `TAR1090_MAPDIM` | Default map dim state, true or false. | `true` | -| `TAR1090_MAPDIMPERCENTAGE` | The percentage amount of dimming used if the map is dimmed, `0`-`1` | `0.45` | -| `TAR1090_MAPCONTRASTPERCENTAGE` | The percentage amount of contrast used if the map is dimmed, `0`-`1` | `0` | -| `TAR1090_DWDLAYERS` | Various map layers provided by the DWD geoserver can be added here. [Preview and available layers](https://maps.dwd.de/geoserver/web/wicket/bookmarkable/org.geoserver.web.demo.MapPreviewPage?1&filter=false). Multiple layers are also possible. Syntax: `dwd:layer1,dwd:layer2,dwd:layer3` | `dwd:RX-Produkt` | -| `TAR1090_LABELZOOM` | Displays aircraft labels only until this zoom level, `1`-`15` (values >`15` don't really make sense)| | -| `TAR1090_LABELZOOMGROUND` | Displays ground traffic labels only until this zoom level, `1`-`15` (values >`15` don't really make sense) | | +| Environment Variable | Purpose | Default | +| ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| `TAR1090_BINGMAPSAPIKEY` | Provide a Bing Maps API key to enable the Bing imagery layer. You can obtain a free key (with usage limits) at (you need a "basic key"). | `null` | +| `TAR1090_DEFAULTCENTERLAT` | Default center (latitude) of the map. This setting is overridden by any position information provided by dump1090/readsb. All positions are in decimal degrees. | `45.0` | +| `TAR1090_DEFAULTCENTERLON` | Default center (longitude) of the map. This setting is overridden by any position information provided by dump1090/readsb. All positions are in decimal degrees. | `9.0` | +| `TAR1090_DEFAULTZOOMLVL` | The google maps zoom level, `0` - `16`, lower is further out. | `7` | +| `TAR1090_SITESHOW` | Center marker. If dump1090 provides a receiver location, that location is used and these settings are ignored. Set to `true` to show a center marker. | `false` | +| `TAR1090_SITELAT` | Center marker. If dump1090 provides a receiver location, that location is used and these settings are ignored. Position of the marker (latitude). | `45.0` | +| `TAR1090_SITELON` | Center marker. If dump1090 provides a receiver location, that location is used and these settings are ignored. Position of the marker (longitude). | `9.0` | +| `TAR1090_SITENAME` | The tooltip of the center marker. | `My Radar Site` | +| `TAR1090_RANGE_OUTLINE_COLOR` | Colour for the range outline. | `#0000DD` | +| `TAR1090_RANGE_OUTLINE_WIDTH` | Width for the range outline. | `1.7` | +| `TAR1090_RANGE_OUTLINE_COLORED_BY_ALTITUDE` | Range outline is coloured by altitude. | `false` | +| `TAR1090_RANGE_OUTLINE_DASH` | Range outline dashing. Syntax `[L, S]` where `L` is the pixel length of the line, and `S` is the pixel length of the space. | Unset | +| `TAR1090_ACTUAL_RANGE_OUTLINE_COLOR` | Colour for the actual range outline | `#00596b` | +| `TAR1090_ACTUAL_RANGE_OUTLINE_WIDTH` | Width of the actual range outline | `1.7` | +| `TAR1090_ACTUAL_RANGE_OUTLINE_DASH` | Dashed style for the actual range outline. Unset for solid line. `[5,5]` for a dashed line with 5 pixel lines and spaces in between | Unset | +| `TAR1090_MAPTYPE_TAR1090` | Which map is displayed to new visitors. Valid values for this setting are `osm`, `esri`, `carto_light_all`, `carto_light_nolabels`, `carto_dark_all`, `carto_dark_nolabels`, `gibs`, `osm_adsbx`, `chartbundle_sec`, `chartbundle_tac`, `chartbundle_hel`, `chartbundle_enrl`, `chartbundle_enra`, `chartbundle_enrh`, and only with bing key `bing_aerial`, `bing_roads`. | `carto_light_all` | +| `TAR1090_MAPDIM` | Default map dim state, true or false. | `true` | +| `TAR1090_MAPDIMPERCENTAGE` | The percentage amount of dimming used if the map is dimmed, `0`-`1` | `0.45` | +| `TAR1090_MAPCONTRASTPERCENTAGE` | The percentage amount of contrast used if the map is dimmed, `0`-`1` | `0` | +| `TAR1090_DWDLAYERS` | Various map layers provided by the DWD geoserver can be added here. [Preview and available layers](https://maps.dwd.de/geoserver/web/wicket/bookmarkable/org.geoserver.web.demo.MapPreviewPage?1&filter=false). Multiple layers are also possible. Syntax: `dwd:layer1,dwd:layer2,dwd:layer3` | `dwd:RX-Produkt` | +| `TAR1090_LABELZOOM` | Displays aircraft labels only until this zoom level, `1`-`15` (values >`15` don't really make sense) | | +| `TAR1090_LABELZOOMGROUND` | Displays ground traffic labels only until this zoom level, `1`-`15` (values >`15` don't really make sense) | | #### `tar1090` `config.js` Configuration - Range Rings -| Environment Variable | Purpose | Default | -|----------------------|---------|---------| -| `TAR1090_RANGERINGS` | `false` to hide range rings | `true` | -| `TAR1090_RANGERINGSDISTANCES` | Distances to display range rings, in miles, nautical miles, or km (depending settings value '`TAR1090_DISPLAYUNITS`'). Accepts a comma separated list of numbers (no spaces, no quotes). | `100,150,200,250` | -| `TAR1090_RANGERINGSCOLORS` | Colours for each of the range rings specified in `TAR1090_RANGERINGSDISTANCES`. Accepts a comma separated list of hex colour values, each enclosed in single quotes (eg `TAR1090_RANGERINGSCOLORS='#FFFFF','#00000'`). No spaces. | Blank | +| Environment Variable | Purpose | Default | +| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | +| `TAR1090_RANGERINGS` | `false` to hide range rings | `true` | +| `TAR1090_RANGERINGSDISTANCES` | Distances to display range rings, in miles, nautical miles, or km (depending settings value '`TAR1090_DISPLAYUNITS`'). Accepts a comma separated list of numbers (no spaces, no quotes). | `100,150,200,250` | +| `TAR1090_RANGERINGSCOLORS` | Colours for each of the range rings specified in `TAR1090_RANGERINGSDISTANCES`. Accepts a comma separated list of hex colour values, each enclosed in single quotes (eg `TAR1090_RANGERINGSCOLORS='#FFFFF','#00000'`). No spaces. | Blank | ### `tar1090` Route Display Configuration -| Environment Variable | Purpose | Default | -|----------------------|---------|---------| -| `TAR1090_USEROUTEAPI` | Set to `true` to enable route lookup for callsigns | Unset | -| `TAR1090_ROUTEAPIURL` | API URL used | `https://api.adsb.lol/api/0/routeset` | +| Environment Variable | Purpose | Default | +| --------------------- | -------------------------------------------------- | ------------------------------------- | +| `TAR1090_USEROUTEAPI` | Set to `true` to enable route lookup for callsigns | Unset | +| `TAR1090_ROUTEAPIURL` | API URL used | `https://api.adsb.lol/api/0/routeset` | ### `timelapse1090` Configuration Legacy: we do NOT recommend you enable this feature as it will cause substantial additional writes to disk. On a Pi, this may reduce the lifespan of your SD card. Instead, use which provides the same functionality, but without additional load to the disk. The feature is included for legacy purposes only, and is disabled by default. -| Environment Variable | Purpose | Default | -|----------------------|---------|---------| -| `ENABLE_TIMELAPSE1090` | If set to any non-empty value, the legacy Timelapse1090 feature will be enabled | Unset | -| `TIMELAPSE1090_INTERVAL` | Snapshot interval in seconds | `10` | -| `TIMELAPSE1090_HISTORY` | Time saved in hours | `24` | +| Environment Variable | Purpose | Default | +| ------------------------ | ------------------------------------------------------------------------------- | ------- | +| `ENABLE_TIMELAPSE1090` | If set to any non-empty value, the legacy Timelapse1090 feature will be enabled | Unset | +| `TIMELAPSE1090_INTERVAL` | Snapshot interval in seconds | `10` | +| `TIMELAPSE1090_HISTORY` | Time saved in hours | `24` | ## Paths No paths need to be mapped through to persistent storage. However, if you don't want to lose your range outline and aircraft tracks/history and heatmap / replay data on container restart, you can optionally map these paths: -| Path | Purpose | -|------|---------| -| `/var/globe_history` | Holds range outline data, heatmap / replay data and traces if enabled.
*Note: this data won't be automatically deleted, you will need to delete it eventually if you map this path.* | -| `/var/timelapse1090` | Holds timelapse1090 data if enabled | -| `/var/lib/collectd` | Holds graphs1090 & performance data | +| Path | Purpose | +| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `/var/globe_history` | Holds range outline data, heatmap / replay data and traces if enabled.
_Note: this data won't be automatically deleted, you will need to delete it eventually if you map this path._ | +| `/var/timelapse1090` | Holds timelapse1090 data if enabled | +| `/var/lib/collectd` | Holds graphs1090 & performance data | ### `readsb` Network Options @@ -359,31 +361,31 @@ This container uses the readsb fork by wiedehopf as a backend to tar1090: ` | Unset | -| `READSB_ENABLE_API` | Adds nginx proxies api at /re-api. Use with extraargs --write-json-globe-index --tar1090-use-api to get fast map with many planes | various | disabled | -| `READSB_NET_API_PORT` | | `--net-api-port=` | `30152` | -| `READSB_NET_BEAST_REDUCE_INTERVAL` | BeastReduce position update interval, longer means less data (valid range: `0.000` - `14.999`) | `--net-beast-reduce-interval=` | `1.0` | -| `READSB_NET_BEAST_REDUCE_FILTER_DIST` | Restrict beast-reduce output to aircraft in a radius of X nmi | `--net-beast-reduce-filter-dist=` | Unset | -| `READSB_NET_BEAST_REDUCE_FILTER_ALT` | Restrict beast-reduce output to aircraft below X ft | `--net-beast-reduce-filter-alt=` | Unset | -| `READSB_NET_BEAST_REDUCE_OUT_PORT` | TCP BeastReduce output listen ports (comma separated) | `--net-beast-reduce-out-port=` | Unset | -| `READSB_NET_BEAST_INPUT_PORT`| TCP Beast input listen ports | `--net-bi-port=` | `30004,30104` | -| `READSB_NET_BEAST_OUTPUT_PORT` | TCP Beast output listen ports | `--net-bo-port=` | `30005` | -| `READSB_NET_BUFFER` | TCP buffer size 64Kb * (2^n) | `--net-buffer=` | `2` (256Kb) | -| `READSB_NET_RAW_OUTPUT_INTERVAL` | TCP output flush interval in seconds (maximum interval between two network writes of accumulated data). | `--net-ro-interval=` | `0.05` | -| `READSB_NET_RAW_OUTPUT_SIZE` | TCP output flush size (maximum amount of internally buffered data before writing to network). | `--net-ro-size=` | `1200` | -| `READSB_NET_CONNECTOR_DELAY` | Outbound re-connection delay. | `--net-connector-delay=` | `30` |net-beast-reduce-interval -| `READSB_NET_HEARTBEAT` | TCP heartbeat rate in seconds (0 to disable). | `--net-heartbeat=` | `60` | -| `READSB_NET_RAW_INPUT_PORT` | TCP raw input listen ports. | `--net-ri-port=` | `30001` | -| `READSB_NET_RAW_OUTPUT_PORT` | TCP raw output listen ports. | `--net-ro-port=` | `30002` | -| `READSB_NET_SBS_INPUT_PORT` | TCP BaseStation input listen ports. | `--net-sbs-in-port=` | Unset | -| `READSB_NET_SBS_OUTPUT_PORT` | TCP BaseStation output listen ports. | `--net-sbs-port=` | `30003` | -| `REASSB_NET_VERBATIM` | Set this to any value to forward messages unchanged. | `--net-verbatim` | Unset | -| `READSB_NET_VRS_PORT` | TCP VRS JSON output listen ports. | `--net-vrs-port=` | Unset | -| `READSB_WRITE_STATE_ONLY_ON_EXIT` | if set to anything, it will only write the status range outlines, etc. upon termination of `readsb` | `--write-state-only-on-exit` | Unset | -| `READSB_FORWARD_MLAT_SBS` | If set to anthing, it will include MLAT results in the SBS/BaseStation output. This may be desirable if you feed SBS data to applications like [VRS](https://github.com/sdr-enthusiasts/docker-virtualradarserver) or [PlaneFence](https://github.com/kx1t/docker-planefence) | Unset | -| `READSB_FORWARD_MLAT` | If set to anthing, it will include MLAT results in the Beast and SBS/BaseStation output. This may be desirable if you feed SBS data to applications like [VRS](https://github.com/sdr-enthusiasts/docker-virtualradarserver) or [PlaneFence](https://github.com/kx1t/docker-planefence) | Unset | +| Variable | Description | Controls which `readsb` option | Default | +| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | ------------- | ------------------------- | +| `READSB_NET_CONNECTOR` | See "`READSB_NET_CONNECTOR` syntax" below. | `--net-connector=` | Unset | +| `READSB_ENABLE_API` | Adds nginx proxies api at /re-api. Use with extraargs --write-json-globe-index --tar1090-use-api to get fast map with many planes | various | disabled | +| `READSB_NET_API_PORT` | | `--net-api-port=` | `30152` | +| `READSB_NET_BEAST_REDUCE_INTERVAL` | BeastReduce position update interval, longer means less data (valid range: `0.000` - `14.999`) | `--net-beast-reduce-interval=` | `1.0` | +| `READSB_NET_BEAST_REDUCE_FILTER_DIST` | Restrict beast-reduce output to aircraft in a radius of X nmi | `--net-beast-reduce-filter-dist=` | Unset | +| `READSB_NET_BEAST_REDUCE_FILTER_ALT` | Restrict beast-reduce output to aircraft below X ft | `--net-beast-reduce-filter-alt=` | Unset | +| `READSB_NET_BEAST_REDUCE_OUT_PORT` | TCP BeastReduce output listen ports (comma separated) | `--net-beast-reduce-out-port=` | Unset | +| `READSB_NET_BEAST_INPUT_PORT` | TCP Beast input listen ports | `--net-bi-port=` | `30004,30104` | +| `READSB_NET_BEAST_OUTPUT_PORT` | TCP Beast output listen ports | `--net-bo-port=` | `30005` | +| `READSB_NET_BUFFER` | TCP buffer size 64Kb \* (2^n) | `--net-buffer=` | `2` (256Kb) | +| `READSB_NET_RAW_OUTPUT_INTERVAL` | TCP output flush interval in seconds (maximum interval between two network writes of accumulated data). | `--net-ro-interval=` | `0.05` | +| `READSB_NET_RAW_OUTPUT_SIZE` | TCP output flush size (maximum amount of internally buffered data before writing to network). | `--net-ro-size=` | `1200` | +| `READSB_NET_CONNECTOR_DELAY` | Outbound re-connection delay. | `--net-connector-delay=` | `30` | net-beast-reduce-interval | +| `READSB_NET_HEARTBEAT` | TCP heartbeat rate in seconds (0 to disable). | `--net-heartbeat=` | `60` | +| `READSB_NET_RAW_INPUT_PORT` | TCP raw input listen ports. | `--net-ri-port=` | `30001` | +| `READSB_NET_RAW_OUTPUT_PORT` | TCP raw output listen ports. | `--net-ro-port=` | `30002` | +| `READSB_NET_SBS_INPUT_PORT` | TCP BaseStation input listen ports. | `--net-sbs-in-port=` | Unset | +| `READSB_NET_SBS_OUTPUT_PORT` | TCP BaseStation output listen ports. | `--net-sbs-port=` | `30003` | +| `REASSB_NET_VERBATIM` | Set this to any value to forward messages unchanged. | `--net-verbatim` | Unset | +| `READSB_NET_VRS_PORT` | TCP VRS JSON output listen ports. | `--net-vrs-port=` | Unset | +| `READSB_WRITE_STATE_ONLY_ON_EXIT` | if set to anything, it will only write the status range outlines, etc. upon termination of `readsb` | `--write-state-only-on-exit` | Unset | +| `READSB_FORWARD_MLAT_SBS` | If set to anything, it will include MLAT results in the SBS/BaseStation output. This may be desirable if you feed SBS data to applications like [VRS](https://github.com/sdr-enthusiasts/docker-virtualradarserver) or [PlaneFence](https://github.com/kx1t/docker-planefence) | Unset | +| `READSB_FORWARD_MLAT` | If set to anything, it will include MLAT results in the Beast and SBS/BaseStation output. This may be desirable if you feed SBS data to applications like [VRS](https://github.com/sdr-enthusiasts/docker-virtualradarserver) or [PlaneFence](https://github.com/kx1t/docker-planefence) | Unset | #### `READSB_NET_CONNECTOR` syntax @@ -415,18 +417,18 @@ NOTE: If you have a UAT dongle and use `dump978` to decode this, you should use Where the default value is "Unset", `readsb`'s default will be used. -| Variable | Description | Controls which `readsb` option | Default | -|----------|-------------|--------------------------------|---------| -| `READSB_ENABLE_BIASTEE` | Set to any value to enable bias tee on supporting interfaces | `--enable-biastee` | Unset | -| `READSB_RX_LOCATION_ACCURACY` | Accuracy of receiver location in metadata: 0=no location, 1=approximate, 2=exact | `--rx-location-accuracy=` | `2` | -| `READSB_JSON_INTERVAL` | Update interval for the webinterface in seconds / interval between aircraft.json writes | `--write-json-every=` | `1.0` | -| `READSB_JSON_TRACE_INTERVAL` | Per plane interval for json position output and trace interval for globe history | `--json-trace-interval=` | `15` | -| `READSB_HEATMAP_INTERVAL` | Per plane interval for heatmap and replay (if you want to lower this, also lower json-trace-interval to this or a lower value) | `--heatmap=` | `15` | -| `READSB_MAX_RANGE` | Absolute maximum range for position decoding (in nm) | `--max-range=` | `300` | -| `READSB_MLAT` | Set this to add timestamps to AVR / RAW output | `--mlat` | Unset | -| `READSB_STATS_EVERY` | Number of seconds between showing and resetting stats. | `--stats-every=` | Unset | -| `READSB_STATS_RANGE` | Set this to any value to collect range statistics for polar plot. | `--stats-range` | Unset | -| `READSB_RANGE_OUTLINE_HOURS` | Change which past timeframe the range outline is based on | `--range-outline-hours` | `24` | +| Variable | Description | Controls which `readsb` option | Default | +| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------ | ------- | +| `READSB_ENABLE_BIASTEE` | Set to any value to enable bias tee on supporting interfaces | `--enable-biastee` | Unset | +| `READSB_RX_LOCATION_ACCURACY` | Accuracy of receiver location in metadata: 0=no location, 1=approximate, 2=exact | `--rx-location-accuracy=` | `2` | +| `READSB_JSON_INTERVAL` | Update interval for the webinterface in seconds / interval between aircraft.json writes | `--write-json-every=` | `1.0` | +| `READSB_JSON_TRACE_INTERVAL` | Per plane interval for json position output and trace interval for globe history | `--json-trace-interval=` | `15` | +| `READSB_HEATMAP_INTERVAL` | Per plane interval for heatmap and replay (if you want to lower this, also lower json-trace-interval to this or a lower value) | `--heatmap=` | `15` | +| `READSB_MAX_RANGE` | Absolute maximum range for position decoding (in nm) | `--max-range=` | `300` | +| `READSB_MLAT` | Set this to add timestamps to AVR / RAW output | `--mlat` | Unset | +| `READSB_STATS_EVERY` | Number of seconds between showing and resetting stats. | `--stats-every=` | Unset | +| `READSB_STATS_RANGE` | Set this to any value to collect range statistics for polar plot. | `--stats-range` | Unset | +| `READSB_RANGE_OUTLINE_HOURS` | Change which past timeframe the range outline is based on | `--range-outline-hours` | `24` | ### AutoGain for RTLSDR Devices @@ -445,14 +447,14 @@ We recommend running the initial period during times when there are a lot of pla Although not recommended, you can change the measurement intervals and low/high cutoffs with these parameters: -| Environment Variable | Purpose | Default | -|----------------------|---------|---------| -| `READSB_AUTOGAIN_INITIAL_TIMEPERIOD` | How long the Initial Time Period should last (in seconds) | `7200` | -| `READSB_AUTOGAIN_INITIAL_INTERVAL` | The measurement interval to optimize gain during the initial period of 90 minutes (in seconds) | `300` | -| `READSB_AUTOGAIN_SUBSEQUENT_INTERVAL` | The measurement interval to optimize gain during the subsequent period (in seconds) | `86400` | -| `READSB_AUTOGAIN_LOW_PCT` | If the percentage of "strong signals" (stronger than 3dBFS RSSI) is below this number, gain will be increased | `2.5` | -| `READSB_AUTOGAIN_HIGH_PCT` | If the percentage of "strong signals" (stronger than 3dBFS RSSI) is above this number, gain will be decreased | `6.0` | -| `READSB_AUTOGAIN_INITIAL_GAIN` | The start gain value for the initial period. If not defined, it will use the highest gain available for the SDR. | Unset | +| Environment Variable | Purpose | Default | +| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------- | ------- | +| `READSB_AUTOGAIN_INITIAL_TIMEPERIOD` | How long the Initial Time Period should last (in seconds) | `7200` | +| `READSB_AUTOGAIN_INITIAL_INTERVAL` | The measurement interval to optimize gain during the initial period of 90 minutes (in seconds) | `300` | +| `READSB_AUTOGAIN_SUBSEQUENT_INTERVAL` | The measurement interval to optimize gain during the subsequent period (in seconds) | `86400` | +| `READSB_AUTOGAIN_LOW_PCT` | If the percentage of "strong signals" (stronger than 3dBFS RSSI) is below this number, gain will be increased | `2.5` | +| `READSB_AUTOGAIN_HIGH_PCT` | If the percentage of "strong signals" (stronger than 3dBFS RSSI) is above this number, gain will be decreased | `6.0` | +| `READSB_AUTOGAIN_INITIAL_GAIN` | The start gain value for the initial period. If not defined, it will use the highest gain available for the SDR. | Unset | If you need to reset AutoGain and start over determining the gain, you can do so with this command: @@ -479,29 +481,29 @@ docker exec -it tar1090 /usr/local/bin/viewadsb --cpr-focus 3D3ED0 ### `graphs1090` Environment Parameters -| Variable | Description | Default | -|----------|-------------|---------| -| `GRAPHS1090_DARKMODE` | If set to any value, `graphs1090` will be rendered in "dark mode". | Unset | -| `GRAPHS1090_RRD_STEP` | Interval in seconds to feed data into RRD files. | `60` | -| `GRAPHS1090_SIZE` | Set graph size, possible values: `small`, `default`, `large`, `huge`, `custom`. | `default` | -| `GRAPHS1090_ALL_LARGE` | Make the small graphs as large as the big ones by setting to `yes`. | `no` | -| `GRAPHS1090_FONT_SIZE` | Font size (relative to graph size). | `10.0` | -| `GRAPHS1090_MAX_MESSAGES_LINE` | Set to any value to draw a reference line at the maximum message rate. | Unset | -| `GRAPHS1090_LARGE_WIDTH` | Defines the width of the larger graphs. | `1096` | -| `GRAPHS1090_LARGE_HEIGHT` | Defines the height of the larger graphs. | `235` | -| `GRAPHS1090_SMALL_WIDTH` | Defines the width of the smaller graphs. | `619` | -| `GRAPHS1090_SMALL_HEIGHT` | Defines the height of the smaller graphs. | `324` | -| `GRAPHS1090_DISK_DEVICE` | Defines which disk device (`mmc0`, `sda`, `sdc`, etc) is shown. Leave empty for default device | Unset | -| `GRAPHS1090_ETHERNET_DEVICE` | Defines which (wired) ethernet device (`eth0`, `enp0s`, etc) is shown. Leave empty for default device | Unset | -| `GRAPHS1090_WIFI_DEVICE` | Defines which (wireless) WiFi device (`wlan0`, `wlp3s0`, etc) is shown. Leave empty for default device | Unset | -| `GRAPHS1090_DISABLE` | Set to `true` to disable the entire GRAPHS1090 web page and associated data collection | Unset | -| `GRAPHS1090_DISABLE_CHART_CPU` | Set to `true` to disable the GRAPHS1090 CPU chart | Unset | -| `GRAPHS1090_DISABLE_CHART_TEMP` | Set to `true` to disable the GRAPHS1090 Temperature chart | Unset | -| `GRAPHS1090_DISABLE_CHART_MEMORY` | Set to `true` to disable the GRAPHS1090 Memory Utilization chart | Unset | -| `GRAPHS1090_DISABLE_CHART_NETWORK_BANDWIDTH` | Set to `true` to disable the GRAPHS1090 Network Bandwidth chart | Unset | -| `GRAPHS1090_DISABLE_CHART_DISK_USAGE` | Set to `true` to disable the GRAPHS1090 Disk Usage chart | Unset | -| `GRAPHS1090_DISABLE_CHART_DISK_IOPS` | Set to `true` to disable the GRAPHS1090 Disk IOPS chart | Unset | -| `GRAPHS1090_DISABLE_CHART_DISK_BANDWIDTH` | Set to `true` to disable the GRAPHS1090 Disk Bandwidth chart | Unset | +| Variable | Description | Default | +| -------------------------------------------- | ------------------------------------------------------------------------------------------------------ | --------- | +| `GRAPHS1090_DARKMODE` | If set to any value, `graphs1090` will be rendered in "dark mode". | Unset | +| `GRAPHS1090_RRD_STEP` | Interval in seconds to feed data into RRD files. | `60` | +| `GRAPHS1090_SIZE` | Set graph size, possible values: `small`, `default`, `large`, `huge`, `custom`. | `default` | +| `GRAPHS1090_ALL_LARGE` | Make the small graphs as large as the big ones by setting to `yes`. | `no` | +| `GRAPHS1090_FONT_SIZE` | Font size (relative to graph size). | `10.0` | +| `GRAPHS1090_MAX_MESSAGES_LINE` | Set to any value to draw a reference line at the maximum message rate. | Unset | +| `GRAPHS1090_LARGE_WIDTH` | Defines the width of the larger graphs. | `1096` | +| `GRAPHS1090_LARGE_HEIGHT` | Defines the height of the larger graphs. | `235` | +| `GRAPHS1090_SMALL_WIDTH` | Defines the width of the smaller graphs. | `619` | +| `GRAPHS1090_SMALL_HEIGHT` | Defines the height of the smaller graphs. | `324` | +| `GRAPHS1090_DISK_DEVICE` | Defines which disk device (`mmc0`, `sda`, `sdc`, etc) is shown. Leave empty for default device | Unset | +| `GRAPHS1090_ETHERNET_DEVICE` | Defines which (wired) ethernet device (`eth0`, `enp0s`, etc) is shown. Leave empty for default device | Unset | +| `GRAPHS1090_WIFI_DEVICE` | Defines which (wireless) WiFi device (`wlan0`, `wlp3s0`, etc) is shown. Leave empty for default device | Unset | +| `GRAPHS1090_DISABLE` | Set to `true` to disable the entire GRAPHS1090 web page and associated data collection | Unset | +| `GRAPHS1090_DISABLE_CHART_CPU` | Set to `true` to disable the GRAPHS1090 CPU chart | Unset | +| `GRAPHS1090_DISABLE_CHART_TEMP` | Set to `true` to disable the GRAPHS1090 Temperature chart | Unset | +| `GRAPHS1090_DISABLE_CHART_MEMORY` | Set to `true` to disable the GRAPHS1090 Memory Utilization chart | Unset | +| `GRAPHS1090_DISABLE_CHART_NETWORK_BANDWIDTH` | Set to `true` to disable the GRAPHS1090 Network Bandwidth chart | Unset | +| `GRAPHS1090_DISABLE_CHART_DISK_USAGE` | Set to `true` to disable the GRAPHS1090 Disk Usage chart | Unset | +| `GRAPHS1090_DISABLE_CHART_DISK_IOPS` | Set to `true` to disable the GRAPHS1090 Disk IOPS chart | Unset | +| `GRAPHS1090_DISABLE_CHART_DISK_BANDWIDTH` | Set to `true` to disable the GRAPHS1090 Disk Bandwidth chart | Unset | ### Enabling UAT data @@ -510,13 +512,13 @@ ADS-B over UAT data is transmitted in the 978 MHz band, and this is used in the 1. Set the following environment parameters: ```yaml - - ENABLE_978=yes - - URL_978=http://dump978/skyaware978 +- ENABLE_978=yes +- URL_978=http://dump978/skyaware978 ``` 2. Install the [`docker-dump978` container](https://github.com/sdr-enthusiasts/docker-dump978). Note - only containers downloaded/deployed on/after Feb 8, 2023 will work. -Note that you **must*- configure `URL_978` to point at a working skyaware978 website with `aircraft.json` data feed. This means that the URL `http://dump978/skyaware978/data/aircraft.json` must return valid JSON data to this `tar1090` container. +Note that you \*_must_- configure `URL_978` to point at a working skyaware978 website with `aircraft.json` data feed. This means that the URL `http://dump978/skyaware978/data/aircraft.json` must return valid JSON data to this `tar1090` container. ### Enabling AirSpy graphs @@ -525,7 +527,7 @@ Users of AirSpy devices can enable extra `graphs1090` graphs by configuring the - Set the following environment parameter: ```yaml - - ENABLE_AIRSPY=yes +- ENABLE_AIRSPY=yes ``` - To provide the container access to the AirSpy statistics, map a volume in your `docker-compose.yml` file as follows: @@ -587,7 +589,7 @@ Note - on some systems (DietPi comes to mind), `/sys/class/thermal/` may not be ### Reducing Disk IO for Graphs1090 -Note - *this feature is still somewhat experimental. If you are really attached to your statistics/graphs1090 data, please make sure to back up your mapped drives regularly* +Note - _this feature is still somewhat experimental. If you are really attached to your statistics/graphs1090 data, please make sure to back up your mapped drives regularly_ If you are using a Raspberry Pi or another type of computer with an SD card, you may already be aware that these SD cards have a limited number of write-cycles that will determine their lifespan. In other words - a common reason for SD card failure is excessive writes to it. @@ -600,18 +602,17 @@ Note -- there is a chance that the data isn't written back in time (due to power The feature assumes that you have mapped `/var/lib/collectd` to a volume (to ensure data is persistent across container recreations), and `/run` as a `tmpfs` RAM disk, as shown below and also as per the [`docker-compose.yml` example](docker-compose.yml): ```yaml - volumes: - - /opt/adsb/tar1090/globe_history:/var/globe_history -... - tmpfs: - - /run:exec,size=256M -... +volumes: + - /opt/adsb/tar1090/globe_history:/var/globe_history +--- +tmpfs: + - /run:exec,size=256M ``` -| Environment Variable | Purpose | Default | -|----------------------|---------|---------| -| `GRAPHS1090_REDUCE_IO=` | Optional Set to `true` to reduce the write cycles for `graphs1090`| Unset | -| `GRAPHS1090_REDUCE_IO_FLUSH_IVAL` | Interval (in secs) over which the `graphs1090` data is written back to non-volatile storage | 1 day | +| Environment Variable | Purpose | Default | +| --------------------------------- | ------------------------------------------------------------------------------------------- | ------- | +| `GRAPHS1090_REDUCE_IO=` | Optional Set to `true` to reduce the write cycles for `graphs1090` | Unset | +| `GRAPHS1090_REDUCE_IO_FLUSH_IVAL` | Interval (in secs) over which the `graphs1090` data is written back to non-volatile storage | 1 day | ## Logging @@ -625,21 +626,20 @@ We also have a [Discord channel](https://discord.gg/sTf9uYF), feel free to [join ## Using tar1090 with an SDR -| Variable | Description | Controls which `readsb` option | Default | -|----------|-------------|--------------------------------|---------| -| `READSB_GAIN` | Set gain (in dB). | `--gain=` | Max gain | -| `READSB_DEVICE_TYPE` | If using an SDR, set this to `rtlsdr`, `modesbeast`, `gnshulc` depending on the model of your SDR. If not using an SDR, leave un-set. | `--device-type=` | Unset | -| `READSB_RTLSDR_DEVICE` | Select device by serial number. | `--device=` | Unset | -| `READSB_RTLSDR_PPM` | Set oscillator frequency correction in PPM. See section [Estimating PPM](https://github.com/docker-readsb/README.MD#estimating-ppm) below | `--ppm=` | Unset | -| `READSB_BEAST_SERIAL` | only when type `modesbeast` or `gnshulc` is used: Path to Beast serial device. | `--beast-serial=` | `/dev/ttyUSB0` | +| Variable | Description | Controls which `readsb` option | Default | +| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | -------------- | +| `READSB_GAIN` | Set gain (in dB). | `--gain=` | Max gain | +| `READSB_DEVICE_TYPE` | If using an SDR, set this to `rtlsdr`, `modesbeast`, `gnshulc` depending on the model of your SDR. If not using an SDR, leave un-set. | `--device-type=` | Unset | +| `READSB_RTLSDR_DEVICE` | Select device by serial number. | `--device=` | Unset | +| `READSB_RTLSDR_PPM` | Set oscillator frequency correction in PPM. See section [Estimating PPM](https://github.com/docker-readsb/README.MD#estimating-ppm) below | `--ppm=` | Unset | +| `READSB_BEAST_SERIAL` | only when type `modesbeast` or `gnshulc` is used: Path to Beast serial device. | `--beast-serial=` | `/dev/ttyUSB0` | Example (devices: section is mandatory) ```yaml -version: '3.8' +version: "3.8" services: - tar1090: image: ghcr.io/sdr-enthusiasts/docker-tar1090:latest tty: true @@ -698,35 +698,35 @@ services: In order for Telegraf to output metrics to an [InfluxDBv2](https://docs.influxdata.com/influxdb/) time-series database, the following environment variables can be used: -| Variable | Description | -| ---- | ---- | -| `INFLUXDBV2_URL` | The URL of the InfluxDB instance | -| `INFLUXDBV2_TOKEN` | The token for authentication | -| `INFLUXDBV2_ORG` | InfluxDB Organization to write into | -| `INFLUXDBV2_BUCKET` | Destination bucket to write into | +| Variable | Description | +| ------------------- | ----------------------------------- | +| `INFLUXDBV2_URL` | The URL of the InfluxDB instance | +| `INFLUXDBV2_TOKEN` | The token for authentication | +| `INFLUXDBV2_ORG` | InfluxDB Organization to write into | +| `INFLUXDBV2_BUCKET` | Destination bucket to write into | ### Output to InfluxDBv1.8 In order for Telegraf to output metrics to a legacy[InfluxDBv1](https://docs.influxdata.com/influxdb/v1.8/) time-series database, the following environment variables can be used: -| Variable | Description | -| ---- | ---- | -| `INFLUXDB_URL` | The URL of the InfluxDB instance | -| `INFLUXDB_DATABASE` | database in InfluxDB to store data in | +| Variable | Description | +| ------------------- | --------------------------------------- | +| `INFLUXDB_URL` | The URL of the InfluxDB instance | +| `INFLUXDB_DATABASE` | database in InfluxDB to store data in | | `INFLUXDB_USERNAME` | username to authenticate to InfluxDB as | -| `INFLUXDB_PASSWORD` | password for InfluxDB User | +| `INFLUXDB_PASSWORD` | password for InfluxDB User | ### Output to Prometheus In order for Telegraf to serve a [Prometheus](https://prometheus.io) endpoint, the following environment variables can be used: -| Variable | Description | -| ---- | ---- | +| Variable | Description | +| ------------------- | ------------------------------------------------------------------------ | | `PROMETHEUS_ENABLE` | Set to `true` for a Prometheus endpoint on `http://0.0.0.0:9273/metrics` | ## Minimalist setup -If you want to configure to run with a minimal CPU and RAM profile, and use it *only* as a SDR decoder but without any mapping or stats/graph websites, then do the following: +If you want to configure to run with a minimal CPU and RAM profile, and use it _only_ as a SDR decoder but without any mapping or stats/graph websites, then do the following: - Set the parameter `TAR1090_DISABLE=true`. This will prevent the `nginx` webserver and any websites or associated data collection (collectd, graphs1090, rrd, etc.) to be launched - Make sure not to use the `dhcr.io/sdr-enthusiasts/docker-adsb-ultrafeeder:telegraf` label as Telegraf adds a LOT of resource use to the container diff --git a/rootfs/etc/nginx.tar1090/nginx.conf b/rootfs/etc/nginx.tar1090/nginx.conf index 87c9d44..5ee4957 100644 --- a/rootfs/etc/nginx.tar1090/nginx.conf +++ b/rootfs/etc/nginx.tar1090/nginx.conf @@ -55,4 +55,3 @@ http { include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; } - diff --git a/rootfs/etc/s6-overlay/s6-rc.d/graphs1090-writeback/run b/rootfs/etc/s6-overlay/s6-rc.d/graphs1090-writeback/run old mode 100644 new mode 100755 diff --git a/rootfs/etc/s6-overlay/scripts/06-range-outline b/rootfs/etc/s6-overlay/scripts/06-range-outline index bdb67af..91deb4c 100755 --- a/rootfs/etc/s6-overlay/scripts/06-range-outline +++ b/rootfs/etc/s6-overlay/scripts/06-range-outline @@ -9,7 +9,7 @@ if [ -n "${HEYWHATSTHAT_PANORAMA_ID}" ]; then HEYWHATSTHAT_ALTS="${HEYWHATSTHAT_ALTS:-12192m}" - if grep -e "[^0-9kmft,]" <<< "${HEYWHATSTHAT_ALTS}" >/dev/null 2>&1; then + if grep -e "[^0-9kmft,]" <<< "${HEYWHATSTHAT_ALTS}" >/dev/null 2>&1; then echo "[$(date)][06-range-outline] FATAL: Illegal character in HEYWHATSTHAT_ALTS=${HEYWHATSTHAT_ALTS}" exit 1 fi diff --git a/rootfs/etc/s6-overlay/scripts/07-ngnix-logging b/rootfs/etc/s6-overlay/scripts/07-ngnix-logging index b769088..6e5e4f9 100755 --- a/rootfs/etc/s6-overlay/scripts/07-ngnix-logging +++ b/rootfs/etc/s6-overlay/scripts/07-ngnix-logging @@ -17,4 +17,4 @@ if ! chk_enabled "${HTTP_ERROR_LOG}"; then else # shellcheck disable=SC1003 sed -i 's\error_log .*\error_log /dev/stdout notice;\' /etc/nginx/nginx.conf -fi \ No newline at end of file +fi diff --git a/rootfs/etc/s6-overlay/scripts/08-graphs1090-down b/rootfs/etc/s6-overlay/scripts/08-graphs1090-down index a5026c3..f5b847c 100755 --- a/rootfs/etc/s6-overlay/scripts/08-graphs1090-down +++ b/rootfs/etc/s6-overlay/scripts/08-graphs1090-down @@ -6,4 +6,3 @@ source /scripts/common if chk_enabled "${GRAPHS1090_DISABLE}"; then exit 0 fi - diff --git a/rootfs/etc/s6-overlay/scripts/collectd b/rootfs/etc/s6-overlay/scripts/collectd index fb472a6..86a2250 100755 --- a/rootfs/etc/s6-overlay/scripts/collectd +++ b/rootfs/etc/s6-overlay/scripts/collectd @@ -22,7 +22,7 @@ elif [[ -f "${PERMFILE}" ]] && ! [[ -d /var/lib/collectd/rrd/localhost ]]; then fi -# wait for neccessary input file to exist before starting +# wait for necessary input file to exist before starting loop_count=0 # shellcheck disable=SC2016 @@ -48,5 +48,3 @@ if chk_enabled "${GRAPHS1090_REDUCE_IO}"; then # writeback s6wrap --quiet --prepend=graphs1090-writeback --timestamps --args bash /usr/share/graphs1090/writeback.sh fi - - diff --git a/rootfs/etc/s6-overlay/scripts/readsb b/rootfs/etc/s6-overlay/scripts/readsb index 1543756..cde6288 100755 --- a/rootfs/etc/s6-overlay/scripts/readsb +++ b/rootfs/etc/s6-overlay/scripts/readsb @@ -122,7 +122,7 @@ fi # if [[ -n "$READSB_NET_API_PORT" ]]; then READSB_CMD+=("--net-api-port=$READSB_NET_API_PORT") -else +else READSB_CMD+=("--net-api-port=30152") fi @@ -250,7 +250,7 @@ fi if [[ -n "$READSB_GAIN" ]]; then if [[ "${READSB_GAIN,,}" == "autogain" ]] && [[ -f /var/globe_history/autogain/gain ]]; then read -r gain < /var/globe_history/autogain/gain - READSB_CMD+=("--gain=$gain") + READSB_CMD+=("--gain=$gain") elif [[ -n "$READSB_GAIN" ]]; then [[ "${READSB_GAIN,,}" == "autogain" ]] && gain="49.6" || gain="${READSB_GAIN}" READSB_CMD+=("--gain=$gain") @@ -316,9 +316,9 @@ if [[ -n "$READSB_BEAST_BAUDRATE" ]]; then fi ##################### -# Handle --write-prom= +# Handle --write-prom= -if [[ -n "$PROMETHEUS_ENABLE" ]]; then +if [[ -n "$PROMETHEUS_ENABLE" ]]; then READSB_CMD+=("--write-prom=/run/readsb-prometheus.prom") fi diff --git a/rootfs/etc/s6-overlay/scripts/timelapse1090 b/rootfs/etc/s6-overlay/scripts/timelapse1090 index 8f45696..fd0bd64 100755 --- a/rootfs/etc/s6-overlay/scripts/timelapse1090 +++ b/rootfs/etc/s6-overlay/scripts/timelapse1090 @@ -25,7 +25,7 @@ if chk_enabled "$ENABLE_TIMELAPSE1090" && ! chk_enabled "${TAR1090_DISABLE}"; th s6wrap --quiet --prepend=timelapse1090 --timestamps --args /opt/timelapse1090/timelapse1090.sh & wait $! popd || exit 1 - + sleep 30 & wait $! else exec sleep infinity diff --git a/rootfs/healthcheck.sh b/rootfs/healthcheck.sh index a9f5857..e3c57c7 100755 --- a/rootfs/healthcheck.sh +++ b/rootfs/healthcheck.sh @@ -13,7 +13,7 @@ if [ -f "/run/readsb/aircraft.json" ]; then # get current timestamp TIMESTAMP_NOW=$(date +"%s.%N") - # makse sure readsb has updated json in past 60 seconds + # make sure readsb has updated json in past 60 seconds TIMEDELTA=$(echo "$TIMESTAMP_NOW - $TIMESTAMP_LAST_READSB_UPDATE" | bc) if [ "$(echo "$TIMEDELTA" \< 60 | bc)" -ne 1 ]; then echo "readsb last updated: ${TIMESTAMP_LAST_READSB_UPDATE}, now: ${TIMESTAMP_NOW}, delta: ${TIMEDELTA}. UNHEALTHY" diff --git a/rootfs/tar1090-install.sh b/rootfs/tar1090-install.sh index a884b41..750bd68 100755 --- a/rootfs/tar1090-install.sh +++ b/rootfs/tar1090-install.sh @@ -173,7 +173,7 @@ if [[ -n $2 ]]; then elif [[ -n $1 ]] && [ "$1" != "test" ] ; then instances="$1 tar1090" elif [ -f /etc/default/tar1090_instances ]; then - instances=$(/dev/null)