Archived community.zenoss.org | full text search
Skip navigation
1 2 Previous Next 92984 Views 19 Replies Latest reply: Dec 23, 2009 3:17 PM by Andrea Consadori RSS
Matt Ray Rank: Zen Master 2,484 posts since
Apr 5, 2008
Currently Being Moderated

Aug 14, 2008 6:19 PM

New Asterisk Monitoring ZenPack

Another entry in the Submit a ZenPack Contest, tomorrow's the last day
to enter! http://blog.zenoss.com/2008/06/29/submit-a-zenpack-win-fabulous-prizes/

Provided by Community member Andrea 'konsa79' Consadori, this ZenPack
monitors your Asterisk installation via AMI and can be configured to
monitor multiple installations. Screenshots will be up shortly.

Asterisk Monitoring ZenPack: http://www.zenoss.com/community/projects/zenpacks/asterisk

For this and other ZenPacks, check out the ZenPacks site (http://www.zenoss.com/community/projects/zenpacks/
).

Thanks Andrea!

Thanks,
Matt Ray
Zenoss Community Manager
community.zenoss.com
mray@zenoss.com



_______________________________________________
zenoss-zenpacks mailing list
zenoss-zenpacks@zenoss.org
http://lists.zenoss.org/mailman/listinfo/zenoss-zenpacks
  • shbren Newbie 2 posts since
    Aug 16, 2008
    Currently Being Moderated
    1. Aug 17, 2008 8:19 AM (in response to Matt Ray)
    RE: New Asterisk Monitoring ZenPack
    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).
  • Andrea Consadori ZenossMaster 863 posts since
    Feb 11, 2008
    Currently Being Moderated
    2. Aug 18, 2008 3:41 AM (in response to shbren)
    RE: New Asterisk Monitoring ZenPack

    "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).



    this is the script

    configfile = "/opt/zenoss/ZenPacks/ZenPacks.AndreaConsadori.Asterisk/ZenPacks/AndreaConsadori/Asterisk/datasources/asx-stats.conf"


    i've to insert
    configfile = "/$ZENHOME/zenoss/ZenPacks/ZenPacks.AndreaConsadori.Asterisk/ZenPacks/AndreaConsadori/Asterisk/datasources/asx-stats.conf"
    ??

    why i've to put the version?

    the zenpack path doesn't have version

    /zenoss/ZenPacks/ZenPacks.AndreaConsadori.Asterisk
  • Andrea Consadori ZenossMaster 863 posts since
    Feb 11, 2008
    Currently Being Moderated
    3. Aug 19, 2008 1:57 PM (in response to Andrea Consadori)
    update
    Hi Matts :)

    first of all: i'm not a developer, i take the script from here http://forums.cacti.net/about23318-0-asc-30.html and i make it working on zenoss

    you are right, the script can gather all this info's (as this example)

    sip.peers.total:100
    sip.peers.online:0
    iax.peers.total:1
    iax.peers.online:1
    sip.users.total:68
    iax.users.total:1
    sip.channels:67
    iax.channels:0
    pstn.channels:6
    zap.channels:0
    agents.loggedin.yes:0
    agents.loggedin.no:0
    voicemail.all:0
    core.threads:28
    core.uptime:2338478
    iax.peers.peer1.status:0
    iax.peers.peer2.status:0

    actually i don't create datapoint cause unuseless for my test istallation,
    now i want to patch the $ZENHOME path (i've to understand how to manage this and zenpack path because sometimes is different) and then i will create other datapoint.

    on trixbox sip trunk has qualify=no

    i create an uptime graph to see when asterisk goes offline (previously i had big problem during res_snmp module test)

    asap i've more time i will create an asterisk test installation where configure some iax trunks




     

     


    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

  • Andrea Consadori ZenossMaster 863 posts since
    Feb 11, 2008
    Currently Being Moderated
    4. Aug 22, 2008 4:23 AM (in response to Andrea Consadori)
    ASTERISK ZENPACK DEVELOPMENT
    i think now it's fixed, i put all channel with qualify=yes and i try to switch off one of them:

    here my sip show peers output

    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]
    


    and here the script output

    [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
    

    here i switch off one peer
    
    
    [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
    
    [
  • Andrea Consadori ZenossMaster 863 posts since
    Feb 11, 2008
    Currently Being Moderated
    5. Aug 22, 2008 4:44 AM (in response to Andrea Consadori)
    RE: ASTERISK ZENPACK DEVELOPMENT
    still iax is fine now

    [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
    


    after switch on a iax client

    
    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]
  • imcdona Newbie 2 posts since
    Aug 17, 2008
    Currently Being Moderated
    7. Aug 31, 2008 9:45 AM (in response to Matt Ray)
    cant find iaxpeers
    I modified the asx-stats.py with the proper locations of both the config file and the iaxpeers files. I manually created a blank iaxpeers file as mentioned earlier. I am still getting an error when I run the following from the command line:

    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'


    Also, why hasn't the modified zenpack with the proper $ZENHOME in place for the config file been uploaded yet?

    Any Idea's?


    Isaac
  • imcdona Newbie 2 posts since
    Aug 17, 2008
    Currently Being Moderated
    8. Aug 31, 2008 10:04 AM (in response to imcdona)
    RE: cant find iaxpeers
    I got past the iaxpeers file issue. I had to not only touch the iaxpeers file, but also give zenoss ownership of the file:

    /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 


    I am still not getting any graphs though. I copied the text from the command section of the Asterisk template and pasted it to the command line for grins and it appears to be ok:

    chown zenoss /usr/local/zenoss/zenoss/ZenPacks/ZenPacks.AndreaConsadori.Asterisk-1.2-py2.4.egg/ZenPacks/AndreaConsadori/Asterisk/datasources/iaxpeers


    Any Idea's?
  • Andrea Consadori ZenossMaster 863 posts since
    Feb 11, 2008
    Currently Being Moderated
    9. Sep 1, 2008 1:42 AM (in response to imcdona)
    RE: cant find iaxpeers
    Hi Isaac,
    i try to fix zenpath problem but i need time because i see that:

    1- in my installation $zenhome in py file stop the script
    2- in some version the zenoss zenpack include the zenpack version, in other installation no
    3- asterisk zenpack create a zope problem on my zenoss (rel 2.2.3)

    once installed i cannot add more datapoint.... i open a ticket and i'm waiting.. once fixed che zenpack "instability" i will fix the path.

    4- for iax trunk, the file has to be created (in my zenpack exist, but i see that some file is not exported with zenpack)

    5- once you can get all value from script it will start to create graph

    i don't want that your graph issue is due to zope instability (due to asterisk zenpack).
  • Andrea Consadori ZenossMaster 863 posts since
    Feb 11, 2008
    Currently Being Moderated
    10. Sep 3, 2008 1:17 AM (in response to Andrea Consadori)
    RE: cant find iaxpeers
    milestone: => zenoss-2.3
  • hpwr Newbie 2 posts since
    Jul 1, 2009
    Currently Being Moderated
    11. Jul 1, 2009 6:48 AM (in response to Andrea Consadori)
    RE: cant find iaxpeers
    Hello, any news about you ZenPack ? I installed it yesterday end it seem that the same -old- problems aren´t solved yet.

    I have changed the path from /opt/zenoss to /home/zenoss and created the iaxpeers file and configured the conf. getting these results:

    [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
    



    As you can see, the script is working but only with some argument next to the manager number, strange.

    The biggest problem seem to be the configuration in Zenoss:
    /Devices /Server /Linux /Templates /Asterisk
    Data Sources: Check_asterisk /usr/bin/python /opt/zenoss/ZenPacks/ZenPacks.AndreaConsadori.Asterisk/ZenPacks/AndreaConsadori/Asterisk/datasources/asx-stats.py 0 | sed -e '1,3d' | tr \\n " " COMMAND True

    There is still the false /opt path...


    I still don´t know hoy to get the data monitored into zenoss, I have the ASterisk box monitored as a Linux server over SNMP right now, but this is more a thing of reading the manuals and getting it.

    Thanks !
  • Andrea Consadori ZenossMaster 863 posts since
    Feb 11, 2008
    Currently Being Moderated
    12. Jul 1, 2009 9:49 AM (in response to hpwr)
    RE: cant find iaxpeers
    this zenpack has been abandoned cause instability
  • hpwr Newbie 2 posts since
    Jul 1, 2009
    Currently Being Moderated
    13. Jul 1, 2009 11:45 AM (in response to Andrea Consadori)
    RE: cant find iaxpeers
    :cry:

    The Zenoss admin should then ban the claimed Asterisk monitoring from the website I think...

    Regards.
  • Andrea Consadori ZenossMaster 863 posts since
    Feb 11, 2008
    Currently Being Moderated
    14. Jul 1, 2009 2:24 PM (in response to hpwr)
    RE: cant find iaxpeers
    i open a ticket but zenoss team say me that ther's no solution

    http://dev.zenoss.com/trac/ticket/3608

     

     

    Changed 3 months ago by bbibeault ¶

    * status changed from backlog to closed
    * resolution set to Won't Fix

    We don't support asterisk.

1 2 Previous Next

More Like This

  • Retrieving data ...