AstRecipes » Simple queue and agent debug monitoring
It may have happened to you: you get called by a busy call center to debug the functionalities of Asterisk, and you get lost in the continuous logging on the console done by tens of operators who keep on using the system. Asterisk produces a lot of information, but that very lot seems to be a bit discouraging for understanding what is going on. What we do now is automate some very simple filtering tasks so that we are not swamped anymore by unwanted information. Grepping the full logWith a standard configuration, * will log everything to the /var/log/asterisk/full log, that will easily get to be a hundred-megabyte behemot. The first thing we do then is to rotate it, i.e.:
mv /var/log/asterisk/full /var/log/asterisk/full.old
asterisk -rx "logger rotate"
tail -f full | grep -e'Agent' -e'queue' -i
What we want to do now is to have a real-time panel, a bit like the command top in Linux, where we can see the queues we care about in real-time and with the minimum possible clutter. We create a small script like the following one:
until [ 20 -lt 10 ]; do
clear
date
asterisk -rx "show queue q-one" | grep -v -i -e'Unavailable'
asterisk -rx "show queue q-two" | grep -v -i -e'Unavailable'
sleep 5
done
It is possible to show agents that are actually available on the system with a command very similar to the one above:
asterisk -rx "show agents" | grep -v -e'not logged'
Softlinks:
Home Page - Compiling Asterisk 1.4 beta - Installing the Asterisk GUI - Peering two Asterisk servers using IAX - Script to convert music-on-hold to native formats - Compiling Asterisk 1.2 with TDM400 and H323 - Avoiding queue_log file rotation - Installing QueueMetrics from scratch - AddQueueMember and the queue_log file - Manually updating QueueMetrics - Installing Queuemetrics on Debian - Using a HT-488 with Asterisk - Managing agents that dynamically log-on - QueueMetrics logs - Installing QueueMetrics on Fonality PBXtra - Upgrading QueueMetrics licences - Administering QueueMetrics using Tomcat - Installing QueueMetrics using Yum - Rebuilding Fonality queue_log - Debugging Qloaderd installation - Installing QueueMetrics - QueueMetrics
Home Page - Compiling Asterisk 1.4 beta - Installing the Asterisk GUI - Peering two Asterisk servers using IAX - Script to convert music-on-hold to native formats - Compiling Asterisk 1.2 with TDM400 and H323 - Avoiding queue_log file rotation - Installing QueueMetrics from scratch - AddQueueMember and the queue_log file - Manually updating QueueMetrics - Installing Queuemetrics on Debian - Using a HT-488 with Asterisk - Managing agents that dynamically log-on - QueueMetrics logs - Installing QueueMetrics on Fonality PBXtra - Upgrading QueueMetrics licences - Administering QueueMetrics using Tomcat - Installing QueueMetrics using Yum - Rebuilding Fonality queue_log - Debugging Qloaderd installation - Installing QueueMetrics - QueueMetrics



