On 7/04/2013 07:43, Adam Armstrong wrote:
I finally got some time to work on this (and finally got Asterisk and snmp speaking :) )
You probably want to do this via the agent now, we're removing all of the SNMP hacks.
It's not really a hack though, it's enabling SNMP in Asterisk. The agent will have to fetch the data from Asterisk and, imho, it's going to be more complicated code (Talking to Asterisk via CLI or AMI is a pain to get this type of data)
I'll convert this to the agent when I have it all working - I have a work related need to get it going...soonish :)
I have an issue with the module however, perhaps you can help. I added:
$config['poller_modules']['asterisk'] = 1; $config['discovery_modules']['asterisk'] = 1;
to includes/defaults.inc.php
I then created asterisk.inc.php under "includes/discovery" and started working on the code. I used to be able to test this with "./discovery.php -m asterisk -h 92" but this has stopped and I don't know why. Even if I put a print at the start of the module, I get nothing during the discovery.
Try -h and -m the other way around.
*facepalm* - turns out I had a PHP error....*blush*
If I look at the device from the web interface, Asterisk is shown and enabled, both poller and discovery.
Can you also tell me how/where I define the data that this module will store ? Is this the right way to go about things ? Any other files I need to look at to edit etc ?
I'm not sure what kind of information asterisk returns, so it's difficult to say where it should go.
I can give you access to the box via SNMP or a dump of the OID's (it's small) if you want to have a look.
IMHO, the only thing worth monitoring is the number of calls you have on a "channel". Everything else has the lifetime of a call.
You might want to just replicate how we do mysql/apache applications, taking data from the agent.
adam. _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium