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 - Installing the Asterisk GUI - Compiling Asterisk 1.4 beta - Script to convert music-on-hold to native formats - Peering two Asterisk servers using IAX - Compiling Asterisk 1.2 with TDM400 and H323 - Installing QueueMetrics from scratch - AddQueueMember and the queue_log file - Avoiding queue_log file rotation - Installing QueueMetrics on Fonality PBXtra - Upgrading QueueMetrics licences - Manually updating QueueMetrics - Installing Queuemetrics on Debian - QueueMetrics logs - Using a HT-488 with Asterisk - Managing agents that dynamically log-on - Installing QueueMetrics using Yum - Administering QueueMetrics using Tomcat - Debugging Qloaderd installation - Rebuilding Fonality queue_log - Installing QueueMetrics - QueueMetrics
Home Page - Installing the Asterisk GUI - Compiling Asterisk 1.4 beta - Script to convert music-on-hold to native formats - Peering two Asterisk servers using IAX - Compiling Asterisk 1.2 with TDM400 and H323 - Installing QueueMetrics from scratch - AddQueueMember and the queue_log file - Avoiding queue_log file rotation - Installing QueueMetrics on Fonality PBXtra - Upgrading QueueMetrics licences - Manually updating QueueMetrics - Installing Queuemetrics on Debian - QueueMetrics logs - Using a HT-488 with Asterisk - Managing agents that dynamically log-on - Installing QueueMetrics using Yum - Administering QueueMetrics using Tomcat - Debugging Qloaderd installation - Rebuilding Fonality queue_log - Installing QueueMetrics - QueueMetrics



