- add pjsip channel retrieval through ami command "pjsip show channelstats"
- also add more common codecs g723 and g729 to default list
- tested against:
- an asterisk 18.19.0 with pjsip calls running, which now includes the pjsip channels
- an old asterisk 16.6.2 running sip calls
the plugin currently has inconsistencies with how lines are indented:
some lines only use tab characters while all other lines use spaces.
Let's make the coding style more uniform by using spaces everywhere.
I apparently forgot to clear out two lines of debugging output from the
script before submitting a pull request.
Those lines of output are super useful for debugging whenever things are
not working as expected (e.g. asterisk has changed its output). So it'll
be more productive to keep them around but only output them if
MUNIN_DEBUG is set.
Since the MeetMe application is not available anymore on Debian, it
makes no sense to keep the graph around. We do however want to keep code
around for parsing stats from MeetMe. So we'll add two "binary" flags
that'll let users which of these two graphs they want.
The default values will favor getting information from ConfBridge which
is the suggested replacement for MeetMe.
An added bonus of this is that some users might decide to disable both
graphs if they use neither applications, which was impossible before.
The MeetMe Asterisk application has been deprecated since Asterisk 1.8.
Debian has also stopped distributing the module with version 11.5.1.
Users now need to migrate to using the ConfBridge application.
Since the application still exists, and some ppl in other Linux distros
probably still use it, we'll keep the code for parsing meetme info for
some time.
This typo causes the following error during munin-update:
asterisk_codecs.graphs_title Asterisk channels per codec' : Parse error in /var/lib/munin/datafile for asterisk_codecs.graphs_title:
This error completely prevents munin-update from creating graphs for the
asterisk plugin.
Asterisk now replies to "Action: command" with the response embedded,
e.g. with "Response: Success" instead of "Response: Follows".
We need to adjust how we parse the server response otherwise we can't
grab any data at all from the AMI.
Closes: #887
The following issues are fixed by lelutin:
* line ending matching does not match for lines that only use \n as
line ending
* iteration is broken because the index for setting values in the
codecs accounting array is never reset to 0 before new loops.
* iax channels don't use a codec hex value, but rather their names
(sip still uses the hex values as far as I can see)
see https://github.com/munin-monitoring/contrib/issues/699
The fourth graph (asterisk_codecs) replaces both asterisk_sipchannels
and asterisk_codecs, as the latter already included the data from the
first. If we want to get more details we could have sub-multigraphs
for a breakdown of the codecs per channel type, but right now it feels
unneeded.
Instead of having a dumb readreply, already drop some of the unneeded
lines of the command when sending the request, and handle errors in
place.
This simplifies the code a little, even though it requires a few more
"discard loops" in the code (to avoid garbage in Asterisk's logs).
This is a bit trickier, since the voicemail might not be enabled
anywhere. Unfortunately it's not easy to set this up during
autoconfig, as voicemails can be added on the fly.
This plugin is targeting to enter main distribution in 2.1 to remove
the multiple Asterisk plugins present in 2.0.
It features full autoconfiguration support, multigraph capabilities,
and less error-prone code.
For the moment, it only implements a replacement for asterisk_channels.