Asterisk: How to Install Queuemetrics and Qloader

queuemetrics login

Queuemetrics is by far the best Call Center software Linux.  My only complaint might be that Java is huge resource hog when it parses the Asterisk. ‘/var/log/asterisk/queue_log’.  Luckily Loway provides an excellent PERL script called Qloader.

Today we will walk through installing Queuemeteics,MySQL,and Qloader daemon. My installation instructions are basically a quick rundown of the excellent infomation on Loways site:


My Setup:
Fedora 14 – (32 bit)
Asterisk 1.6
QEMU-KVM virtual machine on Intel i7

First install the RPM for the Loway YUM repository.

[root@AsteriskPBX ~]# wget -P /etc/yum.repos.d http://yum.loway.ch/loway.repo

Next use 'yum' to install Queuemetrics and Qloader.
[root@AsteriskPBX ~]# yum install queuemetrics
Next install qloader.  Note: it's 'qloaderd' , short for 'qloader daemon'.

[root@AsteriskPBX ~]# yum install qloaderd

Please also note: During the yum install process the JAVA MySQL connector should also automatically be installed. This is a common Queuemetrics installation issue.  For example on a Fedora 14 system you have to copy the JAR file from:




This may not be the default location on every Linux system, nor will it necessarily be installed by default, but mysql-connector-java-*.jar is required for Queuemetrics to work.

Next, we must prepare a MySQL database and MySQL user for Queuemetrics.

Use the MySQL client to create the queuemetrics databases and MySQL user login.

[root@AsteriskPBX README]# mysql -u root -p Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 442 Server version: 5.1.58 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. This software comes with ABSOLUTELY NO WARRANTY.

This is free software, and you are welcome to modify and redistribute it under the GPL v2 license

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.


mysql> create database queuemetrics;

Query OK, 1 row affected (0.00 sec)

mysql> GRANT all on queuemetrics.* to ‘queuemetrics’@’localhost’ identified by ‘somepassword’

-> ;

Query OK, 0 rows affected (0.00 sec)

mysql> exit;


After exiting the MySQL client, navigate to the ‘/usr/local/queuemetrics/webapps’.  Select the folder of most recent version of Queuemetrics.  Change directory to ‘WEB-INF/README/’  The defintions for the SQL tables are in file called, ‘queuemetrics_sample.sql’.  Import them in with the following:


[root@AsteriskPBX README]# mysql -u root -p -D queuemetrics < queuemetrics_sample.sql

Enter password:

[root@AsteriskPBX README]#


Move up one directory to ‘/usr/local/queuemetrics/webapps/queuemetrics-’.  Edit the default MySQL password(‘javadude’) with the one you just chose.  Then edit, ‘configuration.properties’ file in the following way:


# This is the default queue log file. default.queue_log_file=/var/log/asterisk/queue_log


# This is the default queue log file.


What we did is tell Queuemetrics to automatically query SQL partition P001 rather than the Asterisk queue_log.

The last step is to configure the qloaderd settings in ‘/etc/sysconfig/qloaderd’ configuration file.


PARTITION=P001 QUEUELOG=/var/log/asterisk/queue_log LOGFILE=/var/log/asterisk/qloaderd.log LOCKFILE=/var/lock/subsys/qloaderd PIDFILE=/var/run/qloaderd.pid MYSQLHOST=localhost MYSQLDB=queuemetrics MYSQLUSER=queuemetrics MYSQLPASS=somepassword
 Now start queuemetrics. 
[root@AsteriskPBX sysconfig]# service queuemetrics start Starting Tomcat6: Using CATALINA_BASE: /usr/local/queuemetrics/tomcat Using CATALINA_HOME: /usr/local/queuemetrics/tomcat Using CATALINA_TMPDIR: /usr/local/queuemetrics/tomcat/temp Using JRE_HOME: /usr/local/queuemetrics/java Using CLASSPATH: /usr/local/queuemetrics/tomcat/bin/bootstrap.jar OK [root@AsteriskPBX sysconfig]#

Now Qloader Daemon.

[root@AsteriskPBX sysconfig]# service qloaderd start

Starting /etc/init.d/qloaderd: [ OK ]

[root@AsteriskPBX sysconfig]#

Create a queue in Asterisk and run some calls through.  If Qloader is functioning properly it should be recording the amount of lines sent to MySQL in ‘/var/log/asterisk/qloaderd.log’.

You should see something like this:

[root@AsteriskPBX asterisk]# tail -f qloaderd.log
 |Wed Oct 19 17:57:17 2011|Heart is still beating... Imported: 8 lines.
 |Wed Oct 19 18:12:18 2011|Heart is still beating... Imported: 8 lines.
 |Wed Oct 19 18:27:19 2011|Heart is still beating... Imported: 8 lines.
 |Wed Oct 19 18:42:20 2011|Heart is still beating... Imported: 8 lines.
 |Thu Oct 20 14:39:27 2011|QueueMetrics MySQL loader - $Revision: 1.22 $
 |Thu Oct 20 14:39:27 2011|Partition P001 - PID 1689 - TZ offset: 0 s. - Heartbeat after 900 s.
 |Thu Oct 20 14:39:27 2011|Now connecting to DB queuemetrics on localhost as user queuemetrics with password javadude123
 |Thu Oct 20 14:39:27 2011|Ignoring all timestamps below 1319075862
 |Thu Oct 20 14:54:28 2011|Heart is still beating... Imported: 0 lines.
 |Thu Oct 20 16:22:03 2011|Heart is still beating... Imported: 32 lines.


Qloader reduces JAVA system load greatly and I highly recommend it for any size call center using Queuemetrics.  I hope you found this tutorial useful.  Please post if you have a question!






If you like this article tell Google!!

Written by mattb in: Asterisk,Asterisk Post | Tags: , , , ,

1 Comment »

  • I have Ipad2. Install and config AstmMonitor HD. Connect to my Asterisk. I can view Overview , but when I push aotnher button like as peers or registry I take message Loading. Please Wait.. . and it’s all! I wait 10-60minutes but nothing.. What does it mean? Thanks

    Comment | December 26, 2015

RSS feed for comments on this post. TrackBack URL

Leave a comment