Last change
on this file was
c5c522c,
checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago
|
initial commit, transferred from cleaned syn3 svn tree
|
-
Property mode set to
100644
|
File size:
916 bytes
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | |
---|
3 | #Generate and fill the RRD with asterisk resource values |
---|
4 | |
---|
5 | ############# ASTERISK ACTIVE CALLS |
---|
6 | syn3-graphcreate asterisk-active-calls --step=60 --use=MAX \ |
---|
7 | active_calls=GAUGE:120:0:U |
---|
8 | |
---|
9 | ACTIVE_CALLS="`asterisk -r -x 'show channels' | grep 'active call' | cut -d ' ' -f 1`" |
---|
10 | syn3-graph asterisk-active-calls active_calls="$ACTIVE_CALLS" |
---|
11 | |
---|
12 | |
---|
13 | |
---|
14 | ############# ASTERISK REGED SIPS and ACTIVE PEERS |
---|
15 | syn3-graphcreate asterisk-connections --step=60 --use=MAX \ |
---|
16 | sip_phones=GAUGE:120:0:U \ |
---|
17 | sip_trunks=GAUGE:120:0:U |
---|
18 | |
---|
19 | OUTPUT=`asterisk -r -x "sip show peers" | grep "sip peers"`; |
---|
20 | VALUE1=`echo $OUTPUT | cut -d ' ' -f 5`; |
---|
21 | VALUE2=`echo $OUTPUT | cut -d ' ' -f 10`; |
---|
22 | ONLINE_SIP_PHONES=`echo "$VALUE1 + $VALUE2" | bc` |
---|
23 | SIP_TRUNKS=`asterisk -r -x "sip show registry" | grep 'Registered' | wc -l` |
---|
24 | #cut of the header. |
---|
25 | syn3-graph asterisk-connections sip_phones="$ONLINE_SIP_PHONES" sip_trunks="$SIP_TRUNKS" |
---|
Note: See
TracBrowser
for help on using the repository browser.