AstRecipes » Rebuilding Fonality queue_log
On a number of Fonality boxes, you'll find that the queue_log file, which content is critical to the correct running of QueueMetrics, is deleted almost immediately and moved to varius files under the /var/log/asterisk/real filesystem.In order to make this work with QueueMetrics, we prepared a small script that will rebuild the queue_log out of the snippets in real. In order not to overload the system, we take only s pecified period pof time (eg 30 days) into consideration for the rebuilding. Here is the script called rebuildqlog.sh
# uso: ./rebuildqlog.sh /var/log/qm_qlog
# --------------------------------------------------
LOGF=$1
LOGT=$LOGF.temp
LOGS=$LOGT.sorted
MAXDAYS=30
rm -f $LOGT $LOGS
nice find /var/log/asterisk/real -name queue_log.* -mtime -$MAXDAYS | xargs cat >> $LOGT
cat /var/log/asterisk/queue_log >> $LOGT
nice sort --buffer-size=10M $LOGT | uniq > $LOGS
rm -f $LOGT $LOGF
mv $LOGS $LOGF
#! /bin/bash
while [ true ]
do
nice /root/rebuildqlog.sh /var/log/qm_qlog
sleep 15
done
nohup /root/run_rebuild.sh &
# This is the default queue log file.
default.queue_log_file=/var/log/qm_qlog
Softlinks:
Installing QueueMetrics on Fonality PBXtra - QueueMetrics - Create an account - Compiling Asterisk 1.4 with TDM400 and H323 - Utenti/Lenz73 - UPDATING - Misc links - Add a recipe - Improving AstRecipes - Configuring a queue - Using a HT-488 with Asterisk - Compressing recorded calls to MP3 - Licences - Utenti/timlitw - asterisk - SandBox - Utenti/walmass - Monitoring Zaptel Hardware - QueueMetrics logs - Compiling Asterisk with OH323 - User stats - Connecting to FWD using IAX - Utenti/peter-dean - Upgrading QueueMetrics licences - Manually updating QueueMetrics - Managing agents that dynamically log-on - Installing the Linksys PAP2-NA port adapter - Installing Queuemetrics on PBX-in-a-Flash - Simple queue and agent debug monitoring - Installing XC-AST - Generic QueueMetrics startup script - Compiling Asterisk on EPIA with VIA C3 - Installing Queuemetrics on Debian - Installing XC-AST under Jetty - Recording all outgoing traffic for some extensions - Optimizing QueueMetrics data access - Connecting to Squillo using SIP - Utenti/lostdave - Installing QueueMetrics from scratch - Utenti/bg - AstRecipes markup - Installing QueueMetrics beta through RPM - Utenti/zebru - Installing Ubuntu over HTTP - Utenti/Installing QueueMetrics using Yum - Utenti/rugendo - Utenti/Simple queue and agent debug monitoring - Installing the Welltech LP302 telephone - Utenti/Szolke - Installing QueueMetrics
Installing QueueMetrics on Fonality PBXtra - QueueMetrics - Create an account - Compiling Asterisk 1.4 with TDM400 and H323 - Utenti/Lenz73 - UPDATING - Misc links - Add a recipe - Improving AstRecipes - Configuring a queue - Using a HT-488 with Asterisk - Compressing recorded calls to MP3 - Licences - Utenti/timlitw - asterisk - SandBox - Utenti/walmass - Monitoring Zaptel Hardware - QueueMetrics logs - Compiling Asterisk with OH323 - User stats - Connecting to FWD using IAX - Utenti/peter-dean - Upgrading QueueMetrics licences - Manually updating QueueMetrics - Managing agents that dynamically log-on - Installing the Linksys PAP2-NA port adapter - Installing Queuemetrics on PBX-in-a-Flash - Simple queue and agent debug monitoring - Installing XC-AST - Generic QueueMetrics startup script - Compiling Asterisk on EPIA with VIA C3 - Installing Queuemetrics on Debian - Installing XC-AST under Jetty - Recording all outgoing traffic for some extensions - Optimizing QueueMetrics data access - Connecting to Squillo using SIP - Utenti/lostdave - Installing QueueMetrics from scratch - Utenti/bg - AstRecipes markup - Installing QueueMetrics beta through RPM - Utenti/zebru - Installing Ubuntu over HTTP - Utenti/Installing QueueMetrics using Yum - Utenti/rugendo - Utenti/Simple queue and agent debug monitoring - Installing the Welltech LP302 telephone - Utenti/Szolke - Installing QueueMetrics



