Skip to content

Commit

Permalink
Asterisk SSH 0.2
Browse files Browse the repository at this point in the history
git-svn-id: http://zenpacks.zenoss.org/svn/zenpacks@479 db08cffe-75b9-45d1-af1a-46ad9ef135f6
  • Loading branch information
Matt Ray committed Dec 23, 2009
1 parent 6f8cbf9 commit 9f44d35
Show file tree
Hide file tree
Showing 18 changed files with 633 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ZenPacks.Lais.Asterisk/COPYRIGHT.txt
@@ -0,0 +1,16 @@
All files in this directory and below are:

Copyright (c) 2009 Zenoss, Inc. All rights reserved.

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 as published
by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1 change: 1 addition & 0 deletions ZenPacks.Lais.Asterisk/MANIFEST.in
@@ -0,0 +1 @@
graft ZenPacks
8 changes: 8 additions & 0 deletions ZenPacks.Lais.Asterisk/ZenPacks/Lais/Asterisk/__init__.py
@@ -0,0 +1,8 @@

import Globals
import os.path

skinsDir = os.path.join(os.path.dirname(__file__), 'skins')
from Products.CMFCore.DirectoryView import registerDirectory
if os.path.isdir(skinsDir):
registerDirectory(skinsDir, globals())
@@ -0,0 +1,2 @@
# __init__.py

@@ -0,0 +1 @@
# __init__.py
@@ -0,0 +1,3 @@
1. exchange ssh pub key on remote host in order to not have ssh password error
2. copy this .sh file on asterisk server under /zenoss folder
3- make them executable (chmod 777)
@@ -0,0 +1 @@
/usr/sbin/asterisk -rx "core show channels" | grep active | awk '{ print $1 }' | tr '\n' ' ' |awk '{ print var1 $1 var2 $2}' var1="active_channel:" var2=" active_calls:"
@@ -0,0 +1 @@
/usr/sbin/asterisk -rx "sip show registry" | sed -e '1d' | wc -l | awk '{print var1 $1}' var1="registered_trunk:"
@@ -0,0 +1 @@
/usr/sbin/asterisk -rx "sip show peers" | tail -1 | awk '{print var1 $1 var2 $5 var3 $7 var4 $10 var5 $12}' var1="tot_sip_peers:" var2=" Mon_online:" var3=" Mon_offline:" var4=" Unmon_online:" var5=" Unmon_offline:"
@@ -0,0 +1 @@
# __init__.py
Empty file.
Empty file.

0 comments on commit 9f44d35

Please sign in to comment.