There are four possible causes for the "*" symbol in the reports: 1. Your report is considering a time period that starts or ends in the middle of a call. QueueMetrics is letting you know that the call is outside the time range. Change the time range to fix this. 2. The logs are incomplete. For some reason, Asterisk has written the logs wrong, they are missing or the logs are doubled. Using the Asterisk Unique ID, can you find the logs in the /var/log/asterisk/queue_log-... file? 3. The PBX is not logging the caller number. You can find this out in the queue_log file, like before. 4. The numbers are hidden due to the "Hide Numbers" feature: Hidden Numbers policy
This behavior depends on how Asterisk and QueueMetrics handle incomplete calls, i.e. calls that were not properly closed in the logs due to errors and are missing a closing event.
Such calls remain "open" in the system until an Asterisk restart occurs, which triggers a QUEUESTART event. When this happens, all open calls, both mistakenly left open and genuinely open ones, are forcefully closed. At this point, QueueMetrics tries to determine whether they are "real" calls or "incomplete" calls. It does so by checking properties default.maxOngoingTalkTime and default.maxOngoingWaitTime, which are the same ones used to exclude calls from the real-time page. The same logic applies at the end of the analysis in order to show a report that includes all calls.
So, if you have an incomplete call (one for which no further events will ever be received), and you run a report that ends just one minute after the call started, that call is likely to be counted. However, if you run the same report ending one week after the call started, it will be excluded as it is clearly an incomplete call.
In early versions of QueueMetrics, incomplete calls closed by a mid-flight QUEUESTART event would always appear in the report because their durations were not taken into account when determining whether the call was incomplete. To change this behavior, you can set the following property:
default.ignoreQueueStarts=true
With this setting, calls that are auto-closed by the QUEUESTART event will be considered incomplete and excluded from all reports, preventing discrepancies between short and long period reports.
In any case, calls that are complete — meaning they have all of their events and fall fully within the analysis period — will always be counted correctly, even if their wait or conversation times exceed the thresholds defined in default.maxOngoingTalkTime and default.maxOngoingWaitTime.
Unfortunately, it is not possible to use multiple time-zones within the same QueueMetrics instance, for the Reports or Wallboard view. The QueueMetrics internal date and time depends on the server time, where the software is installed or (in the case of the hosted solution of QueueMetrics) the instance chosen time-zone. This feature has been deprecated due to the conflicts and confusion that arose from the use of multiple time-zones. For consistent and clear data handling, QueueMetrics now operates under a single time-zone framework.
That is possible - as long as you run only reports that contain 10 agents. If the queue has 15, that is not possible. The only thing you can do is to use an alias to "stick together" multiple agents, but at that point you lose the ability to distinguish between them.
In general, if you have 15 distinct agents (that is, you pay 15 people each month), you should be licensed for all of them; if not you may find that some queries, wallbards or real-time reports block because they are over the limit.
Still, if you are okay on losing details, you may use one agent as "catch-all" by setting its aliases to all the agents you don't want to see. So, for example, if you have a queue that has agents 101, 102, 103 and 104, and you only want to see 101 and 102, you may create another agent called "Other" that aliases to "agent/103|agent/104".
This way you will see in the reports agents "101", "102" and "Other", and they will only be counted as three separate agents. Of course you lose the ability to distinguish between 103 and 104, so YMMV.
See also:
See also:
default.rewriteLocalChannels=true
tail -f /var/log/asterisk/queue_log
default.useRawAgentSessions=true
HTTP Status 404 - /queuemetrics/
-----
type: Status report
message: /queuemetrics/
description: The requested resource (/queuemetrics/) is not available.
-----
Apache Tomcat/5.0.28
xmllint web.xml
yum install libxml2-devel on Red-Hat based
Linux distributions)./usr/local/queuemetrics/tomcat/conf/Catalina/localhost/queuemetrics.xml
and restarting the queuemetrics service.
h 10.00.00 enters queue 1
h 10.00.59 exits queue 1
h 10.01.00 enters queue 2
h 10.01.59 exits queue 2
h 10.02.00 enters queue 3
h 10.02.30 answered on queue 3
h 10.03.00 caller hangs up
h 10.00.00 lost call on "queue 1", waited for 59 seconds
h 10.01.00 lost call on "queue 2", waited for 59 seconds
h 10.02.00 answered call on "queue 3", waited for 30 seconds, duration 30 seconds
h 10.00.00 call enters on queue 3, waits for 2:30, duration 30 seconds
1106553723|1106553678.2598|queue-f|NONE|EXITWITHKEY|3|1
exten => s,1,System( echo
"${EPOCH}|${UNIQUEID}|myqueue|NONE|EXITWITHKEY|key|1|" >>
/var/log/asterisk/queue_log )
my $use_subqueue = 1;
exten => s,8,Queue(queue-service|t|1234||180)
exten => s,n, .....
exten => s,n,Macro(qm-lostcall,did-11,${CALLERID(name)})
exten => s,n,Queue(service-q,,30)
exten => s,n, .....
[macro-qm-lostcall]
; ${ARG1} - the name for the fake queue
; ${ARG2} - the caller id to be logged
exten => s,1,System( echo "${EPOCH}|${UNIQUEID}.1|${ARG1}|NONE|ENTERQUEUE||${ARG2}" >> /var/log/asterisk/queue_log )
exten => s,2,System( echo "${EPOCH}|${UNIQUEID}.1|${ARG1}|NONE|ABANDON|0|0|0" >> /var/log/asterisk/queue_log )
[from-trunk-custom]
exten => _X.,1,Set(CALLERID(num)=${CALLERID(name)})
exten => _X.,n,Set(CALLERID(name)=${CALLERID(name)})
exten => _X.,n,Goto(from-trunk,${EXTEN},1)
To check which time QM and MySQL are using, the easiest thing for you to do is to check the License page.
Just click on the Licence page and the current clock and time zone for the QueueMetrics server and its MySQL instance will be shown. It's important that there is no difference between those values.
Generally speaking, the first thing you should do if you suspect a timing problem is run a command
that will sync the system clock with an high-precision atomic clock on all involved machines, for example:
ntpdate ntp.ien.it
As hardware clocks tend to "drift" in the long period, it is a good idea to add this command to a
nightly cron job that will keep the clocks of all involved systems below a one-second difference.
[root@asterisk1 ~]# hwclock --show
[root@asterisk1 ~]# date -R
[root@asterisk1 ~]# date
[root@asterisk1 ~]# more /etc/sysconfig/clock
export JAVA_OPTS="-Xms1G -Xmx1G -server -Duser.timezone=GMT+05:00"
Unfortunately, it is not possible to use multiple time-zones within the same QueueMetrics instance, for the Reports or Wallboard view. The QueueMetrics internal date and time depends on the server time, where the software is installed or (in the case of the hosted solution of QueueMetrics) the instance chosen time-zone. This feature has been deprecated due to the conflicts and confusion that arose from the use of multiple time-zones. For consistent and clear data handling, QueueMetrics now operates under a single time-zone framework.
That is possible - as long as you run only reports that contain 10 agents. If the queue has 15, that is not possible. The only thing you can do is to use an alias to "stick together" multiple agents, but at that point you lose the ability to distinguish between them.
In general, if you have 15 distinct agents (that is, you pay 15 people each month), you should be licensed for all of them; if not you may find that some queries, wallbards or real-time reports block because they are over the limit.
Still, if you are okay on losing details, you may use one agent as "catch-all" by setting its aliases to all the agents you don't want to see. So, for example, if you have a queue that has agents 101, 102, 103 and 104, and you only want to see 101 and 102, you may create another agent called "Other" that aliases to "agent/103|agent/104".
This way you will see in the reports agents "101", "102" and "Other", and they will only be counted as three separate agents. Of course you lose the ability to distinguish between 103 and 104, so YMMV.
See also:
Still - there is a snag: if you have a call reported multiple times on different queues - for example when using outbound tracking, having a call that is tracked for outbound and also goes on a queue - then Presentialist, that by definition will build a full picture of what is happening, will be unable to tell apart the events generated by your queue from the ones generated by outbound tracking. The result is a dog's breakfast; one of the calls might be reported with an incorrect agent, and then you might have a second lost call when both calls close at once.
To see if you are affected by this behavior, just run a normal report for the same period of time as the real-time page/wallboard was using - if the data you see in the report are correct, then that's the issue.
This is not an issue for reports, that by definition only process data from queues you specify, but in order to have a meaningful representation of live data you need to add the following property to your configuration.properties file:
realtime.ignoredQueues=q-outbound
or if you already have an ignore queue set in Uniloader:
realtime.ignoredQueues=_q-outbound
This will simply hide the queue (or queues) from real-time reports and will let you run accurate wallboards. You can specify multiple queues by separating them with a comma. The new properties apply to QueueMetrics 23.09.3 and above.
See also:
exten => queue-ext,n,Set(CALLERID(name)=queuename - ${CALLERID(num))
callfile.transfercall.enabled=true
callfile.transfercall.channel=Local/10@queuemetrics/n
callfile.transfercall.extension=31
callfile.transfercall.context=queuemetrics
exten => 31,1,NoOp( " QM: Call redirect ,ade by ${QM_LOGIN} for callID: ${CALLID} to extension ${REDIR_EXT}")
exten => 31,n,ChannelRedirect(${CALLID},from-internal,${REDIR_EXT},1)
exten => 31,n,Hangup
realtime.startHour=4 realtime.startHour=s8
Of course, the larger the sliding window, the more data QM has to evaluate every time it
produces a realtime report, so it will use more RAM and CPU.
sound.yellowAlarm=http://myserver/audioYellow.wav
sound.redAlarm=http://myserver/audioRed.wav
1106553723|1106553678.2598|queue-f|NONE|EXITWITHKEY|3|1
exten => s,1,System( echo
"${EPOCH}|${UNIQUEID}|myqueue|NONE|EXITWITHKEY|key|1|" >>
/var/log/asterisk/queue_log )
#If an ongoing call has a wait time that exceeds this value, drop it. 0: ignore
default.maxOngoingWaitTime=1000
#If an ongoing call has a talk time that exceeds this value, drop it. 0: ignore
default.maxOngoingTalkTime=2000
[from-trunk-custom]
exten => _X.,1,Set(CALLERID(num)=${CALLERID(name)})
exten => _X.,n,Set(CALLERID(name)=${CALLERID(name)})
exten => _X.,n,Goto(from-trunk,${EXTEN},1)
ntpdate ntp.ien.it
We strongly suggest running it daily using a cron job so that you make sure the servers are
consistently time-aligned in the future.
#In how many seconds is the realtime page to refresh?
realtime.refresh_time=18
#The hour of the day to start real-time monitoring or sXX: sliding window of XX hours
realtime.startHour=s12
[myqueue]
exten => s,1,Queue(queuename||)
exten => s,2,System( echo "${EPOCH}|${UNIQUEID}|queuename|NONE|EXITWITHTIMEOUT|1" >> /var/log/asterisk/queue_log )
myvoip*CLI> agent show
123 (John Doe) available at '1234@from-internal' (musiconhold is 'default')
callfile.dir=tcp:dial:bingo@1.2.3.4
asterisk*CLI> show dialplan queuemetrics
[ Context 'queuemetrics' created by 'pbx_config' ]
'10' => 1. Answer() [pbx_config]
2. Wait(10) [pbx_config]
..and a lot more stuff here....
; addqueuemember - 422
exten => _422XX,1,Answer
exten => _422XX,2,AddQueueMember(my-queue,Local/${EXTEN:3}@agents)
exten => _422XX,3,System( echo "${EPOCH}|${UNIQUEID}|my-queue|Agent/${EXTEN:3}|ADDMEMBER|-" >> /var/log/asterisk/queue_log )
exten => _422XX,4,DBput(dynlogin/log_Agent-${EXTEN:3}=${EPOCH})
exten => _422XX,5,Hangup
; removequeuemember - 423
exten => _423XX,1,Answer
exten => _423XX,2,RemoveQueueMember(my-queue,Local/${EXTEN:3}@agents)
exten => _423XX,3,DBget(ORGEPOCH=dynlogin/log_Agent-${EXTEN:3})
exten => _423XX,4,Set(RV=$[${EPOCH} - ${ORGEPOCH}])
exten => _423XX,5,GotoIf($["${RV}" = "0"]?8:6)
exten => _423XX,6,System( echo "${EPOCH}|${UNIQUEID}|my-queue|Agent/${EXTEN:3}|REMOVEMEMBER|-|${RV}" >> /var/log/asterisk/queue_log )
exten => _423XX,7,DBdel(dynlogin/log_Agent-${EXTEN:3})
exten => _423XX,8,Hangup
; agent pause
exten => _416XX,1,PauseQueueMember(|Agent/${EXTEN:3})
exten => _416XX,n,Hangup()
; agent unpause
exten => _417XX,1,UnpauseQueueMember(|Agent/${EXTEN:3})
exten => _417XX,n,Hangup()
default.rewriteLocalChannels=false
; addqueuemember - 422
exten => _422XX,1,Answer
exten => _422XX,2,AddQueueMember(my-queue,Local/${EXTEN:3}@agents)
exten => _422XX,3,Hangup
; removequeuemember - 423
exten => _423XX,1,Answer
exten => _423XX,2,RemoveQueueMember(my-queue,Local/${EXTEN:3}@agents)
exten => _423XX,3,Hangup
; agent pause
exten => _416XX,1,PauseQueueMember(|Agent/${EXTEN:3})
exten => _416XX,n,Hangup()
; agent unpause
exten => _417XX,1,UnpauseQueueMember(|Agent/${EXTEN:3})
exten => _417XX,n,Hangup()
default.rewriteLocalChannels=false
#The hour of the day to start real-time monitoring or sXX: sliding window of XX hours
realtime.startHour=s12
; Add Member - 422
exten => _422XX,1,Answer
exten => _422XX,2,AddQueueMember(q1,SIP/${EXTEN:3})
exten => _422XX,3,AddQueueMember(q2,SIP/${EXTEN:3})
exten => _422XX,4,AddQueueMember(q3,SIP/${EXTEN:3})
exten => _422XX,5,System( echo "${EPOCH}|${UNIQUEID}|NONE|SIP/${EXTEN:3}|AGENTLOGIN|-" >> /var/log/asterisk/queue_log )
exten => _422XX,6,DBput(dynlogin/log_Agent-${EXTEN:3}=${EPOCH})
exten => _422XX,7,Hangup
; Remove Member - 423
exten => _423XX,1,Answer
exten => _423XX,2,RemoveQueueMember(q1,SIP/${EXTEN:3})
exten => _423XX,3,RemoveQueueMember(q2,SIP/${EXTEN:3})
exten => _423XX,4,RemoveQueueMember(q3,SIP/${EXTEN:3})
exten => _423XX,5,DBget(ORGEPOCH=dynlogin/log_Agent-${EXTEN:3})
exten => _423XX,6,Set(RV=$[${EPOCH} - ${ORGEPOCH}])
exten => _423XX,7,GotoIf($["${RV}" = "0"]?10:8)
exten => _423XX,8,System( echo "${EPOCH}|${UNIQUEID}|NONE|SIP/${EXTEN:3}|AGENTLOGOFF|-|${RV}" >> /var/log/asterisk/queue_log )
exten => _423XX,9,DBdel(dynlogin/log_Agent-${EXTEN:3})
exten => _423XX,10,Hangup
default.rewriteLocalChannels=true
default.rewriteLocalWithQueue=true
The login-logoff code in this case is as follows (for queue 'q1'):
; Add Member - 422
exten => _422XX,1,Answer
exten => _422XX,2,AddQueueMember(q1,SIP/${EXTEN:3})
exten => _422XX,3,System( echo "${EPOCH}|${UNIQUEID}|NONE|Agent/q1-${EXTEN:3}|AGENTLOGIN|-" >> /var/log/asterisk/queue_log )
exten => _422XX,4,DBput(dynlogin/log_Agent-q1-${EXTEN:3}=${EPOCH})
exten => _422XX,5,Hangup
; Remove Member - 423
exten => _423XX,1,Answer
exten => _423XX,2,RemoveQueueMember(q1,SIP/${EXTEN:3})
exten => _423XX,3,DBget(ORGEPOCH=dynlogin/log_Agent-q1-${EXTEN:3})
exten => _423XX,4,Set(RV=$[${EPOCH} - ${ORGEPOCH}])
exten => _423XX,5,GotoIf($["${RV}" = "0"]?8:6)
exten => _423XX,6,System( echo "${EPOCH}|${UNIQUEID}|NONE|Agent/q1-${EXTEN:3}|AGENTLOGOFF|-|${RV}" >> /var/log/asterisk/queue_log )
exten => _423XX,7,DBdel(dynlogin/log_Agent-q1-${EXTEN:3})
exten => _423XX,8,Hangup
Starting from QueueMetrics 26.01, queuemetrics-tomcat requires an updated version of RPM that CentOS 7 does not provide, because CentOS 7 reached its official End of Life (EOL) on June 30, 2024.
For that reason, we strongly recommend migrating to a different version of operating system to ensure system security.
For this reason, if you want to install or update QueueMetrics or Wombat Dialer on CentOS 7, you must follow a specific procedure.
This guide shows a workaround by using a version of queuemetrics-tomcat that is still compatible with CentOS 7.
Note:
This applies to CentOS 7 and all CentOS 7/RedHat 7 based distributions, including Sangoma 7 (FreePBX 14, 15, and 16).
Fresh Installation of QueueMetrics
To perform a fresh installation of QueueMetrics, run the following commands:
wget https://yum.loway.ch/loway.repo -O /etc/yum.repos.d/loway.repo
yum install https://downloads.loway.ch/software/queuemetrics-tomcat/queuemetrics-tomcat-9.0.113-1.noarch.rpm
yum install queuemetrics
Updating QueueMetrics
To perform an update of QueueMetrics, run the following commands:
yum update queuemetrics
Running a full system update (yum update) on a machine with QueueMetrics installed will fail, because it pulls newer queuemetrics-tomcat package that is no longer compatible with CentOS 7.
QueueMetrics can be installed using the system package manager by following these two simple steps.
Step 1 – Add the Adoptium repository
wget https://downloads.loway.ch/misc/adoptium.repo -O /etc/yum.repos.d/adoptium.repo
This command downloads the Adoptium repository configuration file and saves it into the system’s YUM/DNF repository directory.
QueueMetrics requires Java 8 to run, and this repository ensures that a supported OpenJDK version is available and can be installed automatically.
Step 2 – Install QueueMetrics
yum install queuemetrics
IMPORTANT: you should install QueueMetrics manually only if you are an expert user. Unfortunately this is a non-standard installation in a non-standard environment and Loway won't be able to support you with system administration problems (tomcat configuration, database permissions and so on), although the support on the QueueMetrics software itself will remain available as always.
Being CentOS the natural habitat for Asterisk and almost all the Asterisk-related world, we always suggest to install QueueMetrics on a CentOS machine (or whatever CentOS flavor like FreePBX or Elastix), and if you ask us CentOS is always the better solution, even in a virtual machine. Using CentOS is not always possible though so your are free to install QueueMetrics in whatever system you prefer.
QueueMetrics is a Java servlet application that runs over a Tomcat server. Potentially you can run QueueMetrics on every Linux distribution and Operating System, Windows as well.
Although the procedure may change amongst the various different systems, conceptually it's ever the same: install all the dependencies and put QueueMetrics on the Tomcat server.
Given that we can't cover every possible Operating System in this tutorial, we'll use a Ubuntu machine to show you the steps to get QueueMetrics working. Your part will be to adapt the steps to your system and situation and remember that filenames and directories may be different.
For this procedure we are going to be using QueueMetrics v26.01.1.4 and Tomcat v9.0.113 on a Ubuntu 24.04 or Debian 12 machine.
To install it on Debian 12, download the appropriate repository configuration file:
mkdir -p /etc/apt/sources.list.d
wget http://www.mirbsd.org/~tg/Debs/sources.txt/wtf-bookworm.sources -O /etc/apt/sources.list.d/wtf-bookworm.sources
apt-get update
Explanation:
Java 8 is not available by default on Debian 12 but Thorsten Glaser, the current maintainer of OpenJDK 8 in Debian, provides a repository which includes OpenJDK 8, built using the Debian OpenJDK 8 package.
See also: https://unix.stackexchange.com/questions/749903/how-can-i-install-java-8-on-debian-12-bookworm
apt-get install openjdk-8-jdk-headless mariadb-server
java -version
openjdk version "1.8.0_312"
OpenJDK Runtime Environment (build 1.8.0_312-8u312-b07-0ubuntu1-b07)
OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)
systemctl status mariadb
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2020-03-04 08:53:18 CET; 2 days ago
Main PID: 978 (mysqld_safe)
CGroup: /system.slice/mariadb.service
├─ 978 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
└─1250 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --...
wget https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.113/bin/apache-tomcat-9.0.113.tar.gz
mkdir -p /opt/tomcat-queuemetrics
tar xzf apache-tomcat-9.0.113.tar.gz -C /opt/tomcat-queuemetrics
wget https://downloads.loway.ch/software/queuemetrics/QueueMetrics-26.01.1.4.tar.gz
tar xzf QueueMetrics-26.01.1.4.tar.gz -C /opt/tomcat-queuemetrics/apache-tomcat-9.0.113/webapps/
ln -s /opt/tomcat-queuemetrics/apache-tomcat-9.0.113/webapps/queuemetrics-26.01.1.4 /opt/tomcat-queuemetrics/apache-tomcat-9.0.113/webapps/queuemetrics
mysql -e "set password for 'root'@'localhost' = password('')"
/opt/tomcat-queuemetrics/apache-tomcat-9.0.113/bin/startup.sh
mysqldump -uqueuemetrics -pjavadude queuemetrics > qmdump.sql
UPDATE queuemetrics.queue_log
SET 'partition' = 'DEL'
WHERE time_id' < '1451606400';
DELETE FROM queuemetrics.queue_log
WHERE 'partition' = 'DEL';
OPTIMIZE TABLE queuemetrics.queue_log
The default settings for Java 8 is to use a strong source of randomness as a seed to generate random numbers that are cryptographically secure. Unfortunately, in order to do this, it has to wait for sufficient entropy to build up, and this may take a long time (even minutes).
As you will not likely need to use such a high level of randomness in QM, but you
will prefer quick boot times for the application, you can easily edit the file
/etc/sysconfig/qm-tomcat6 and change the line that says:
JAVA_OPTS="-server -Dtomcat.instance=$TOMCAT_INSTANCE $JAVA_MEM $JAVA_RMI"
To:
JAVA_OPTS="-server -Djava.security.egd=file:/dev/./urandom -Dtomcat.instance=$TOMCAT_INSTANCE $JAVA_MEM $JAVA_RMI"
Then restart with service queuemetrics restart. Now it should start up in a few seconds.
This setting is already in place for new installs, so this procedure is only needed on systems that were originally installed using Java 6.
JDBC_URL=jdbc:mysql://localhost/queuemetrics?autoReconnect=true&zeroDateTimeBehavior=convertToNull&jdbcCompliantTruncation=false&user=queuemetrics&password=javadude
to something like:
JDBC_URL=jdbc:mariadb://127.0.0.1/queuemetrics?user=queuemetrics&password=javadude&sessionVariables=sql_mode=''&autoReconnect=true
Please note that it is not enough to just change the string "jdbc:mysql" to "jdbc:mariadb"
as the connection parameters accepted by each driver are different.
yum localinstall jdk-8u121-linux-i586.rpm
If all goes well, by running it you should receive a confirmation message
like the one below:
# java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) Client VM (build 25.121-b13, mixed mode, sharing)
Now we need to create a symlink that lets QueueMetrics find it:
mkdir -p /usr/lib/jvm
cd /usr/lib/jvm
ln -s /usr/java/jdk1.8.0_121/jre/ java
Make sure you change the exact directory (where it says jdk1.8.0_121) to match your version of Java.
Downloading and installing Tomcat 8
cd /root
wget http://yum.loway.ch/RPMS/noarch/queuemetrics-tomcat-8.5.12-28.noarch.rpm
rpm --nodeps -Uvh queuemetrics-tomcat-8.5.12-28.noarch.rpm
If all goes well, by running the following command you get a confirmation that QueueMetrics will use
the right Java package:
# /usr/local/queuemetrics/java/bin/java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) Client VM (build 25.121-b13, mixed mode, sharing)
Updating QueueMetrics
yum update queuemetrics
And then go to home page and follow the update wizard to upgrade your database.
/etc/init.d/queuemetrics stop
/etc/init.d/qm-tomcat6 cleancache
/etc/init.d/queuemetrics start
mysql> delete from arch_syslog where sys_dt_creazione < DATE_SUB( NOW(), INTERVAL 90 DAY );
Query OK, 756 rows affected (0.04 sec)
mysql> optimize table arch_syslog;
[root@qm ~]# du --human-readable /usr/local/queuemetrics/tomcat/logs/
6.1G /usr/local/queuemetrics/tomcat/logs/
[root@qm ~]# cd /usr/local/queuemetrics/tomcat/logs/
[root@qm logs]# /etc/init.d/queuemetrics stop
[root@qm logs]# rm -f catalina.out
[root@qm logs]# rm -f localhost*.txt
[root@qm logs]# /etc/init.d/queuemetrics start
[root@qm logs]# du --human-readable /usr/local/queuemetrics/tomcat/logs/
20M /usr/local/queuemetrics/tomcat/logs/
web.xml and the various properties files from the WEB-INF/ folder of the old system to the new system
/etc/sysconfig/qloaderd on the Asterisk server) so that it can upload data to the new database
<Context docBase="/usr/local/queuemetrics/webapps/queuemetrics-1.5.1"
path="/queuemetrics">
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127.0.0.1"/>
</Context>
You could use the following format for the address instead of 127.0.0.1:
grant codeBase "file:/usr/local/queuemetrics/tomcat/webapps/queuemetrics/-" {
permission java.net.SocketPermission "localhost:3306", "connect,resolve";
permission java.io.FilePermission "/var/log/asterisk/queue_log", "read";
permission java.util.PropertyPermission "*", "read,write";
permission java.lang.RuntimePermission "createClassLoader";
permission java.io.FilePermission "${java.io.tmpdir}/-", "read,write,delete";
// if you use LIVE connection to Asterisk instances:
permission java.net.SocketPermission "127.0.0.1:5038", "connect,resolve";
};
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 3.7 kB 00:00
http://yum.loway.ch/RPMS/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
Error: failure: repodata/primary.xml.gz from LowayResearch: [Errno 256] No more mirrors to try.
yum clean all
cd /var/cache/yum/LowayResearch/
wget --cache=off http://yum.loway.ch/RPMS/repodata/filelists.xml.gz
wget --cache=off http://yum.loway.ch/RPMS/repodata/primary.xml.gz
wget --cache=off http://yum.loway.ch/RPMS/repodata/repomd.xml
wget https://yum.loway.ch/loway.repo -O /etc/yum.repos.d/loway.repo
yum install queuemetrics
yum update queuemetrics
yum erase queuemetrics
yum install queuemetrics
Steps to Remove a Call Log from QueueMetrics:
Before proceeding with any steps, we will first identify the correct UniqID of the call we want to remove.
Open QueueMetrics and go to the report where the calls need to be removed. Then open the call details, there you will find the UniqID.
Check if the Unique Call ID (UniqueID) is correct by verifying the queue, date, and time of the call.
Access the QueueMetrics CLI Database:
mysql queuemetrics;
Run a SELECT query to verify the call log:
select * from queue_log where call_id = "123456789"
Then you move it to the 'DEL' partition: (this is typically done to mark the record as deleted without physically removing it from the database, allowing for potential recovery or auditing)
update queue_log set `partition` = "DEL" where call_id = "123456789"
After doing that, we need to clear the QueueMetrics cache by going to Settings → RAM Caching, then clicking 'Clean Caches' followed by 'Reload'.
CREATE TABLE `queue_log_b` (
`partition` varchar( 20 ) NOT NULL default '',
`time_id` int( 11 ) unsigned NOT NULL default '0',
`call_id` varchar( 30 ) NOT NULL default '',
`queue` varchar( 30 ) NOT NULL default '',
`agent` varchar( 30 ) NOT NULL default '',
`verb` varchar( 30 ) NOT NULL default '',
`data1` varchar( 200 ) NOT NULL default '',
`data2` varchar( 200 ) NOT NULL default '',
`data3` varchar( 200 ) NOT NULL default '',
`data4` varchar( 200 ) NOT NULL default '',
`data5` varchar( 200 ) NOT NULL default '',
`serverid` varchar( 10 ) NOT NULL default '',
`unique_row_count` int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
KEY `idx_sel` ( `partition` , `time_id` , `queue` ( 2 ) ) ,
KEY `partizione_b` ( `partition` , `time_id` , `unique_row_count` ) ,
KEY `by_hotdesk` ( `partition` ( 5 ) , `verb` ( 5 ) , `time_id` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1;
INSERT INTO queue_log_b
SELECT *
FROM queue_log
TRUNCATE TABLE queue_log
INSERT INTO queue_log (
SELECT `partition`, `time_id`, `call_id`, `queue`, `agent`,
`verb`, `data1`, `data2`, `data3`, `data4`, `data5`,
`serverid`, MIN(`unique_row_count`)
FROM queue_log_b
GROUP BY `partition`, `time_id`, `call_id`, `queue`,
`agent`, `verb`, `data1`, `data2`, `data3`,
`data4`, `data5`, `serverid`
ORDER BY time_id, MIN(unique_row_count)
)
DROP table queue_log_b;
/var/log/asterisk/queue_log {
weekly
missingok
rotate 10
notifempty
sharedscripts
create 0640 asterisk asterisk
postrotate
/etc/rc.d/init.d/qloaderd restart > /dev/null 2> /dev/null
endscript
}
/etc/init.d/mysqld stop
myisamchk -c /var/lib/mysql/queuemetrics/*.MYI
myisamchk -r /var/lib/mysql/queuemetrics/*.MYI
/etc/init.d/mysqld start
my $use_subqueue = 1;
exten => s,8,Queue(queue-service|t|1234||180)
[server] section of your /etc/my.ini file:
interactive_timeout = 2764800
wait_timeout = 2764800
Starting from QueueMetrics 26.01, queuemetrics-tomcat requires an updated version of RPM that CentOS 7 does not provide, because CentOS 7 reached its official End of Life (EOL) on June 30, 2024.
For that reason, we strongly recommend migrating to a different version of operating system to ensure system security.
For this reason, if you want to install or update QueueMetrics or Wombat Dialer on CentOS 7, you must follow a specific procedure.
This guide shows a workaround by using a version of queuemetrics-tomcat that is still compatible with CentOS 7.
Note:
This applies to CentOS 7 and all CentOS 7/RedHat 7 based distributions, including Sangoma 7 (FreePBX 14, 15, and 16).
Fresh Installation of QueueMetrics
To perform a fresh installation of QueueMetrics, run the following commands:
wget https://yum.loway.ch/loway.repo -O /etc/yum.repos.d/loway.repo
yum install https://downloads.loway.ch/software/queuemetrics-tomcat/queuemetrics-tomcat-9.0.113-1.noarch.rpm
yum install queuemetrics
Updating QueueMetrics
To perform an update of QueueMetrics, run the following commands:
yum update queuemetrics
Running a full system update (yum update) on a machine with QueueMetrics installed will fail, because it pulls newer queuemetrics-tomcat package that is no longer compatible with CentOS 7.
QueueMetrics can be installed using the system package manager by following these two simple steps.
Step 1 – Add the Adoptium repository
wget https://downloads.loway.ch/misc/adoptium.repo -O /etc/yum.repos.d/adoptium.repo
This command downloads the Adoptium repository configuration file and saves it into the system’s YUM/DNF repository directory.
QueueMetrics requires Java 8 to run, and this repository ensures that a supported OpenJDK version is available and can be installed automatically.
Step 2 – Install QueueMetrics
yum install queuemetrics
Since an XLS file can hold up to 65536 lines per sheet, new limitations have been implemented to avoid errors during export.
default.maxRowsXls=1000
IMPORTANT: you should install QueueMetrics manually only if you are an expert user. Unfortunately this is a non-standard installation in a non-standard environment and Loway won't be able to support you with system administration problems (tomcat configuration, database permissions and so on), although the support on the QueueMetrics software itself will remain available as always.
Being CentOS the natural habitat for Asterisk and almost all the Asterisk-related world, we always suggest to install QueueMetrics on a CentOS machine (or whatever CentOS flavor like FreePBX or Elastix), and if you ask us CentOS is always the better solution, even in a virtual machine. Using CentOS is not always possible though so your are free to install QueueMetrics in whatever system you prefer.
QueueMetrics is a Java servlet application that runs over a Tomcat server. Potentially you can run QueueMetrics on every Linux distribution and Operating System, Windows as well.
Although the procedure may change amongst the various different systems, conceptually it's ever the same: install all the dependencies and put QueueMetrics on the Tomcat server.
Given that we can't cover every possible Operating System in this tutorial, we'll use a Ubuntu machine to show you the steps to get QueueMetrics working. Your part will be to adapt the steps to your system and situation and remember that filenames and directories may be different.
For this procedure we are going to be using QueueMetrics v26.01.1.4 and Tomcat v9.0.113 on a Ubuntu 24.04 or Debian 12 machine.
To install it on Debian 12, download the appropriate repository configuration file:
mkdir -p /etc/apt/sources.list.d
wget http://www.mirbsd.org/~tg/Debs/sources.txt/wtf-bookworm.sources -O /etc/apt/sources.list.d/wtf-bookworm.sources
apt-get update
Explanation:
Java 8 is not available by default on Debian 12 but Thorsten Glaser, the current maintainer of OpenJDK 8 in Debian, provides a repository which includes OpenJDK 8, built using the Debian OpenJDK 8 package.
See also: https://unix.stackexchange.com/questions/749903/how-can-i-install-java-8-on-debian-12-bookworm
apt-get install openjdk-8-jdk-headless mariadb-server
java -version
openjdk version "1.8.0_312"
OpenJDK Runtime Environment (build 1.8.0_312-8u312-b07-0ubuntu1-b07)
OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)
systemctl status mariadb
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2020-03-04 08:53:18 CET; 2 days ago
Main PID: 978 (mysqld_safe)
CGroup: /system.slice/mariadb.service
├─ 978 /bin/sh /usr/bin/mysqld_safe --basedir=/usr
└─1250 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --...
wget https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.113/bin/apache-tomcat-9.0.113.tar.gz
mkdir -p /opt/tomcat-queuemetrics
tar xzf apache-tomcat-9.0.113.tar.gz -C /opt/tomcat-queuemetrics
wget https://downloads.loway.ch/software/queuemetrics/QueueMetrics-26.01.1.4.tar.gz
tar xzf QueueMetrics-26.01.1.4.tar.gz -C /opt/tomcat-queuemetrics/apache-tomcat-9.0.113/webapps/
ln -s /opt/tomcat-queuemetrics/apache-tomcat-9.0.113/webapps/queuemetrics-26.01.1.4 /opt/tomcat-queuemetrics/apache-tomcat-9.0.113/webapps/queuemetrics
mysql -e "set password for 'root'@'localhost' = password('')"
/opt/tomcat-queuemetrics/apache-tomcat-9.0.113/bin/startup.sh
mysqldump -uqueuemetrics -pjavadude queuemetrics > qmdump.sql
UPDATE queuemetrics.queue_log
SET 'partition' = 'DEL'
WHERE time_id' < '1451606400';
DELETE FROM queuemetrics.queue_log
WHERE 'partition' = 'DEL';
OPTIMIZE TABLE queuemetrics.queue_log
The default settings for Java 8 is to use a strong source of randomness as a seed to generate random numbers that are cryptographically secure. Unfortunately, in order to do this, it has to wait for sufficient entropy to build up, and this may take a long time (even minutes).
As you will not likely need to use such a high level of randomness in QM, but you
will prefer quick boot times for the application, you can easily edit the file
/etc/sysconfig/qm-tomcat6 and change the line that says:
JAVA_OPTS="-server -Dtomcat.instance=$TOMCAT_INSTANCE $JAVA_MEM $JAVA_RMI"
To:
JAVA_OPTS="-server -Djava.security.egd=file:/dev/./urandom -Dtomcat.instance=$TOMCAT_INSTANCE $JAVA_MEM $JAVA_RMI"
Then restart with service queuemetrics restart. Now it should start up in a few seconds.
This setting is already in place for new installs, so this procedure is only needed on systems that were originally installed using Java 6.
JDBC_URL=jdbc:mysql://localhost/queuemetrics?autoReconnect=true&zeroDateTimeBehavior=convertToNull&jdbcCompliantTruncation=false&user=queuemetrics&password=javadude
to something like:
JDBC_URL=jdbc:mariadb://127.0.0.1/queuemetrics?user=queuemetrics&password=javadude&sessionVariables=sql_mode=''&autoReconnect=true
Please note that it is not enough to just change the string "jdbc:mysql" to "jdbc:mariadb"
as the connection parameters accepted by each driver are different.
yum localinstall jdk-8u121-linux-i586.rpm
If all goes well, by running it you should receive a confirmation message
like the one below:
# java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) Client VM (build 25.121-b13, mixed mode, sharing)
Now we need to create a symlink that lets QueueMetrics find it:
mkdir -p /usr/lib/jvm
cd /usr/lib/jvm
ln -s /usr/java/jdk1.8.0_121/jre/ java
Make sure you change the exact directory (where it says jdk1.8.0_121) to match your version of Java.
Downloading and installing Tomcat 8
cd /root
wget http://yum.loway.ch/RPMS/noarch/queuemetrics-tomcat-8.5.12-28.noarch.rpm
rpm --nodeps -Uvh queuemetrics-tomcat-8.5.12-28.noarch.rpm
If all goes well, by running the following command you get a confirmation that QueueMetrics will use
the right Java package:
# /usr/local/queuemetrics/java/bin/java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) Client VM (build 25.121-b13, mixed mode, sharing)
Updating QueueMetrics
yum update queuemetrics
And then go to home page and follow the update wizard to upgrade your database.
mysql> delete from arch_syslog where sys_dt_creazione < DATE_SUB( NOW(), INTERVAL 90 DAY );
Query OK, 756 rows affected (0.04 sec)
mysql> optimize table arch_syslog;
[root@qm ~]# du --human-readable /usr/local/queuemetrics/tomcat/logs/
6.1G /usr/local/queuemetrics/tomcat/logs/
[root@qm ~]# cd /usr/local/queuemetrics/tomcat/logs/
[root@qm logs]# /etc/init.d/queuemetrics stop
[root@qm logs]# rm -f catalina.out
[root@qm logs]# rm -f localhost*.txt
[root@qm logs]# /etc/init.d/queuemetrics start
[root@qm logs]# du --human-readable /usr/local/queuemetrics/tomcat/logs/
20M /usr/local/queuemetrics/tomcat/logs/
mysqldump -uqueuemetrics -pjavadude queuemetrics > database.sql
If you receive an error that says "mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces" just add the
option --no-tablespaces to your mysqldump command - this option was added to MySQL 5.7.31 and MySQL 8.0.21 and later.
mysql -uqueuemetrics -pjavadude queuemetrics < database.sql
ALTER TABLE `agaw_alarms` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `agaw_dati` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `agaw_logs` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `agaw_runs` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `agenti_noti` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `arch_classes` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `arch_syslog` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `arch_users` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `broadcast_msg` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `call_status` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `code_possibili` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `dbversion` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `locations` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `oq_calls` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `oq_notes` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `oq_queues` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `pause_codes` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `qa_data` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `qa_forms` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `qa_forms_items` CONVERT TO CHARACTER SET utf8;
&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
<param-value>jdbc:mysql://127.0.0.1/queuemetrics?zeroDateTimeBehavior=convertToNull
&jdbcCompliantTruncation=false&user=queuemetrics&password=javadude
&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8</param-value>
/usr/local/queuemetrics/webapps/queuemetrics-1.5.0/
/usr/local/queuemetrics/webapps/queuemetrics-1.5.1/
/usr/local/queuemetrics/webapps/queuemetrics-1.5.3/
sound.yellowAlarm=http://myserver/audioYellow.wav
sound.redAlarm=http://myserver/audioRed.wav
[ERR] -- Inner Exception --
Exception: java.nio.BufferOverflowException
Stack trace:
java.nio.BufferOverflowException
at java.nio.charset.CoderResult.throwException(CoderResult.java:259)
at java.lang.StringCoding$CharsetSE.encode(StringCoding.java:344)
at java.lang.StringCoding.encode(StringCoding.java:378)
at java.lang.String.getBytes(String.java:812)
at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228)
JAVA_OPTS="-Xms512M -Xmx512M -Dfile.encoding=UTF-8"
JAVA_OPTS="-Xms512M -Xmx512M -Dfile.encoding=ISO-8859-1"
callfile.dir=tcp:dial:bingo@10.10.3.27:1234
exten => 2000,1,Answer
exten => 2000,2,NoOp( "QM: Logging on Agent/${AGENTCODE} to extension ${AGENT_EXT}@from-internal" )
exten => 2000,3,AgentCallBackLogin(${AGENTCODE}||${AGENT_EXT}@from-internal)
exten => 2000,4,Set(AGENTE_${AGENT_EXT}=${AGENTCODE}|g)
exten => 2000,5,Hangup
[queuedial]
exten => _7.,1,Set(MY_QUE=300)
exten => _7.,n,Set(MY_NUM=${EXTEN:1})
exten => _7.,n,Set(MY_AGENT=${AGENTE_${CALLERID(num)}})
exten => _7.,n,NoOp,Ag: ${MY_AGENT} N: ${MY_NUM} Q: ${MY_QUE}
......
exten => _9XXX.,1,Set(MY_QUE=${EXTEN:1:3})
exten => _9XXX.,2,Set(MY_NUM=${EXTEN:4})
exten => _9XXX.,3,Set(MY_AGENT=${CALLERID(num)})
exten => _9XXX.,4,NoOp,Ag: ${MY_AGENT} N: ${MY_NUM} Q: ${MY_QUE}
exten => _9XXX.,5,MixMonitor(Q-${MY_QUE}-${UNIQUEID}.wav|b|)
exten => _9XXX.,6,DeadAGI(queueDial.agi|${MY_NUM}|Zap/g0/${MY_NUM}|q-${MY_QUE}|Agent/${MY_AGENT})
exten => _9XXX.,7,Congestion
To check which time QM and MySQL are using, the easiest thing for you to do is to check the License page.
Just click on the Licence page and the current clock and time zone for the QueueMetrics server and its MySQL instance will be shown. It's important that there is no difference between those values.
Generally speaking, the first thing you should do if you suspect a timing problem is run a command
that will sync the system clock with an high-precision atomic clock on all involved machines, for example:
ntpdate ntp.ien.it
As hardware clocks tend to "drift" in the long period, it is a good idea to add this command to a
nightly cron job that will keep the clocks of all involved systems below a one-second difference.
[root@asterisk1 ~]# hwclock --show
[root@asterisk1 ~]# date -R
[root@asterisk1 ~]# date
[root@asterisk1 ~]# more /etc/sysconfig/clock
export JAVA_OPTS="-Xms1G -Xmx1G -server -Duser.timezone=GMT+05:00"
For readability’s sake, the examples on Loway manuals still show the pipe character, but for real calls, you have to URL-encode each input parameter.
That is possible - as long as you run only reports that contain 10 agents. If the queue has 15, that is not possible. The only thing you can do is to use an alias to "stick together" multiple agents, but at that point you lose the ability to distinguish between them.
In general, if you have 15 distinct agents (that is, you pay 15 people each month), you should be licensed for all of them; if not you may find that some queries, wallbards or real-time reports block because they are over the limit.
Still, if you are okay on losing details, you may use one agent as "catch-all" by setting its aliases to all the agents you don't want to see. So, for example, if you have a queue that has agents 101, 102, 103 and 104, and you only want to see 101 and 102, you may create another agent called "Other" that aliases to "agent/103|agent/104".
This way you will see in the reports agents "101", "102" and "Other", and they will only be counted as three separate agents. Of course you lose the ability to distinguish between 103 and 104, so YMMV.
See also:
Still - there is a snag: if you have a call reported multiple times on different queues - for example when using outbound tracking, having a call that is tracked for outbound and also goes on a queue - then Presentialist, that by definition will build a full picture of what is happening, will be unable to tell apart the events generated by your queue from the ones generated by outbound tracking. The result is a dog's breakfast; one of the calls might be reported with an incorrect agent, and then you might have a second lost call when both calls close at once.
To see if you are affected by this behavior, just run a normal report for the same period of time as the real-time page/wallboard was using - if the data you see in the report are correct, then that's the issue.
This is not an issue for reports, that by definition only process data from queues you specify, but in order to have a meaningful representation of live data you need to add the following property to your configuration.properties file:
realtime.ignoredQueues=q-outbound
or if you already have an ignore queue set in Uniloader:
realtime.ignoredQueues=_q-outbound
This will simply hide the queue (or queues) from real-time reports and will let you run accurate wallboards. You can specify multiple queues by separating them with a comma. The new properties apply to QueueMetrics 23.09.3 and above.
See also:
/etc/init.d/queuemetrics stop
/etc/init.d/qm-tomcat6 cleancache
/etc/init.d/queuemetrics start
CREATE TABLE `queue_log_b` (
`partition` varchar( 20 ) NOT NULL default '',
`time_id` int( 11 ) unsigned NOT NULL default '0',
`call_id` varchar( 30 ) NOT NULL default '',
`queue` varchar( 30 ) NOT NULL default '',
`agent` varchar( 30 ) NOT NULL default '',
`verb` varchar( 30 ) NOT NULL default '',
`data1` varchar( 200 ) NOT NULL default '',
`data2` varchar( 200 ) NOT NULL default '',
`data3` varchar( 200 ) NOT NULL default '',
`data4` varchar( 200 ) NOT NULL default '',
`data5` varchar( 200 ) NOT NULL default '',
`serverid` varchar( 10 ) NOT NULL default '',
`unique_row_count` int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
KEY `idx_sel` ( `partition` , `time_id` , `queue` ( 2 ) ) ,
KEY `partizione_b` ( `partition` , `time_id` , `unique_row_count` ) ,
KEY `by_hotdesk` ( `partition` ( 5 ) , `verb` ( 5 ) , `time_id` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1;
INSERT INTO queue_log_b
SELECT *
FROM queue_log
TRUNCATE TABLE queue_log
INSERT INTO queue_log (
SELECT `partition`, `time_id`, `call_id`, `queue`, `agent`,
`verb`, `data1`, `data2`, `data3`, `data4`, `data5`,
`serverid`, MIN(`unique_row_count`)
FROM queue_log_b
GROUP BY `partition`, `time_id`, `call_id`, `queue`,
`agent`, `verb`, `data1`, `data2`, `data3`,
`data4`, `data5`, `serverid`
ORDER BY time_id, MIN(unique_row_count)
)
DROP table queue_log_b;
/var/log/asterisk/queue_log {
weekly
missingok
rotate 10
notifempty
sharedscripts
create 0640 asterisk asterisk
postrotate
/etc/rc.d/init.d/qloaderd restart > /dev/null 2> /dev/null
endscript
}
HTTP Status 404 - /queuemetrics/
-----
type: Status report
message: /queuemetrics/
description: The requested resource (/queuemetrics/) is not available.
-----
Apache Tomcat/5.0.28
xmllint web.xml
yum install libxml2-devel on Red-Hat based
Linux distributions)./usr/local/queuemetrics/tomcat/conf/Catalina/localhost/queuemetrics.xml
and restarting the queuemetrics service.
Servlet.service() for servlet LowayTransactionController threw exception java.lang.OutOfMemoryError
JAVA_OPTS="-Xms256M -Xmx512M"
export JAVA_OPTS
JAVA_OPTS="-server -Xms3072M -Xmx3072M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing"
export JAVA_OPTS
/etc/init.d/queuemetrics stop
rm -rf /usr/local/queuemetrics/tomcat/work/Catalina/*
/etc/init.d/queuemetrics start
[ERR] -- Inner Exception --
Exception: java.nio.BufferOverflowException
Stack trace:
java.nio.BufferOverflowException
at java.nio.charset.CoderResult.throwException(CoderResult.java:259)
at java.lang.StringCoding$CharsetSE.encode(StringCoding.java:344)
at java.lang.StringCoding.encode(StringCoding.java:378)
at java.lang.String.getBytes(String.java:812)
at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:228)
JAVA_OPTS="-Xms512M -Xmx512M -Dfile.encoding=UTF-8"
JAVA_OPTS="-Xms512M -Xmx512M -Dfile.encoding=ISO-8859-1"
callfile.dir=tcp:dial:bingo@1.2.3.4
asterisk*CLI> show dialplan queuemetrics
[ Context 'queuemetrics' created by 'pbx_config' ]
'10' => 1. Answer() [pbx_config]
2. Wait(10) [pbx_config]
..and a lot more stuff here....
Reading repository metadata in from local files
primary.xml.gz 100% |=========================| 3.7 kB 00:00
http://yum.loway.ch/RPMS/repodata/primary.xml.gz: [Errno -1] Metadata file does not match checksum
Trying other mirror.
Error: failure: repodata/primary.xml.gz from LowayResearch: [Errno 256] No more mirrors to try.
yum clean all
cd /var/cache/yum/LowayResearch/
wget --cache=off http://yum.loway.ch/RPMS/repodata/filelists.xml.gz
wget --cache=off http://yum.loway.ch/RPMS/repodata/primary.xml.gz
wget --cache=off http://yum.loway.ch/RPMS/repodata/repomd.xml
JAVA_OPTS="-Dfile.encoding=ISO-8859-1 -Xms256M -Xmx512M"
export JAVA_OPTS
This tells Java to start by using ISO-8859-1 as the default file encoding and use a minimum of 256
megabytes and expand the memory pool as needed up to 512 megabytes. You should also set this in the
/etc/init.d/queuemetrics startup file, so that it's set system-wide when QueueMetrics starts.
iconv --from-code=ISO_8859-1 --to-code=UTF-8 --output licence.jsp licence_OLD.jsp
[server] section of your /etc/my.ini file:
interactive_timeout = 2764800
wait_timeout = 2764800
grant all privileges on queuemetrics.* to 'queuemetrics'@'localhost.localdomain' identified by 'password';
jdbc:mysql://localhost/queuemetrics?zeroDateTimeBehavior=convertToNull&user=queuemetrics&password=javadude
grant all privileges on queuemetrics.* to 'queuemetrics'@'localhost.localdomain' identified by 'password';
grant all privileges on queuemetrics.* to 'queuemetrics'@'mydb' identified by 'password';
CREATE TABLE `queue_log_b` (
`partition` varchar( 20 ) NOT NULL default '',
`time_id` int( 11 ) unsigned NOT NULL default '0',
`call_id` varchar( 30 ) NOT NULL default '',
`queue` varchar( 30 ) NOT NULL default '',
`agent` varchar( 30 ) NOT NULL default '',
`verb` varchar( 30 ) NOT NULL default '',
`data1` varchar( 200 ) NOT NULL default '',
`data2` varchar( 200 ) NOT NULL default '',
`data3` varchar( 200 ) NOT NULL default '',
`data4` varchar( 200 ) NOT NULL default '',
`data5` varchar( 200 ) NOT NULL default '',
`serverid` varchar( 10 ) NOT NULL default '',
`unique_row_count` int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
KEY `idx_sel` ( `partition` , `time_id` , `queue` ( 2 ) ) ,
KEY `partizione_b` ( `partition` , `time_id` , `unique_row_count` ) ,
KEY `by_hotdesk` ( `partition` ( 5 ) , `verb` ( 5 ) , `time_id` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1;
INSERT INTO queue_log_b
SELECT *
FROM queue_log
TRUNCATE TABLE queue_log
INSERT INTO queue_log (
SELECT `partition`, `time_id`, `call_id`, `queue`, `agent`,
`verb`, `data1`, `data2`, `data3`, `data4`, `data5`,
`serverid`, MIN(`unique_row_count`)
FROM queue_log_b
GROUP BY `partition`, `time_id`, `call_id`, `queue`,
`agent`, `verb`, `data1`, `data2`, `data3`,
`data4`, `data5`, `serverid`
ORDER BY time_id, MIN(unique_row_count)
)
DROP table queue_log_b;
/var/log/asterisk/queue_log {
weekly
missingok
rotate 10
notifempty
sharedscripts
create 0640 asterisk asterisk
postrotate
/etc/rc.d/init.d/qloaderd restart > /dev/null 2> /dev/null
endscript
}
ALTER TABLE `agaw_alarms` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `agaw_dati` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `agaw_logs` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `agaw_runs` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `agenti_noti` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `arch_classes` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `arch_syslog` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `arch_users` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `broadcast_msg` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `call_status` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `code_possibili` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `dbversion` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `locations` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `oq_calls` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `oq_notes` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `oq_queues` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `pause_codes` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `qa_data` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `qa_forms` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `qa_forms_items` CONVERT TO CHARACTER SET utf8;
&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
<param-value>jdbc:mysql://127.0.0.1/queuemetrics?zeroDateTimeBehavior=convertToNull
&jdbcCompliantTruncation=false&user=queuemetrics&password=javadude
&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8</param-value>
/etc/init.d/mysqld stop
myisamchk -c /var/lib/mysql/queuemetrics/*.MYI
myisamchk -r /var/lib/mysql/queuemetrics/*.MYI
/etc/init.d/mysqld start
ALTER TABLE `call_status` CHARACTER SET utf8;
ALTER TABLE `pause_codes` CHARACTER SET utf8;
....
....&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
my $use_subqueue = 1;
exten => s,8,Queue(queue-service|t|1234||180)
[server] section of your /etc/my.ini file:
interactive_timeout = 2764800
wait_timeout = 2764800
ntpdate ntp.ien.it
We strongly suggest running it daily using a cron job so that you make sure the servers are
consistently time-aligned in the future.
grant all privileges on queuemetrics.* to 'queuemetrics'@'localhost.localdomain' identified by 'password';
jdbc:mysql://localhost/queuemetrics?zeroDateTimeBehavior=convertToNull&user=queuemetrics&password=javadude
grant all privileges on queuemetrics.* to 'queuemetrics'@'localhost.localdomain' identified by 'password';
grant all privileges on queuemetrics.* to 'queuemetrics'@'mydb' identified by 'password';
That is possible - as long as you run only reports that contain 10 agents. If the queue has 15, that is not possible. The only thing you can do is to use an alias to "stick together" multiple agents, but at that point you lose the ability to distinguish between them.
In general, if you have 15 distinct agents (that is, you pay 15 people each month), you should be licensed for all of them; if not you may find that some queries, wallbards or real-time reports block because they are over the limit.
Still, if you are okay on losing details, you may use one agent as "catch-all" by setting its aliases to all the agents you don't want to see. So, for example, if you have a queue that has agents 101, 102, 103 and 104, and you only want to see 101 and 102, you may create another agent called "Other" that aliases to "agent/103|agent/104".
This way you will see in the reports agents "101", "102" and "Other", and they will only be counted as three separate agents. Of course you lose the ability to distinguish between 103 and 104, so YMMV.
See also:
See also:
HTTP Status 404 - /queuemetrics/
-----
type: Status report
message: /queuemetrics/
description: The requested resource (/queuemetrics/) is not available.
-----
Apache Tomcat/5.0.28
xmllint web.xml
yum install libxml2-devel on Red-Hat based
Linux distributions)./usr/local/queuemetrics/tomcat/conf/Catalina/localhost/queuemetrics.xml
and restarting the queuemetrics service.
Servlet.service() for servlet LowayTransactionController threw exception java.lang.OutOfMemoryError
JAVA_OPTS="-Xms256M -Xmx512M"
export JAVA_OPTS
JAVA_OPTS="-server -Xms3072M -Xmx3072M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing"
export JAVA_OPTS
ALTER TABLE `agaw_alarms` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `agaw_dati` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `agaw_logs` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `agaw_runs` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `agenti_noti` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `arch_classes` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `arch_syslog` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `arch_users` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `broadcast_msg` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `call_status` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `code_possibili` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `dbversion` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `locations` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `oq_calls` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `oq_notes` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `oq_queues` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `pause_codes` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `qa_data` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `qa_forms` CONVERT TO CHARACTER SET utf8;
ALTER TABLE `qa_forms_items` CONVERT TO CHARACTER SET utf8;
&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
<param-value>jdbc:mysql://127.0.0.1/queuemetrics?zeroDateTimeBehavior=convertToNull
&jdbcCompliantTruncation=false&user=queuemetrics&password=javadude
&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8</param-value>
cd /usr/local/queuemetrics
rm -f java
ln -s /opt/java/jdk1.6.0b7 java
/usr/local/queuemetrics/tomcat/logs/*.* {
missingok
rotate 5
daily
compress
create 0640 root root
postrotate
/etc/init.d/queuemetrics restart > /dev/null 2> /dev/null
endscript
}
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina_log." suffix=".txt"
timestamp="true"/>
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="localhost_log." suffix=".txt"
timestamp="true"/>
"$CATALINA_BASE"/logs/catalina.out 2>&1
/dev/null 2>&1
/etc/init.d/mysqld stop
myisamchk -c /var/lib/mysql/queuemetrics/*.MYI
myisamchk -r /var/lib/mysql/queuemetrics/*.MYI
/etc/init.d/mysqld start