Installing QueueMetrics On Amazon EC2

If you’re running an Asterisk based PBX or if you’re planning to use WebAgent Navigator in your call center, I highly recommend using QueueMetrics as a management tool. It’s inexpensive, very powerful, and easy to use.

QueueMetrics is a highly scalable monitoring and reporting suite that addresses the needs of thousands of contact centers worldwide and offers a broad range of integrated benefits.

WebAgent Navigator is fully integrated with QueueMetrics Call Center Management Software so you can monitor agent productivity, measure targets and conversion rates, and view campaign statistics with a simple easy to use interface.

Kudos and gratitude to Lorenzo and Iacob at Loway for creating a great product and for their guidance and support with installing and integrating WebAgent and QueueMetrics.

My first attempt at installing QueueMetrics was to try the installation on the same EC2 instance that I have running for WebAgent Navigator. Unfortunately, that instance is running Ubuntu and is lacking some of the dependencies required for QueueMetrics. I contacted Iacob for support and he informed me that QueueMetrics will indeed run on Ubuntu, it just takes a bit more work to get it there.

With that in mind, I decided to create another EC2 instance running CentOS where QueueMetrics will be more at home with less work getting it running. So I logged in to the Amazon EC2 Dashboard and under “Create Instance”, I clicked the “Launch Instance” button.

This process is fairly simple. You can see the screen shots below (click to enlarge). The steps I took are…

  1. Search for “CentOS” and from the results screen, click “nnn results in AWS Marketplace

  2. Find “CentOS 7 (x86_64) - with Updates HVM” and click “Select”

  3. Review the CentOS 7 AMI and click “Continue”

  4. Select the instance type (t2.micro) and click “Review and Launch”

  5. Review instance and launch - I kept it simple with all of the default settings and clicked “Launch”.

  6. When asked to select an existing key pair or create a new key pair. I used the same key pair created for the Bitnami web server running WebAgent. You can create a new key pair. If you do, make sure you download the key file because you only get one chance.

  7. Click “Launch Instance” and… CentOS 7 is running.

 

Since I already have the key file downloaded into my “~/.ssh” directory, I create a small terminal command script (I named it “QueueMetrics_ssh.command”):

ssh -i ~/.ssh/keypair.pem centos@ec2-x-xxx-xx-xx.compute-1.amazonaws.com

“keypair.pem” is the key file downloaded from AWS. (you did that, right?)
”centos” is the default ssh user name for this instance.
”ec2-x-xxx-xx-xx.compute-1.amazonaws.com” is the Public DNS name for this instance.

Running this command opens the terminal app. The first time I connect to the server with ssh, I get this message:

The authenticity of host 'ec2-xxx-xx-xx-xxx.compute-1.amazonaws.com (xxx.xx.xx.xxx)' can't be established.
ECDSA key fingerprint is SHA256:zc7DXTq...uL6jg.
Are you sure you want to continue connecting (yes/no)? 

Type “yes” [enter] and terminal will remember this host.

Now we can install QueueMetrics following these simple instructions…

First, download the repo…

sudo wget -P /etc/yum.repos.d http://yum.loway.ch/loway.repo

 -bash: wget: command not found

Whoops, we have to install wget first.

sudo yum install wget

Total download size: 547 k
Installed size: 2.0 M
Is this ok [y/d/N]: y
...

Importing GPG key 0xF4A80EB5:
 Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
 Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 Package    : centos-release-7-6.1810.2.el7.centos.x86_64 (installed)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Is this ok [y/N]: y
...

Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : wget-1.14-18.el7_6.1.x86_64           1/1 
  Verifying  : wget-1.14-18.el7_6.1.x86_64           1/1 
Installed:
  wget.x86_64 0:1.14-18.el7_6.1
  
Complete!

Now download the repo…

sudo wget -P /etc/yum.repos.d http://yum.loway.ch/loway.repo

Resolving yum.loway.ch (yum.loway.ch)... 159.65.32.205
Connecting to yum.loway.ch (yum.loway.ch)|159.65.32.205|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 347 [application/octet-stream]
Saving to: ‘/etc/yum.repos.d/loway.repo’

Then run the installer…

sudo yum install queuemetrics

...

Transaction Summary
======================
Install  1 Package  (+108 Dependent packages)
Upgrade             (   1 Dependent package)

Total download size: 113 M
Is this ok [y/d/N]: y

...

Installing : queuemetrics-19.10.3-17.noarch
Stopping qm-tomcat6 (via systemctl):  [  OK  ]
Stopping Tomcat8: OK
Stopping Tomcat8: OK
Starting qm-tomcat6 (via systemctl):  [  OK  ]
Stopping AGAW:  OK
.
-----------------------------------------------------------
- !!! QUEUEMETRICS INSTALLED SUCCESSFULLY !!! -
===========================================================

Point your browser to:

. http://thismachine:8080/queuemetrics

and login as user demoadmin / password demo.
...

Complete!

Now we can open QueueMetrics using the Public DNS name of our CentOS EC2 instance…
http://ec2-xxx-xx-xx-xxx.compute-1.amazonaws.com:8080/queuemetrics
and login with “demoadmin”, password “demo”

But it won’t work because of the default security group I used when creating the CentOS EC2 instance.

So, back to the AWS console, select the CentOS security group and edit the inbound rules adding a rule that allows inbound access on port 8080…

Now open http://ec2-xxx-xx-xx-xxx.compute-1.amazonaws.com:8080/queuemetrics in a browser window and we get a database error. This is a good thing. I don’t want the database on the CentOS server, I want it on my Bitnami/WebAgent server.

To do this, I had to edit the web.xml file in the /usr/local/queuemetrics/webapps/queuemetrics-19.10.3-17/WEB-INF directory. This is the tag I’m looking for…

<web-app>
    ...
    <servlet>
        ...
        <init-param>
            <param-name>JDBC_URL</param-name>
            <param-value>jdbc:mariadb://127.0.0.1/queuemetrics?user=queuemetrics&amp;password=<password>&amp;sessionVariables=sql_mode=''&amp;autoReconnect=true</param-value>
        </init-param>

and all I needed to change was the IP address from “127.0.0.1” (local IP) to the Public DNS name of my Bitnami/WebAgent server…

<param-value>jdbc:mariadb://ec2-x-xxx-xx-xxx.compute-1.amazonaws.com
/queuemetrics?user=queuemetrics&amp;password=<password>&amp;sessionVariables=sql_mode=''&amp;autoReconnect=true</param-value>

And now we’re good to go because I already have a QueueMetrics database on the WebAgent server. If, however, you’re new to QueueMetrics, you can follow the “CREATE QUEUEMETRICS DATABASE NOW” path. The default values should work for MySQL root user and password. Once done, you can log into QueueMetrics using user name “demoadmin” and password “demo” — you’ll want to change this once logged in… From the Home screen, under Settings, click Users and you’ll see several demo/example users pre-loaded. Change these as you will.

Lastly, I added a DNS “A” record pointing to the IP address of the CentOS server:

HOST        TTL     TYPE    IP  
qm          86400   IN  A   <your CentOS IP address>

So I can access QueueMetrics at qm.webagentnavigator:8080/queuemetrics

Of course, there’s a lot more to QueueMetrics than just getting it installed. WebAgent Navigator manages much of the data needed and used by QueueMetrics. WebAgent will automatically add Agents, Locations, Queues, Queue Groups, DNIS numbers, Outcomes, Features, and Tags. It will also log all call events that are received through WebAgent and all agent activity. If you’re using an Asterisk based PBX, you’ll want to install and configure the QueueMetrics unloader that will load the Asterisk queue_log into QueueMetrics.

But what QueueMetrics does as a management tool and how you can take advantage of it won’t be covered here. A good place to start is at the QueueMetrics web site and with the QueueMetrics manuals.