No data in Statistics pages

From Kolmisoft Wiki
Jump to navigationJump to search

This applies since MOR X7.

Run following commands to fix it:

service elasticsearch restart

Wait about one minute for Elastiscearh to start and then run command

elasticsearch resync


ES (ElasticSearch) is a tool that we use to show statistics in MOR.
ES Sync Status shows how accurate is ES data compared to MySQL data.
ES periodically fetches data from MySQL.
Since this action is not in real time, some miss match is possible when you have active calls.
This miss match should be only noticeable when checking newest calls.
Eventually all calls should be synchronized between ES and MySQL. Small percentage miss match is normal.

If not all calls are synchronized

Check ElasticSearch count:

elasticsearch count
[root@CentOS-68-64-minimal ~]# elasticsearch count
{
 "count" : 956528,
 "_shards" : {
   "total" : 5,
   "successful" : 5,
   "failed" : 0
 }

Then check how many calls are in database. ElasticSearch count and value from database should me almost the same:

mysql> select count(*) from calls;
+----------+
| count(*) |
+----------+
|  1056672 |
+----------+

If for some reason there is a mismatch, run:

curl -XPUT localhost:9200/_cluster/settings -d '{ "transient" : { "threadpool.bulk.queue_size" : 100 } }'
elasticsearch resync

Possible reason of mismatch: https://stackoverflow.com/questions/20683440/elasticsearch-gives-error-about-queue-size