diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-02-08 07:30:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-02-08 07:30:37 +0000 |
commit | 8a7b72f7cd1ccd547a03eb4243294e741d661d3f (patch) | |
tree | 7bc7be4a8e9e298daa1349348400aa2a653866f2 /collectors/charts.d.plugin/opensips/opensips.chart.sh | |
parent | New upstream version 1.11.1+dfsg (diff) | |
download | netdata-8a7b72f7cd1ccd547a03eb4243294e741d661d3f.tar.xz netdata-8a7b72f7cd1ccd547a03eb4243294e741d661d3f.zip |
Adding upstream version 1.12.0.upstream/1.12.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | collectors/charts.d.plugin/opensips/opensips.chart.sh | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/collectors/charts.d.plugin/opensips/opensips.chart.sh b/collectors/charts.d.plugin/opensips/opensips.chart.sh index c227bd4f2..b42462d6d 100644 --- a/collectors/charts.d.plugin/opensips/opensips.chart.sh +++ b/collectors/charts.d.plugin/opensips/opensips.chart.sh @@ -14,8 +14,8 @@ opensips_timeout=2 opensips_priority=80000 opensips_get_stats() { - run -t $opensips_timeout "$opensips_cmd" $opensips_opts |\ - grep "^\(core\|dialog\|net\|registrar\|shmem\|siptrace\|sl\|tm\|uri\|usrloc\):[a-zA-Z0-9_-]\+[[:space:]]*[=:]\+[[:space:]]*[0-9]\+[[:space:]]*$" |\ + run -t $opensips_timeout "$opensips_cmd" $opensips_opts | + grep "^\(core\|dialog\|net\|registrar\|shmem\|siptrace\|sl\|tm\|uri\|usrloc\):[a-zA-Z0-9_-]\+[[:space:]]*[=:]\+[[:space:]]*[0-9]\+[[:space:]]*$" | sed \ -e "s|[[:space:]]*[=:]\+[[:space:]]*\([0-9]\+\)[[:space:]]*$|=\1|g" \ -e "s|[[:space:]:-]\+|_|g" \ @@ -29,8 +29,7 @@ opensips_get_stats() { opensips_check() { # if the user did not provide an opensips_cmd # try to find it in the system - if [ -z "$opensips_cmd" ] - then + if [ -z "$opensips_cmd" ]; then require_cmd opensipsctl || return 1 fi @@ -38,8 +37,7 @@ opensips_check() { local x x="$(opensips_get_stats | grep "^opensips_core_")" # shellcheck disable=SC2181 - if [ ! $? -eq 0 ] || [ -z "$x" ] - then + 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 fi |