diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-09-12 20:12:28 +0300 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-09-12 20:12:28 +0300 |
commit | 858c5f58bd403aeee8f7ece951fe6baec0338dd0 (patch) | |
tree | 4a698326fcd4111d7cf9598a3825efb9a659fc05 /charts.d/opensips.chart.sh | |
parent | e55f4ed4ddc67d8af227fda68c96cbe5d50f2d8d (diff) |
more elastic opensipsctl output match
Diffstat (limited to 'charts.d/opensips.chart.sh')
-rwxr-xr-x | charts.d/opensips.chart.sh | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/charts.d/opensips.chart.sh b/charts.d/opensips.chart.sh index ce42ccdd70..779087e353 100755 --- a/charts.d/opensips.chart.sh +++ b/charts.d/opensips.chart.sh @@ -8,14 +8,10 @@ opensips_priority=80000 opensips_get_stats() { timeout $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:]]*$" |\ + grep "^\(core\|dialog\|net\|registrar\|shmem\|siptrace\|sl\|tm\|uri\|usrloc\):[a-zA-Z0-9_-]\+[[:space:]]*[=:]\+[[:space:]]*[0-9]\+[[:space:]]*$" |\ sed \ - -e "s|-|_|g" \ - -e "s|:|_|g" \ - -e "s|[[:space:]]\+=[[:space:]]\+|=|g" \ - -e "s|[[:space:]]\+$||" \ - -e "s|^[[:space:]]\+||" \ - -e "s|[[:space:]]\+|_|" \ + -e "s|[[:space:]]*[=:]\+[[:space:]]*\([0-9]\+\)[[:space:]]*$|=\1|g" \ + -e "s|[[:space:]:-]\+|_|g" \ -e "s|^|opensips_|g" local ret=$? |