Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Changelog

## v3.0.10
Updated on 2025-Dec-07
Updated on 2025-Dec-09
* FIXED: Bug fix in a CLI menu function to get the full value of notification parameters from the configuration file.
* FIXED: Bug fix in a WebUI JS function to get the full value of notification parameters from the configuration file.
* FIXED: Added new "InfluxDB Organization" parameter that's required to send InfluxDB notifications.
* FIXED: Modified the curl command call sending data to InfluxDB so that it conforms to new API requirements.
* FIXED: Modified WebUI text message to show default interval of 5 minutes. Functionality was correct. This is just a correction to the text string.

## v3.0.9
Expand Down
12 changes: 7 additions & 5 deletions connmon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
### Start of script variables ###
readonly SCRIPT_NAME="connmon"
readonly SCRIPT_VERSION="v3.0.10"
readonly SCRIPT_VERSTAG="25120912"
readonly SCRIPT_VERSTAG="25120920"
SCRIPT_BRANCH="develop"
SCRIPT_REPO="https://raw.githubusercontent.com/AMTM-OSR/$SCRIPT_NAME/$SCRIPT_BRANCH"
readonly SCRIPT_DIR="/jffs/addons/$SCRIPT_NAME.d"
Expand Down Expand Up @@ -3483,7 +3483,7 @@ SendHealthcheckPing()
##----------------------------------------##
SendToInfluxDB()
{
local curlCode
local curlCode dataPoint
TIMESTAMP="$1"
PING="$2"
JITTER="$3"
Expand All @@ -3508,10 +3508,12 @@ SendToInfluxDB()
printf '' > "$curlOutLogFile"
printf '' > "$curlErrLogFile"

dataPoint="ping=${PING},jitter=${JITTER},linequality=${LINEQUAL},source=$SCRIPT_NAME"

curl -vSL --retry 4 --retry-delay 5 --connect-timeout 60 -o "$curlOutLogFile" \
"${INFLUXDB_PROTO}://${INFLUXDB_HOST}:${INFLUXDB_PORT}/api/v2/write?org=${INFLUXDB_ORG}&bucket=${INFLUXDB_BID}&precision=s" \
--header "Authorization: Token $INFLUX_AUTHHEADER" --header "Accept-Encoding: gzip" \
--data-raw "pingTest,ping=$PING ${TIMESTAMP},jitter=$JITTER ${TIMESTAMP},linequality=$LINEQUAL $TIMESTAMP" >> "$curlErrLogFile" 2>&1
"${INFLUXDB_PROTO}://${INFLUXDB_HOST}:${INFLUXDB_PORT}/api/v2/write?org=${INFLUXDB_ORG}&bucket=${INFLUXDB_BID}&precision=s" \
--header "Authorization: Token $INFLUX_AUTHHEADER" --header "Accept-Encoding: gzip" \
--data-raw "PingTest,$dataPoint router=\"${ROUTER_MODEL}\" $TIMESTAMP" >> "$curlErrLogFile" 2>&1
curlCode="$?"

"$isInteractive" && echo
Expand Down