diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-11-07 12:19:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-11-07 12:20:17 +0000 |
commit | a64a253794ac64cb40befee54db53bde17dd0d49 (patch) | |
tree | c1024acc5f6e508814b944d99f112259bb28b1be /collectors/charts.d.plugin/libreswan/libreswan.chart.sh | |
parent | New upstream version 1.10.0+dfsg (diff) | |
download | netdata-upstream/1.11.0+dfsg.tar.xz netdata-upstream/1.11.0+dfsg.zip |
New upstream version 1.11.0+dfsgupstream/1.11.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | collectors/charts.d.plugin/libreswan/libreswan.chart.sh (renamed from charts.d/libreswan.chart.sh) | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/charts.d/libreswan.chart.sh b/collectors/charts.d.plugin/libreswan/libreswan.chart.sh index 30632e9ce..6e29f8473 100644 --- a/charts.d/libreswan.chart.sh +++ b/collectors/charts.d.plugin/libreswan/libreswan.chart.sh @@ -1,9 +1,10 @@ +# shellcheck shell=bash disable=SC1117 # no need for shebang - this file is loaded from charts.d.plugin +# SPDX-License-Identifier: GPL-3.0-or-later # netdata # real-time performance and health monitoring, done right! # (C) 2018 Costa Tsaousis <costa@tsaousis.gr> -# GPL v3+ # # _update_every is a special variable - it holds the number of seconds @@ -60,7 +61,8 @@ libreswan_get() { libreswan_connected_tunnels=() # convert the ipsec command output to a shell script - # and source it to get the values + # and source it to get the values + # shellcheck disable=SC1090 source <( { libreswan_ipsec whack --status; @@ -85,6 +87,7 @@ libreswan_check() { require_cmd ipsec || return 1 # make sure it is libreswan + # shellcheck disable=SC2143 if [ -z "$(ipsec --version | grep -i libreswan)" ] then error "ipsec command is not Libreswan. Disabling Libreswan plugin." @@ -140,7 +143,7 @@ libreswan_update_one() { [ -z "${id}" ] && libreswan_create_one "${name}" - uptime=$(( ${libreswan_now} - ${libreswan_established_add_time[${n}]} )) + uptime=$(( libreswan_now - libreswan_established_add_time[${n}] )) [ ${uptime} -lt 0 ] && uptime=0 # write the result of the work. |