diff --git a/Dockerfile b/Dockerfile index d89ee58..fa2f00e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,8 @@ ENV DEVICE_INDEX="" \ SOAPYSDR="" \ SERVER="acarshub" \ SERVER_PORT="5555" \ - VDLM_FILTER_ENABLE="TRUE" + VDLM_FILTER_ENABLE="TRUE" \ + STATSD_SERVER="" SHELL ["/bin/bash", "-o", "pipefail", "-c"] @@ -39,6 +40,13 @@ RUN set -x && \ "${KEPT_PACKAGES[@]}" \ "${TEMP_PACKAGES[@]}"\ && \ + # Install statsd-c-client library + git clone https://github.com/romanbsd/statsd-c-client.git /src/statsd-client && \ + pushd /src/statsd-client && \ + make -j "$(nproc)" && \ + make install && \ + ldconfig && \ + popd && \ # install sdrplay curl --location --output /tmp/install_sdrplay.sh https://raw.githubusercontent.com/sdr-enthusiasts/install-libsdrplay/main/install_sdrplay.sh && \ chmod +x /tmp/install_sdrplay.sh && \ diff --git a/rootfs/etc/s6-overlay/scripts/dumpvdl2 b/rootfs/etc/s6-overlay/scripts/dumpvdl2 index 507e9b8..c431273 100755 --- a/rootfs/etc/s6-overlay/scripts/dumpvdl2 +++ b/rootfs/etc/s6-overlay/scripts/dumpvdl2 @@ -46,11 +46,11 @@ fi VDLM_CMD+=("--gain" "$GAIN") -# Send output JSON to vdlm2_server. if [[ ${VDLM_FILTER_ENABLE,,} =~ true ]]; then VDLM_CMD+=("--msg-filter" "all,-avlc_s,-acars_nodata,-x25_control,-idrp_keepalive,-esis") fi +# Send output JSON to vdlm2_server. VDLM_CMD+=("--station-id=$FEED_ID" "--output" "decoded:json:udp:address=127.0.0.1,port=5555") if [[ -n "$ZMQ_MODE" ]]; then @@ -59,6 +59,10 @@ if [[ -n "$ZMQ_MODE" ]]; then fi fi +if [[ -n "$STATSD_SERVER" ]]; then + VDLM_CMD+=("--statsd" "$STATSD_SERVER") +fi + # shellcheck disable=SC2206 VDLM_CMD+=($FREQ_STRING)