From ae9f97ea9e16cf7765c0fe62743ff4877aaa794e Mon Sep 17 00:00:00 2001 From: Eugene Varnavsky Date: Thu, 28 Jun 2012 23:26:07 +0400 Subject: [PATCH 1/2] asterisk_channels plugin first added This plugin monitors number of active asterisk channels --- plugins/asterisk/asterisk_channels | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 plugins/asterisk/asterisk_channels diff --git a/plugins/asterisk/asterisk_channels b/plugins/asterisk/asterisk_channels new file mode 100644 index 00000000..2eb995c6 --- /dev/null +++ b/plugins/asterisk/asterisk_channels @@ -0,0 +1,28 @@ +#!/usr/bin/php + From 98f1362ba841bde2124182b515b75cb32dc6af76 Mon Sep 17 00:00:00 2001 From: Steve Schnepp Date: Fri, 29 Jun 2012 12:10:28 +0300 Subject: [PATCH 2/2] Port to /bin/sh --- plugins/asterisk/asterisk_channels | 48 ++++++++++++++---------------- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/plugins/asterisk/asterisk_channels b/plugins/asterisk/asterisk_channels index 2eb995c6..44fbca2b 100644 --- a/plugins/asterisk/asterisk_channels +++ b/plugins/asterisk/asterisk_channels @@ -1,28 +1,26 @@ -#!/usr/bin/php - +asterisk -x "core show channels" | awk '/active channels/ { print "channels.value " $1 }' +exit 0