1. Why zabbix is the preferred monitoring system for call centers?
- Zabbix is an enterprise-class open source solution that provides distributed system monitoring and network monitoring based on a web interface.
- Zabbix monitors various network parameters to ensure the secure operation of the server system; and provides a flexible notification mechanism to allow system administrators to quickly locate/solve various problems.
- Zabbix consists of 2 parts, zabbix server and optional component zabbix agent.
- The zabbix server can provide remote server/network status monitoring, data collection and other functions through SNMP, zabbix agent, ping, port monitoring, etc. It can run on Linux, Solaris, HP-UX, AIX, Free BSD, Open BSD, On platforms such as OS X.
Suggest an edit
- Zabbix is a popular monitoring tool under linux. It can use zabbix to monitor the performance of call center performance, which is more conducive to understanding the operation of call center system. This article takes the popular astercc call center system as an example to introduce how to configure zabbix to monitor astercc system. The number of incoming calls, the amount of outgoing calls, the number of outgoing calls, the number of outgoing calls, the amount of calls, the total number of agents, the number of agents checked in, the number of agents, the number of calls, the number of agents, and the number of seats suspended (small breaks) , lunch break, leave, meeting, training, other), queuing, etc…

2. Download and install zabbix server
setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config

systemctl stop firewalld.service
systemctl disable firewalld.service
yum install -y epel-release 0

yum -y install wget net-snmp-devel OpenIPMI-devel httpd openssl-devel java lrzsz fping-devel libcurl-devel perl-DBI pcre-devel libxml2 libxml2-devel mysql-devel gcc php php-bcmath php-gd php-xml php-mbstring php-ldap php-mysql.x86_64 php-pear php-xmlrpc net-tools wget vim-enhanced
wget -P /etc/yum.repos.d http://mirrors.aliyun.com/repo/Centos-7.repo
yum -y install mariadb mariadb-server php php-mysql httpd
systemctl enable mariadb.service
systemctl start mariadb.service
mysql_secure_installation

systemctl start httpd.service
rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm

yum -y install zabbix-server-mysql
yum -y install zabbix-web-mysql
yum -y install zabbix-get
mysql -uroot -proot -e "create database zabbix default character set utf8 collate utf8_bin;"
mysql -uroot -proot -e "grant all on zabbix.* to 'zabbix'@'%' identified by 'zabbix';"
cd /usr/share/doc/zabbix-server-mysql-3.0.21/
zcat create.sql.gz | mysql -uzabbix -p zabbix
vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
vim /etc/httpd/conf.d/zabbix.conf
#Change the time zone to Asia/Shanghai

systemctl start zabbix-server.service
systemctl enable zabbix-server.service
systemctl restart httpd.service

Page configuration
http://localhost/zabbix #localhost is zabbix server ip address







Username : Admin
Password : zabbix

3. Download and install the zabbix client
3.1 zabbix server monitor localhost
yum -y install zabbix zabbix-agent

In the installation, if the above error occurs, the reason is that the two versions of the software are inconsistent. Observe carefully that these two packages use different warehouses, close and reinstall the epel.
vim /etc/yum.repos.d/epel.repo
enabled=0


vim /etc/zabbix/zabbix_agentd.conf
Server=127.0.0.1
ServerActive=127.0.0.1
Hostname=127.0.0.1
Timeout=30
UnsafeUserParameters=1
zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
systemctl start zabbix-agent
3.2 astercc server installation configuration zabbix agent

yum install -y zabbix-agent
cd /etc/zabbix/
mv zabbix_agent.conf zabbix_agent.conf.bak
mv zabbix_agentd.conf zabbix_agentd.conf.bak
vim zabbix_agentd.conf
/etc/init.d/zabbix-agent start

vim /etc/sysconfig/iptables #open 10050/tcp


Add an agent host on the zabbix server


#192.168.1.194 is the astercc agent IP
Agent adds custom key-values
vim /etc/zabbix/zabbix_agentd.conf

cat > /home/Realtime_report.sh << EOF
#!/bin/bash
USER=root #mysql user
PASSWORD=astercc #mysql password
INBOUNDCOUNT=`mysql -u$USER -p$PASSWORD astercc10 -e "select count(*) from cc10_curpbxcdrs where endtime='0000-00-00 00:00:00' and calltype='DIALIN' and memo != 'PREDICTIVE CALLER';" 2>/dev/null|awk 'NR==2{print $1}'`
OUTBOUNDCOUNT=`mysql -u$USER -p$PASSWORD astercc10 -e "select count(*) from cc10_curpbxcdrs where endtime='0000-00-00 00:00:00' and (userfield='DID DIALOUT' or calltype='DIALOUT') and answertime='0000-00-00 00:00:00';" 2>/dev/null|awk 'NR==2{print $1}'`
OUTBOUNDRINGING=`mysql -u$USER -p$PASSWORD astercc10 -e "select count(*) from cc10_curpbxcdrs where endtime='0000-00-00 00:00:00' and (userfield='DID DIALOUT' or calltype='DIALOUT') and answertime='0000-00-00 00:00:00';" 2>/dev/null|awk 'NR==2{print $1}'`
OUTBOUNDANSWER=`mysql -u$USER -p$PASSWORD astercc10 -e "select count(*) from cc10_curpbxcdrs where endtime='0000-00-00 00:00:00' and (userfield='DID DIALOUT' or calltype='DIALOUT') and answertime!='0000-00-00 00:00:00';" 2>/dev/null|awk 'NR==2{print $1}'`
TRAFFICCOUNT=`mysql -u$USER -p$PASSWORD astercc10 -e "select count(*) from cc10_curpbxcdrs where endtime='0000-00-00 00:00:00' and memo != 'PREDICTIVE CALLER';" 2>/dev/null|awk 'NR==2{print $1}'`
AGENTCOUNT=`mysql -u$USER -p$PASSWORD astercc10 -e "select count(*) from cc10_agents;" 2>/dev/null|awk 'NR==2{print $1}'`
AGENTCHECKLOGIN=`mysql -u$USER -p$PASSWORD astercc10 -e "select count(*) from cc10_curagents;" 2>/dev/null|awk 'NR==2{print $1}'`
AGENTCALL=`mysql -u$USER -p$PASSWORD astercc10 -e "select count(*) from cc10_curagents where status='ringing' and status='busy';" 2>/dev/null|awk 'NR==2{print $1}'`
AGENTOUTBOUND=`mysql -u$USER -p$PASSWORD astercc10 -e "select count(*) from cc10_curpbxcdrs where endtime='0000-00-00 00:00:00' and (userfield='DID DIALOUT' or calltype='DIALOUT') and agentno!='';" 2>/dev/null|awk 'NR==2{print $1}'`
AGENTINBOUND=`mysql -u$USER -p$PASSWORD astercc10 -e "select count(*) from cc10_curpbxcdrs where endtime='0000-00-00 00:00:00' and calltype='DIALIN' and memo !='PREDICTIVE CALLER' and agentno!='';" 2>/dev/null|awk 'NR==2{print $1}'`
AGENTACW=`mysql -u$USER -p$PASSWORD astercc10 -e "select count(*) from cc10_curagents where status='pause' and acw_status!='';" 2>/dev/null|awk 'NR==2{print $1}'`
AGENTPAUSE=`mysql -u$USER -p$PASSWORD astercc10 -e "select count(*) from cc10_curagents where status='pause' and acw_status='';" 2>/dev/null|awk 'NR==2{print $1}'`
AGENTREST=`mysql -u$USER -p$PASSWORD astercc10 -e "select count(*) from cc10_curagents where status='pause' and acw_status='' and pause_reason='rest';" 2>/dev/null|awk 'NR==2{print $1}'`
AGENTLUNCH=`mysql -u$USER -p$PASSWORD astercc10 -e "select count(*) from cc10_curagents where status='pause' and acw_status='' and pause_reason='lunch';" 2>/dev/null|awk 'NR==2{print $1}'`
LEAVE=`mysql -u$USER -p$PASSWORD astercc10 -e "select count(*) from cc10_curagents where status='pause' and acw_status='' and pause_reason='leave';" 2>/dev/null|awk 'NR==2{print $1}'`
MEETING=`mysql -u$USER -p$PASSWORD astercc10 -e "select count(*) from cc10_curagents where status='pause' and acw_status='' and pause_reason='meeting';" 2>/dev/null|awk 'NR==2{print $1}'`
TRAINING=`mysql -u$USER -p$PASSWORD astercc10 -e "select count(*) from cc10_curagents where status='pause' and acw_status='' and pause_reason='training';" 2>/dev/null|awk 'NR==2{print $1}'`
OTHER=`mysql -u$USER -p$PASSWORD astercc10 -e "select count(*) from cc10_curagents where status='pause' and acw_status='' and pause_reason='other';" 2>/dev/null|awk 'NR==2{print $1}'`
WAIT=`mysql -u$USER -p$PASSWORD astercc10 -e "select count(*) from cc10_curqueuecallers where status='wait';" 2>/dev/null|awk 'NR==2{print $1}'`
#channels
CHANNELS=`asterisk -rx 'core show channels count' 2>/dev/null|awk 'NR==3{print $1}'`
#calls
CALLS=`asterisk -rx 'core show calls' 2>/dev/null|awk 'NR==2{print $1}'`
if [ $1 = 'INBOUNDCOUNT' ]
then
echo $INBOUNDCOUNT
elif [ $1 = 'OUTBOUNDCOUNT' ]
then
echo $OUTBOUNDCOUNT
elif [ $1 = 'OUTBOUNDRINGING' ]
then
echo $OUTBOUNDRINGING
elif [ $1 = 'OUTBOUNDANSWER' ]
then
echo $OUTBOUNDANSWER
elif [ $1 = 'TRAFFICCOUNT' ]
then
echo $TRAFFICCOUNT
elif [ $1 = 'AGENTCOUNT' ]
then
echo $AGENTCOUNT
elif [ $1 = 'AGENTCHECKLOGIN' ]
then
echo $AGENTCHECKLOGIN
elif [ $1 = 'AGENTCALL' ]
then
echo $AGENTCALL
elif [ $1 = 'AGENTOUTBOUND' ]
then
echo $AGENTOUTBOUND
elif [ $1 = 'AGENTINBOUND' ]
then
echo $AGENTINBOUND
elif [ $1 = 'AGENTACW' ]
then
echo $AGENTACW
elif [ $1 = 'AGENTPAUSE' ]
then
echo $AGENTPAUSE
elif [ $1 = 'AGENTREST' ]
then
echo $AGENTREST
elif [ $1 = 'AGENTLUNCH' ]
then
echo $AGENTLUNCH
elif [ $1 = 'LEAVE' ]
then
echo $LEAVE
elif [ $1 = 'MEETING' ]
then
echo $MEETING
elif [ $1 = 'TRAINING' ]
then
echo $TRAINING
elif [ $1 = 'OTHER' ]
then
echo $OTHER
elif [ $1 = 'WAIT' ]
then
echo $WAIT
elif [ $1 = 'CHANNELS' ]
then
echo $CHANNELS
elif [ $1 = 'CALLS' ]
then
echo $CALLS
else
echo "Incorrect input variable"
fi
EOF
cat > /home/Realtime_report_system.sh << EOF
#!/bin/bash
CPUFREE=`vmstat |awk 'NR==3{print $15}'`
CPULOAD1=`uptime|awk '{print $10}'|awk -F ',' '{print $1}'`
CPULOAD5=`uptime|awk '{print $11}'|awk -F ',' '{print $1}'`
CPULOAD15=`uptime|awk '{print $12}'|awk -F ',' '{print $1}'`
DISKUSAGERATE=`df |grep -e '\/dev\/sda5'|awk '{print $5}'|awk -F '%' '{print $1}'`
MEMALL=`free |grep "Mem"|awk '{print $2}'`
MENUSE=`free |grep "Mem"|awk '{print $3}'`
MEMUSAGERATE=`awk 'BEGIN{printf "%.1f\n",('$MENUSE'/'$MEMALL')*100}'`
if [ $1 = 'CPUFREE' ]
then
echo $CPUFREE
elif [ $1 = 'CPULOAD1' ]
then
echo $CPULOAD1
elif [ $1 = 'CPULOAD5' ]
then
echo $CPULOAD5
elif [ $1 = 'CPULOAD15' ]
then
echo $CPULOAD15
elif [ $1 = 'DISKUSAGERATE' ]
then
echo $DISKUSAGERATE
elif [ $1 = 'MEMUSAGERATE' ]
then
echo $MEMUSAGERATE
else
echo "Incorrect input variable"
fi
EOF
Zabbix server test key
zabbix_get -s 192.168.1.194 -k "astercc.info[AGENTCOUNT]"

Return value “5”, that is, the number of seats is 5 key values are successfully created.
Add monitoring items




All key values that need to be monitored can be replaced by astercc.info[*] in Realtime_report.sh.
/etc/init.d/zabbix-agent restart

Green light indicates that astercc has been monitored

