Community discussions

MikroTik App
 
PhilipLykov
newbie
Topic Author
Posts: 48
Joined: Fri Dec 10, 2010 12:24 am

Probe from the telnet parsing

Fri Dec 10, 2010 12:54 am

Hello!
I have to monitor few different linux systems with Yate and Asterisk on them. I need to make charts of the used VoIP channels. Unfortunately Asterisk has very limited SNMP functionality (it can give only total number of calls, but I need to know the external calls) and Yate don't have SNMP at all.

Bot of this products has very good telnet remote management with machine readable outputs. So I see the only one way to monitor them: open telnet session, send a request, receive an answer, parse it and make a chart.

Is it possible with The Dude?
 
User avatar
gsandul
Member Candidate
Member Candidate
Posts: 154
Joined: Mon Oct 19, 2009 1:42 pm

Re: Probe from the telnet parsing

Fri Dec 10, 2010 10:15 am

So I see the only one way to monitor them: open telnet session, send a request, receive an answer, parse it and make a chart.
It will be imposible with The Dude itself.
But it is not the only one way to monitor it.
1) You can use The Dude execute() function to run external script on server where The Dude is running. This script should return number of calls. But you better use second method.
Unfortunately Asterisk has very limited SNMP functionality and Yate don't have SNMP at all.
2) But you can extend net-snmp functionality. Read man for snmpd.conf, you can run script on monitored server when The Dude is snmp getting OID
For example the following string in snmpd.conf
extend .1.3.6.1.4.1.2021.50 1 /bin/cat /var/log/maillog | /usr/bin/grep -c SPAM
will return number of spam messages in /var/log/maillog when you will snmpwalk on 1.3.6.1.4.1.2021.50 subtree.