Aug 14, 2008 6:19 PM
New Asterisk Monitoring ZenPack
-
Like (0)
"shbren" wrote:
Just tried this, there are a couple of errors.
The path is hard coded as /opt/zenoss whereas the appliance is /home/zenoss (should probably be ZENHOME).
Also, the path coded doesn't have the version in which is part of the name of the zenpack (add -1.0-py2.4.egg to the Asterisk portion of the path in the asx-stats.py file).
Lastly there's a file missing, iaxpeers, just touch this which seems to make it work (I've not checked the source to see what it does with this).
configfile = "/opt/zenoss/ZenPacks/ZenPacks.AndreaConsadori.Asterisk/ZenPacks/AndreaConsadori/Asterisk/datasources/asx-stats.conf"
configfile = "/$ZENHOME/zenoss/ZenPacks/ZenPacks.AndreaConsadori.Asterisk/ZenPacks/AndreaConsadori/Asterisk/datasources/asx-stats.conf"
??
Hi Matt & Andrea,
I also just noticed that the Zenpack is collecting data for:
- # of IAX peers total
- # of IAX peers online
- # of IAX users total
- # of PSTN channels in use - (perhaps this should be called "zap.channels.inuse"?)
- # of ZAP channels total - (perhaps this should be called "zap.channels.total"?)
Zenoss does not appear to be graphing any of these values however... is this a bug or something that is not yet implemented?
Do you also think we could a "iax.peers.unmonitored"? As I mentioned below about the SIP peers with qualify=yes/no, for IAX2 peers with qualify=no, asterisk cannot detect if they are "online" or not and just states that they are unmonitored.
Right now we are collecting data for IAX peers total, and IAX peers online
I have 12 IAX peers with qualify=no and all show as "unmonitored", my "IAX peers total" is "12", my "IAX peers online" is 0 - logically one would assume that that means I have 12 "offline", but that is actually not the case, they are infact offline but are just unmonitored. If I didn't know ahead of time that I had 12 unmontiored I would probably start having a panic attack thinking all of those peers were offline - it would be useful IMHO if those unmonitored peers were represented somewhere.
Thanks,
--
Matt
pbx*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
PSTN 192.168.0.45 5060 OK (28 ms)
pavianetwork/03821855132 83.211.227.21 5060 OK (43 ms)
503/503 192.168.0.53 D N 5060 OK (156 ms)
502/502 192.168.0.52 D N 5060 OK (157 ms)
501/501 192.168.0.51 D N 5060 OK (157 ms)
5 sip peers [Monitored: 5 online, 0 offline Unmonitored: 0 online, 0 offline]
[root@localhost ~]# /opt/zenoss/ZenPacks/ZenPacks.AndreaConsadori.Asterisk/ZenPacks/AndreaConsadori/Asterisk/datasources/asx-stats.py
Asterisk Call Manager/1.0
Response: Success
Message: Authentication accepted
sip.peers.total:5
sip.peers.online:5
iax.peers.total:0
iax.peers.online:0
sip.users.total:6
iax.users.total:0
sip.channels:0
iax.channels:0
pstn.channels:0
zap.channels:0
agents.loggedin.yes:0
agents.loggedin.no:0
voicemail.all:0
core.threads:33
core.uptime:347779
iax.peers.peer1.status:0
iax.peers.peer2.status:0
[root@localhost ~]# /opt/zenoss/ZenPacks/ZenPacks.AndreaConsadori.Asterisk/ZenPacks/AndreaConsadori/Asterisk/datasources/asx-stats.py
Asterisk Call Manager/1.0
Response: Success
Message: Authentication accepted
sip.peers.total:5
sip.peers.online:4
iax.peers.total:0
iax.peers.online:0
sip.users.total:6
iax.users.total:0
sip.channels:0
iax.channels:0
pstn.channels:0
zap.channels:0
agents.loggedin.yes:0
agents.loggedin.no:0
voicemail.all:0
core.threads:34
core.uptime:347814
iax.peers.peer1.status:0
iax.peers.peer2.status:0
[[root@localhost ~]# /opt/zenoss/ZenPacks/ZenPacks.AndreaConsadori.Asterisk/ZenPacks/AndreaConsadori/Asterisk/datasources/asx-stats.py
Asterisk Call Manager/1.0
Response: Success
Message: Authentication accepted
sip.peers.total:5
sip.peers.online:5
[b]iax.peers.total:1[/b]
[b]iax.peers.online:0[/b]
sip.users.total:6
[b]iax.users.total:1[/b]
sip.channels:0
iax.channels:0
pstn.channels:0
zap.channels:0
agents.loggedin.yes:0
agents.loggedin.no:0
voicemail.all:0
core.threads:34
core.uptime:348489
iax.peers.peer1.status:0
iax.peers.peer2.status:0
sip.peers.total:5
sip.peers.online:5
[b]iax.peers.total:1[/b]
[b]iax.peers.online:0[/b]
sip.users.total:6
[b]iax.users.total:1[/b]
sip.channels:0
[b]iax.channels:1[/b]
pstn.channels:0
zap.channels:0
agents.loggedin.yes:0
agents.loggedin.no:0
voicemail.all:0
core.threads:34
core.uptime:348489
iax.peers.peer1.status:0
iax.peers.peer2.status:0
[/code]
still iax is fine now
Code:
[root@localhost ~]# /opt/zenoss/ZenPacks/
ZenPacks.AndreaConsadori.Asterisk/ZenPacks/AndreaConsadori/Asterisk/
datasources/asx-stats.py
Asterisk Call Manager/1.0
Response: Success
Message: Authentication accepted
sip.peers.total:5
sip.peers.online:5
iax.peers.total:1
iax.peers.online:0
sip.users.total:6
iax.users.total:1
sip.channels:0
iax.channels:0
pstn.channels:0
zap.channels:0
agents.loggedin.yes:0
agents.loggedin.no:0
voicemail.all:0
core.threads:34
core.uptime:348489
iax.peers.peer1.status:0
iax.peers.peer2.status:0
after switch on a iax client
Code:
sip.peers.total:5
sip.peers.online:5
iax.peers.total:1
iax.peers.online:0
sip.users.total:6
iax.users.total:1
sip.channels:0
iax.channels:1
pstn.channels:0
zap.channels:0
agents.loggedin.yes:0
agents.loggedin.no:0
voicemail.all:0
core.threads:34
core.uptime:348489
iax.peers.peer1.status:0
iax.peers.peer2.status:0
[/code]
_______________________________________________
zenoss-zenpacks mailing list
zenoss-zenpacks@zenoss.org
http://lists.zenoss.org/mailman/listinfo/zenoss-zenpacks
sources $ ./asx-stats.py 0
Asterisk Call Manager/1.0
Response: Success
Message: Authentication accepted
[Errno 2] No such file or directory: '/usr/local/zenoss/zenoss/ZenPacks/ZenPacks.AndreaConsadori.Asterisk-2.2-py2.4.egg/ZenPacks/AndreaConsadori/Asterisk/datasources/iaxpeers'
/usr/bin/python /usr/local/zenoss/zenoss/ZenPacks/ZenPacks.AndreaConsadori.Asterisk-1.2-py2.4.egg/ZenPacks/AndreaConsadori/Ast
erisk/datasources/asx-stats.py 0 | sed -e '1,3d' | tr \\n " "
sip.peers.total:14 sip.peers.online:5 iax.peers.total:5 iax.peers.online:3 sip.users.total:11 iax.users.total:5 sip.channels:0 iax.channels:1 pstn.channels:0 zap.channels:0 agents.loggedin.yes:0 agents.loggedin.no:0 voicemail.all:112 core.threads:25 core.uptime:7008
chown zenoss /usr/local/zenoss/zenoss/ZenPacks/ZenPacks.AndreaConsadori.Asterisk-1.2-py2.4.egg/ZenPacks/AndreaConsadori/Asterisk/datasources/iaxpeers
[root@localhost datasources]# ./asx-stats.py 1
Asterisk Call Manager/1.0
Response: Success
Message: Authentication accepted
[root@localhost datasources]# ./asx-stats.py 1 something
sip.peers.total:22
sip.peers.online:9
iax.peers.total:2
iax.peers.online:0
sip.users.total:22
iax.users.total:2
sip.channels:4
iax.channels:0
pstn.channels:0
zap.channels:4
agents.loggedin.yes:0
agents.loggedin.no:0
voicemail.all:0
core.threads:33
core.uptime:1477
Changed 3 months ago by bbibeault ¶
* status changed from backlog to closed
* resolution set to Won't Fix
We don't support asterisk.
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||