We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b9ed265 + 27c6fb4 commit d80d4dfCopy full SHA for d80d4df
1 file changed
openwisp-monitoring/files/monitoring.agent
@@ -100,7 +100,7 @@ collect_data() {
100
until [ "$n" -ge 5 ]; do
101
/usr/sbin/netjson-monitoring --dump "$MONITORED_INTERFACES" && break
102
103
- [ "$n" -eq 5 ] && log -e -v "Collecting data failed!"
+ [ "$n" -eq 4 ] && log -e -v "Collecting data failed!"
104
n=$((n + 1))
105
sleep 5
106
done
@@ -201,6 +201,7 @@ send_data() {
201
# send data
202
response_code=$($CURL_COMMAND -H "Content-Type: application/json" -d "$data" "$url")
203
if [ "$response_code" = "200" ]; then
204
+ success=$((success + 1))
205
log -i -v "Data sent successfully."
206
# check if agent was already failing or not to avoid repeating log messages
207
if [ "$FAILING" -eq "1" ]; then
0 commit comments