From c384f40bb49ebb49716e1d1309d48450e8321bd3 Mon Sep 17 00:00:00 2001 From: SkySignals-jf <18639424+j-forristal@users.noreply.github.com> Date: Mon, 1 Jan 2024 19:19:25 +0000 Subject: [PATCH] Add statsd support --- Dockerfile | 10 +++++++++- rootfs/etc/s6-overlay/scripts/dumphfdl.sh | 4 ++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1aa7bcb..0a95408 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,8 @@ ENV DEVICE_INDEX="" \ MIN_MESSAGE_THRESHOLD="5" \ ENABLE_SYSTABLE="TRUE" \ ENABLE_BASESTATION="TRUE" \ - BASESTATION_VERBOSE="TRUE" + BASESTATION_VERBOSE="TRUE" \ + STATSD_SERVER="" SHELL ["/bin/bash", "-o", "pipefail", "-c"] @@ -51,6 +52,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/dumphfdl.sh b/rootfs/etc/s6-overlay/scripts/dumphfdl.sh index 0f799b1..e47e81e 100755 --- a/rootfs/etc/s6-overlay/scripts/dumphfdl.sh +++ b/rootfs/etc/s6-overlay/scripts/dumphfdl.sh @@ -92,6 +92,10 @@ if [[ -n "$ZMQ_MODE" ]]; then fi fi +if [[ -n "$STATSD_SERVER" ]]; then + dumpcmd+=("--statsd" "$STATSD_SERVER") +fi + # only run scan if FREQUENCIES is not set if [[ -n "${FREQUENCIES}" ]]; then rm -rf /run/hfdl_test_mode