Skip to content

Commit

Permalink
Merge pull request #30 from SkySignals/stats
Browse files Browse the repository at this point in the history
Add statsd support
  • Loading branch information
fredclausen authored Jan 2, 2024
2 parents 51268dc + 13e0f1f commit f68a704
Showing 2 changed files with 14 additions and 2 deletions.
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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 && \
6 changes: 5 additions & 1 deletion rootfs/etc/s6-overlay/scripts/dumpvdl2
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit f68a704

Please sign in to comment.