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 | |
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/Makefile.inc | 13 | ||||
-rw-r--r-- | collectors/charts.d.plugin/opensips/README.md (renamed from python.d/python_modules/bases/__init__.py) | 0 | ||||
-rw-r--r-- | collectors/charts.d.plugin/opensips/opensips.chart.sh (renamed from charts.d/opensips.chart.sh) | 10 | ||||
-rw-r--r-- | collectors/charts.d.plugin/opensips/opensips.conf (renamed from conf.d/charts.d/opensips.conf) | 0 |
4 files changed, 20 insertions, 3 deletions
diff --git a/collectors/charts.d.plugin/opensips/Makefile.inc b/collectors/charts.d.plugin/opensips/Makefile.inc new file mode 100644 index 000000000..a7b5d3a92 --- /dev/null +++ b/collectors/charts.d.plugin/opensips/Makefile.inc @@ -0,0 +1,13 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +# THIS IS NOT A COMPLETE Makefile +# IT IS INCLUDED BY ITS PARENT'S Makefile.am +# IT IS REQUIRED TO REFERENCE ALL FILES RELATIVE TO THE PARENT + +# install these files +dist_charts_DATA += opensips/opensips.chart.sh +dist_chartsconfig_DATA += opensips/opensips.conf + +# do not install these files, but include them in the distribution +dist_noinst_DATA += opensips/README.md opensips/Makefile.inc + diff --git a/python.d/python_modules/bases/__init__.py b/collectors/charts.d.plugin/opensips/README.md index e69de29bb..e69de29bb 100644 --- a/python.d/python_modules/bases/__init__.py +++ b/collectors/charts.d.plugin/opensips/README.md 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 diff --git a/conf.d/charts.d/opensips.conf b/collectors/charts.d.plugin/opensips/opensips.conf index e25111dce..e25111dce 100644 --- a/conf.d/charts.d/opensips.conf +++ b/collectors/charts.d.plugin/opensips/opensips.conf |