12.0 Analytics Not Working

I have followed https://github.com/kaltura/platform-install-packages/blob/master/doc/kaltura-packages-faq.md and followed the troubleshooting steps for Analytics problems, the SQl queries are below and I have also run /opt/kaltura/bin/kaltura-run-dwh.sh a couple of times. There are also no ERROR messages in /opt/kaltura/dwh/logs/. However new statistics simply do not show up. Any assistance would be greatly appreciated.

mysql> select * from kalturadw_ds.locks ;
+---------+------------------------------+---------------------+------------+
| lock_id | lock_name                    | lock_time           | lock_state |
+---------+------------------------------+---------------------+------------+
|       1 | daily_lock                   | 2016-09-07 08:59:10 |          0 |
|       2 | retention_lock               | 2016-09-06 12:30:10 |          0 |
|       3 | hourly_emlnx-media1.emcc.edu | 2016-09-07 10:00:11 |          0 |
|       4 | update_dims_lock             | 2016-09-07 10:00:12 |          0 |
+---------+------------------------------+---------------------+------------+
4 rows in set (0.00 sec)

mysql> select * from kalturadw_ds.files where insert_time >='%Y%m%d';
+---------+-----------------------------------------------------------------+-------------+-------------+---------------------+----------+---------------+-------+-----------+--------------+------------+----------+--------------------+--------+
| file_id | file_name                                                       | file_status | prev_status | insert_time         | run_time | transfer_time | lines | err_lines | file_size_kb | process_id | cycle_id | compression_suffix | subdir |
+---------+-----------------------------------------------------------------+-------------+-------------+---------------------+----------+---------------+-------+-----------+--------------+------------+----------+--------------------+--------+
|       1 | emlnx-media1-kaltura_apache_access_ssl.log-20160811-08 | IN_CYCLE    | NULL        | 2016-08-17 08:45:15 | NULL     | NULL          |  NULL |      NULL |           94 |          1 |        1 | gz                 |        |
|       2 | emlnx-media1-kaltura_apache_access_ssl.log-20160811-16 | IN_CYCLE    | NULL        | 2016-08-17 08:45:15 | NULL     | NULL          |  NULL |      NULL |           87 |          1 |        1 | gz                 |        |
|       3 | emlnx-media1-kaltura_apache_access_ssl.log-20160812-03 | IN_CYCLE    | NULL        | 2016-08-17 08:45:15 | NULL     | NULL          |  NULL |      NULL |          233 |          1 |        1 | gz                 |        |
|       4 | emlnx-media1-kaltura_apache_access_ssl.log-20160812-08 | IN_CYCLE    | NULL        | 2016-08-17 08:45:15 | NULL     | NULL          |  NULL |      NULL |           10 |          1 |        1 | gz                 |        |
|       5 | emlnx-media1-kaltura_apache_access_ssl.log-20160812-09 | IN_CYCLE    | NULL        | 2016-08-17 08:45:15 | NULL     | NULL          |  NULL |      NULL |            0 |          1 |        1 | gz                 |        |
|       6 | emlnx-media1-kaltura_apache_access_ssl.log-20160812-10 | IN_CYCLE    | NULL        | 2016-08-17 08:45:15 | NULL     | NULL          |  NULL |      NULL |            3 |          1 |        1 | gz                 |        |
|       7 | emlnx-media1-kaltura_apache_access_ssl.log-20160812-11 | IN_CYCLE    | NULL        | 2016-08-17 08:45:15 | NULL     | NULL          |  NULL |      NULL |           22 |          1 |        1 | gz                 |        |
|       8 | emlnx-media1-kaltura_apache_access_ssl.log-20160814-19 | IN_CYCLE    | NULL        | 2016-08-17 08:45:15 | NULL     | NULL          |  NULL |      NULL |           76 |          1 |        1 | gz                 |        |
|       9 | emlnx-media1-kaltura_apache_access_ssl.log-20160815-03 | IN_CYCLE    | NULL        | 2016-08-17 08:45:15 | NULL     | NULL          |  NULL |      NULL |          118 |          1 |        1 | gz                 |        |
|      10 | emlnx-media1-kaltura_apache_access_ssl.log-20160816-03 | IN_CYCLE    | NULL        | 2016-08-17 08:45:15 | NULL     | NULL          |  NULL |      NULL |          383 |          1 |        1 | gz                 |        |
|      11 | emlnx-media1-kaltura_apache_access_ssl.log-20160816-19 | IN_CYCLE    | NULL        | 2016-08-17 08:45:15 | NULL     | NULL          |  NULL |      NULL |          261 |          1 |        1 | gz                 |        |
|      12 | emlnx-media1-kaltura_apache_access_ssl.log-20160817-03 | IN_CYCLE    | NULL        | 2016-08-17 08:45:15 | NULL     | NULL          |  NULL |      NULL |          132 |          1 |        1 | gz                 |        |
|      13 | emlnx-media1-kaltura_apache_access_ssl.log-20160817-08 | IN_CYCLE    | NULL        | 2016-08-17 08:45:15 | NULL     | NULL          |  NULL |      NULL |           84 |          1 |        1 | gz                 |        |
|      14 | emlnx-media1-kaltura_apache_access_ssl.log-20160818-03 | IN_CYCLE    | NULL        | 2016-08-18 04:00:10 | NULL     | NULL          |  NULL |      NULL |          663 |          1 |        2 | gz                 |        |
|      15 | emlnx-media1-kaltura_apache_access_ssl.log-20160818-10 | IN_CYCLE    | NULL        | 2016-08-18 10:08:32 | NULL     | NULL          |  NULL |      NULL |          231 |          1 |        3 | gz                 |        |
|      16 | emlnx-media1-kaltura_apache_access_ssl.log-20160818-11 | IN_CYCLE    | NULL        | 2016-08-18 11:09:24 | NULL     | NULL          |  NULL |      NULL |           22 |          1 |        4 | gz                 |        |
|      17 | emlnx-media1-kaltura_apache_access_ssl.log-20160818-13 | IN_CYCLE    | NULL        | 2016-08-18 13:42:50 | NULL     | NULL          |  NULL |      NULL |           99 |          1 |        5 | gz                 |        |
|      18 | emlnx-media1-kaltura_apache_access_ssl.log-20160818-14 | IN_CYCLE    | NULL        | 2016-08-18 14:20:49 | NULL     | NULL          |  NULL |      NULL |           26 |          1 |        6 | gz                 |        |
|      19 | emlnx-media1-kaltura_apache_access_ssl.log-20160819-03 | IN_CYCLE    | NULL        | 2016-08-19 04:00:11 | NULL     | NULL          |  NULL |      NULL |          428 |          1 |        7 | gz                 |        |
|      20 | emlnx-media1-kaltura_apache_access_ssl.log-20160820-03 | IN_CYCLE    | NULL        | 2016-08-20 04:00:11 | NULL     | NULL          |  NULL |      NULL |          723 |          1 |        8 | gz                 |        |
|      21 | emlnx-media1-kaltura_apache_access_ssl.log-20160821-03 | IN_CYCLE    | NULL        | 2016-08-21 04:00:13 | NULL     | NULL          |  NULL |      NULL |          697 |          1 |        9 | gz                 |        |
|      22 | emlnx-media1-kaltura_apache_access_ssl.log-20160822-03 | IN_CYCLE    | NULL        | 2016-08-22 04:00:12 | NULL     | NULL          |  NULL |      NULL |          690 |          1 |       10 | gz                 |        |
|      23 | emlnx-media1-kaltura_apache_access_ssl.log-20160823-03 | IN_CYCLE    | NULL        | 2016-08-23 04:00:12 | NULL     | NULL          |  NULL |      NULL |          696 |          1 |       11 | gz                 |        |
|      24 | emlnx-media1-kaltura_apache_access_ssl.log-20160824-03 | IN_CYCLE    | NULL        | 2016-08-24 04:00:10 | NULL     | NULL          |  NULL |      NULL |          694 |          1 |       12 | gz                 |        |
|      25 | emlnx-media1-kaltura_apache_access_ssl.log-20160825-03 | IN_CYCLE    | NULL        | 2016-08-25 04:00:11 | NULL     | NULL          |  NULL |      NULL |          717 |          1 |       13 | gz                 |        |
|      26 | emlnx-media1-kaltura_apache_access_ssl.log-20160826-03 | IN_CYCLE    | NULL        | 2016-08-26 04:00:11 | NULL     | NULL          |  NULL |      NULL |          791 |          1 |       14 | gz                 |        |
|      27 | emlnx-media1-kaltura_apache_access_ssl.log-20160827-03 | IN_CYCLE    | NULL        | 2016-08-27 04:00:13 | NULL     | NULL          |  NULL |      NULL |          696 |          1 |       15 | gz                 |        |
|      28 | emlnx-media1-kaltura_apache_access_ssl.log-20160828-03 | IN_CYCLE    | NULL        | 2016-08-28 04:00:13 | NULL     | NULL          |  NULL |      NULL |          702 |          1 |       16 | gz                 |        |
|      29 | emlnx-media1-kaltura_apache_access_ssl.log-20160829-03 | IN_CYCLE    | NULL        | 2016-08-29 04:00:14 | NULL     | NULL          |  NULL |      NULL |          702 |          1 |       17 | gz                 |        |
|      30 | emlnx-media1-kaltura_apache_access_ssl.log-20160830-03 | IN_CYCLE    | NULL        | 2016-08-30 04:00:11 | NULL     | NULL          |  NULL |      NULL |          702 |          1 |       18 | gz                 |        |
|      31 | emlnx-media1-kaltura_apache_access_ssl.log-20160831-03 | IN_CYCLE    | NULL        | 2016-08-31 04:00:11 | NULL     | NULL          |  NULL |      NULL |          739 |          1 |       19 | gz                 |        |
|      32 | emlnx-media1-kaltura_apache_access_ssl.log-20160901-03 | IN_CYCLE    | NULL        | 2016-09-01 04:00:10 | NULL     | NULL          |  NULL |      NULL |          728 |          1 |       20 | gz                 |        |
|      33 | emlnx-media1-kaltura_apache_access_ssl.log-20160902-03 | IN_CYCLE    | NULL        | 2016-09-02 04:00:12 | NULL     | NULL          |  NULL |      NULL |          728 |          1 |       21 | gz                 |        |
|      34 | emlnx-media1-kaltura_apache_access_ssl.log-20160903-03 | IN_CYCLE    | NULL        | 2016-09-03 04:00:11 | NULL     | NULL          |  NULL |      NULL |          871 |          1 |       22 | gz                 |        |
|      35 | emlnx-media1-kaltura_apache_access_ssl.log-20160904-03 | IN_CYCLE    | NULL        | 2016-09-04 04:00:11 | NULL     | NULL          |  NULL |      NULL |          726 |          1 |       23 | gz                 |        |
|      36 | emlnx-media1-kaltura_apache_access_ssl.log-20160905-03 | IN_CYCLE    | NULL        | 2016-09-05 04:00:11 | NULL     | NULL          |  NULL |      NULL |          693 |          1 |       24 | gz                 |        |
|      37 | emlnx-media1-kaltura_apache_access_ssl.log-20160906-03 | IN_CYCLE    | NULL        | 2016-09-06 04:00:11 | NULL     | NULL          |  NULL |      NULL |          689 |          1 |       25 | gz                 |        |
|      38 | emlnx-media1-kaltura_apache_access_ssl.log-20160906-07 | IN_CYCLE    | NULL        | 2016-09-06 07:18:05 | NULL     | NULL          |  NULL |      NULL |          111 |          1 |       26 | gz                 |        |
|      39 | emlnx-media1-kaltura_apache_access_ssl.log-20160907-03 | IN_CYCLE    | NULL        | 2016-09-07 04:00:11 | NULL     | NULL          |  NULL |      NULL |          582 |          1 |       27 | gz                 |        |
+---------+-----------------------------------------------------------------+-------------+-------------+---------------------+----------+---------------+-------+-----------+--------------+------------+----------+--------------------+--------+
mysql> select * from kalturadw.dwh_fact_events where event_date_id >='%Y%m%d' ;
+---------+----------+---------------+----------------+---------------------+---------------+---------------+--------------------------------------+------------+------------+---------------+-----------+------------+------+---------------+----------+-----------------+----------------+------------+-------------+------------------+------------+------+-----------+-----------+---------------------+------------------+-------------+-------+------------+------------+---------+----------------+
| file_id | event_id | event_type_id | client_version | event_time          | event_date_id | event_hour_id | session_id                           | partner_id | entry_id   | unique_viewer | widget_id | ui_conf_id | uid  | current_point | duration | user_ip         | user_ip_number | country_id | location_id | process_duration | control_id | seek | new_point | domain_id | entry_media_type_id | entry_partner_id | referrer_id | os_id | browser_id | context_id | user_id | application_id |
+---------+----------+---------------+----------------+---------------------+---------------+---------------+--------------------------------------+------------+------------+---------------+-----------+------------+------+---------------+----------+-----------------+----------------+------------+-------------+------------------+------------+------+-----------+-----------+---------------------+------------------+-------------+-------+------------+------------+---------+----------------+
   |      33 |    17590 |             2 | 2.33           | 2016-09-01 14:46:02 |      20160901 |            14 | 1733c3fc-9dcf-ad47-525f-195b42de5126 |        101 | 0_gq4xxmqa |               | _101      |   23448197 |      |             0 |      133 | 192.168.144.170 |     3232272554 |        213 |         213 |                0 | -1         |    0 |        -1 |         1 |                  -1 |               -1 |          11 |     4 |          2 |         -1 |      -1 |              0 |
|      33 |    18990 |             2 | 2.33           | 2016-09-01 16:30:08 |      20160901 |            16 | b6fd0a57-f17f-202e-cb6b-97ad9863fa13 |        101 | 0_gq4xxmqa |               | _101      |   23448197 |      |             0 |      133 | 10.40.4.55      |      170394679 |        213 |         213 |                0 | -1         |    0 |        -1 |         1 |                  -1 |               -1 |           3 |     5 |          2 |         -1 |      -1 |              0 |
|      33 |    19018 |             2 | 2.33           | 2016-09-01 16:30:27 |      20160901 |            16 | 554fac23-a7bd-d3c6-9fad-0b41b20f651c |        101 | 0_gq4xxmqa |               | _101      |   23448197 |      |             0 |      133 | 192.168.146.200 |     3232273096 |        213 |         213 |                0 | -1         |    0 |        -1 |         1 |                  -1 |               -1 |           3 |     3 |          2 |         -1 |      -1 |              0 |
|      33 |    21767 |             2 | 2.33           | 2016-09-01 18:10:26 |      20160901 |            18 | 9c7c9de8-7194-fab4-8191-cb9731f2476c |        101 | 0_gq4xxmqa |               | _101      |   23448197 |      |             0 |      133 | 192.168.148.119 |     3232273527 |        213 |         213 |                0 | -1         |    0 |        -1 |         1 |                  -1 |               -1 |           3 |     1 |          2 |         -1 |      -1 |              0 |
|      33 |    30079 |             2 | 2.33           | 2016-09-01 23:10:45 |      20160901 |            23 | 67fc2214-e533-334f-d520-3e019f93e242 |        101 | 0_c4fa47s0 |               | _101      |   23448197 |      |             0 |     1242 | 72.224.199.242  |     1222690802 |        198 |         198 |                0 | -1         |    0 |        -1 |         1 |                  -1 |               -1 |           4 |     5 |          2 |         -1 |      -1 |              0 |
|      33 |    30087 |             2 | 2.33           | 2016-09-01 23:10:54 |      20160901 |            23 | c087a107-ed3c-d02a-fe1b-fd2043befe40 |        101 | 0_c4fa47s0 |               | _101      |   23448197 |      |             0 |     1242 | 72.224.199.242  |     1222690802 |        198 |         198 |                0 | -1         |    0 |        -1 |         1 |                  -1 |               -1 |           4 |     5 |          2 |         -1 |      -1 |              0 |
|      34 |    32458 |             2 | 2.33           | 2016-09-02 21:48:33 |      20160902 |            21 | c7551fc0-9bf8-5061-a87b-75d6ad1698ba |        101 | 0_c4fa47s0 |               | _101      |   23448197 |      |             0 |     1242 | 67.158.172.129  |     1134472321 |        198 |         198 |                0 | -1         |    0 |        -1 |         1 |                  -1 |               -1 |           4 |     3 |          2 |         -1 |      -1 |              0 |
|      34 |    38714 |             2 | 2.33           | 2016-09-03 01:36:08 |      20160903 |             1 | 1a7082c1-d316-0053-9986-2a19bc2eafc1 |        101 | 0_gq4xxmqa |               | _101      |   23448197 |      |             0 |      133 | 204.79.180.38   |     3427775526 |        198 |         198 |                0 | -1         |    0 |        -1 |         1 |                  -1 |               -1 |           3 |     1 |          5 |         -1 |      -1 |              0 |
|      35 |     2456 |             2 | 2.33           | 2016-09-03 05:07:39 |      20160903 |             5 | f42ba106-a6e8-ba91-9102-02bdda979185 |        101 | 0_c4fa47s0 |               | _101      |   23448197 |      |             0 |     1242 | 204.79.180.146  |     3427775634 |        198 |         198 |                0 | -1         |    0 |        -1 |         1 |                  -1 |               -1 |           2 |     5 |          5 |         -1 |      -1 |              0 |
|      35 |    27804 |             2 | 2.33           | 2016-09-03 20:55:05 |      20160903 |            20 | 353cdcc1-368d-6d6a-6811-2f948e085859 |        101 | 0_gq4xxmqa |               | _101      |   23448197 |      |             0 |      133 | 74.124.133.30   |     1249674526 |         37 |          37 |                0 | -1         |    0 |        -1 |         1 |                  -1 |               -1 |           3 |     4 |          2 |         -1 |      -1 |              0 |
|      36 |    16020 |             2 | 2.33           | 2016-09-04 13:40:06 |      20160904 |            13 | 5616c26d-2654-3311-2a84-86a25b2fb6de |        101 | 0_c4fa47s0 |               | _101      |   23448197 |      |             0 |     1242 | 45.46.1.146     |      757989778 |        198 |         198 |                0 | -1         |    0 |        -1 |         1 |                  -1 |               -1 |           2 |     2 |          4 |         -1 |      -1 |              0 |
|      37 |    10486 |             2 | 2.33           | 2016-09-05 10:13:01 |      20160905 |            10 | 97043514-1b9e-046c-7c4b-2166d412e5aa |        101 | 0_c4fa47s0 |               | _101      |   23448197 |      |             0 |     1242 | 192.168.132.134 |     3232269446 |        213 |         213 |                0 | -1         |    0 |        -1 |         1 |                  -1 |               -1 |           4 |     4 |          2 |         -1 |      -1 |              0 |
|      39 |     5573 |             2 | 2.33           | 2016-09-06 10:55:43 |      20160906 |            10 | d9da51a7-930f-b261-46e2-2feb1956fa33 |        101 | 0_c4fa47s0 |               | _101      |   23448197 |      |             0 |     1242 | 192.168.145.134 |     3232272774 |        213 |         213 |                0 | -1         |    0 |        -1 |         1 |                  -1 |               -1 |           4 |     2 |          4 |         -1 |      -1 |              0 |
|      39 |     5582 |             2 | 2.33           | 2016-09-06 10:55:50 |      20160906 |            10 | 39e555dc-5295-036d-a420-36eb3b08028b |        101 | 0_c4fa47s0 |               | _101      |   23448197 |      |             0 |     1242 | 192.168.145.134 |     3232272774 |        213 |         213 |                0 | -1         |    0 |        -1 |         1 |                  -1 |               -1 |           4 |     2 |          4 |         -1 |      -1 |              0 |
|      39 |    16130 |             2 | 2.33           | 2016-09-06 17:50:01 |      20160906 |            17 | 7c540f7c-5c21-289b-ecd5-383010639b07 |        101 | 0_c4fa47s0 |               | _101      |   23448197 |      |             0 |     1242 | 76.179.135.142  |     1286834062 |        198 |         198 |                0 | -1         |    0 |        -1 |         1 |                  -1 |               -1 |          10 |     5 |          2 |         -1 |      -1 |              0 |
+---------+----------+---------------+----------------+---------------------+---------------+---------------+--------------------------------------+------------+------------+---------------+-----------+------------+------+---------------+----------+-----------------+----------------+------------+-------------+------------------+------------+------+-----------+-----------+---------------------+------------------+-------------+-------+------------+------------+---------+----------------+
171 rows in set, 2 warnings (0.73 sec)

Hi @rpelletier,

It all seems quite in order. Including actual events in kalturadw.dwh_fact_events.
Can you try running the follow script to see what we get back from the API? Perhaps the problem is only in KMC…

<?php
if ($argc < 6){
    echo "\nUsage: ".$argv[0] . ' <partner id> <admin secret> <service url> <start date> <end date>'."\n\n";
    exit (1);
}
require_once('/opt/kaltura/web/content/clientlibs/php5/KalturaClient.php');
$userId = null;
$expiry = null;
$privileges = null;
$partnerId=$argv[1];
$secret = $argv[2];
$type = KalturaSessionType::ADMIN;
$config = new KalturaConfiguration($partnerId);
$config->serviceUrl = $argv[3];
$start_date=$argv[4];
$end_date=$argv[5];
$client = new KalturaClient($config);
$ks = $client->session->start($secret, $userId, $type, $partnerId, $expiry, $privileges);
$client->setKs($ks);
$result = $client->partner->get($partnerId);
$partner_name=$result->name;

$reportTitle = "Usgae for partner $partner_name ($partnerId)";
$reportText = "This shows the partner usage for $start_date - $end_date";
//$headers = 'bandwidth_consumption,average_storage,peak_storage,added_storage,deleted_storage,combined_bandwidth_storage,transcoding_consumption';
$reportType = KalturaReportType::TOP_CONTENT;
$reportInputFilter = new KalturaReportInputFilter();
$reportInputFilter->fromDay = $start_date;
$reportInputFilter->toDay = $end_date;
$dimension = null;
$pager = new KalturaFilterPager();
$order = null;
$objectIds = null;
$result = $client->report->getTable($reportType, $reportInputFilter,$pager, $order,$objectIds);
echo ('"'.$partner_name.'",'.$partnerId.','.$result->data."\n");

Run like so:
# php script.php

start date and end date should be in the format of %Y%m%d.