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 - Utenti/Lenz73 - Add a recipe - UPDATING - Improving AstRecipes - Configuring a queue - Compiling Asterisk 1.4 with TDM400 and H323 - Utenti/walmass - Utenti/timlitw - Compressing recorded calls to MP3 - SandBox - Licences - Compiling Asterisk with OH323 - Misc links - Using a HT-488 with Asterisk - Installing Queuemetrics on Debian - Monitoring Zaptel Hardware - Utenti/peter-dean - Installing the Linksys PAP2-NA port adapter - Connecting to FWD using IAX - Upgrading QueueMetrics licences - User stats - QueueMetrics logs - asterisk - Manually updating QueueMetrics - Generic QueueMetrics startup script - Installing Queuemetrics on PBX-in-a-Flash - Utenti/lostdave - Recording all outgoing traffic for some extensions - Simple queue and agent debug monitoring - Installing XC-AST under Jetty - Optimizing QueueMetrics data access - Managing agents that dynamically log-on - Compiling Asterisk on EPIA with VIA C3 - Connecting to Squillo using SIP - Utenti/bg - Installing XC-AST - AstRecipes markup - Installing QueueMetrics beta through RPM - Utenti/zebru - Installing QueueMetrics - Utenti/rugendo - Installing Ubuntu over HTTP - Utenti/Installing QueueMetrics using Yum - Utenti/Simple queue and agent debug monitoring - Utenti/Szolke - Installing the Welltech LP302 telephone - Installing QueueMetrics from scratch
Installing QueueMetrics on Fonality PBXtra - QueueMetrics - Create an account - Utenti/Lenz73 - Add a recipe - UPDATING - Improving AstRecipes - Configuring a queue - Compiling Asterisk 1.4 with TDM400 and H323 - Utenti/walmass - Utenti/timlitw - Compressing recorded calls to MP3 - SandBox - Licences - Compiling Asterisk with OH323 - Misc links - Using a HT-488 with Asterisk - Installing Queuemetrics on Debian - Monitoring Zaptel Hardware - Utenti/peter-dean - Installing the Linksys PAP2-NA port adapter - Connecting to FWD using IAX - Upgrading QueueMetrics licences - User stats - QueueMetrics logs - asterisk - Manually updating QueueMetrics - Generic QueueMetrics startup script - Installing Queuemetrics on PBX-in-a-Flash - Utenti/lostdave - Recording all outgoing traffic for some extensions - Simple queue and agent debug monitoring - Installing XC-AST under Jetty - Optimizing QueueMetrics data access - Managing agents that dynamically log-on - Compiling Asterisk on EPIA with VIA C3 - Connecting to Squillo using SIP - Utenti/bg - Installing XC-AST - AstRecipes markup - Installing QueueMetrics beta through RPM - Utenti/zebru - Installing QueueMetrics - Utenti/rugendo - Installing Ubuntu over HTTP - Utenti/Installing QueueMetrics using Yum - Utenti/Simple queue and agent debug monitoring - Utenti/Szolke - Installing the Welltech LP302 telephone - Installing QueueMetrics from scratch



