diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-11-07 12:22:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-11-07 12:22:44 +0000 |
commit | 1e6c93250172946eeb38e94a92a1fd12c9d3011e (patch) | |
tree | 8ca5e16dfc7ad6b3bf2738ca0a48408a950f8f7e /collectors/charts.d.plugin/opensips/opensips.chart.sh | |
parent | Update watch file (diff) | |
download | netdata-1e6c93250172946eeb38e94a92a1fd12c9d3011e.tar.xz netdata-1e6c93250172946eeb38e94a92a1fd12c9d3011e.zip |
Merging upstream version 1.11.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | collectors/charts.d.plugin/opensips/opensips.chart.sh (renamed from charts.d/opensips.chart.sh) | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/charts.d/opensips.chart.sh b/collectors/charts.d.plugin/opensips/opensips.chart.sh index 2a0249dae..c227bd4f2 100644 --- a/charts.d/opensips.chart.sh +++ b/collectors/charts.d.plugin/opensips/opensips.chart.sh @@ -1,9 +1,10 @@ +# shellcheck shell=bash disable=SC1117,SC2154,SC2086 # 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) 2016 Costa Tsaousis <costa@tsaousis.gr> -# GPL v3+ # opensips_opts="fifo get_statistics all" @@ -34,8 +35,10 @@ opensips_check() { fi # check once if the command works - local x="$(opensips_get_stats | grep "^opensips_core_")" - if [ ! $? -eq 0 -o -z "$x" ] + local x + x="$(opensips_get_stats | grep "^opensips_core_")" + # shellcheck disable=SC2181 + if [ ! $? -eq 0 ] || [ -z "$x" ] then error "cannot get global status. Please set opensips_opts='options' whatever needed to get connected to opensips server, in $confd/opensips.conf" return 1 @@ -218,6 +221,7 @@ opensips_update() { opensips_command_failed=0 eval "local $(opensips_get_stats)" + # shellcheck disable=SC2181 [ $? -ne 0 ] && return 1 [ $opensips_command_failed -eq 1 ] && error "failed to get values, disabling." && return 1 |