DWH Analytics issue

My Analitics have stopped working, the locks are all on 0, everything seems fine. There’s one thing i don’t understand, in the situation where i have a cluster and all the apache logs are on the front node, but the dwh mysql and sphinx are on a separate server, how are the apache access logs going to be read by the dwh process, i have the symlink created

[root@node1 logrotate.d]# pwd
[root@node1 logrotate.d]# ll
total 28
-rw-rw-r–. 1 root root 135 Jan 17 2016 ConsoleKit
-rw-r–r--. 1 root root 139 Jul 24 2015 dracut
-rw-r–r--. 1 root root 185 Feb 4 2016 httpd
-rw-r–r--. 1 root root 172 Jul 23 2015 iscsiuiolog
lrwxrwxrwx. 1 root root 56 Nov 28 03:26 kaltura_apache -> /opt/kaltura/app/configurations/logrotate/kaltura_apache
lrwxrwxrwx. 1 root root 53 Jul 14 2016 kaltura_api -> /opt/kaltura/app/configurations/logrotate/kaltura_api
lrwxrwxrwx. 1 root root 54 Nov 28 03:26 kaltura_apps -> /opt/kaltura/app/configurations/logrotate/kaltura_apps
lrwxrwxrwx. 1 root root 54 Jul 14 2016 kaltura_base -> /opt/kaltura/app/configurations/logrotate/kaltura_base
-rw-r–r--. 1 root root 210 Dec 10 2014 syslog
-rw-r–r--. 1 root root 188 May 11 2016 vsftpd
-rw-r–r--. 1 root root 87 Jul 24 2015 yum

But again as i said i don’t undestand how the apache logs are going to get processed. And that’s why my analystics are not working i presume.

Hi @razvan_iacob,

Look at /opt/kaltura/app/configurations/logrotate/kaltura_apache

/opt/kaltura/log/kaltura_apache_access.log {
 rotate 5
 mv /opt/kaltura/log/kaltura_apache_access.log-`/bin/date +%Y%m%d`.gz /opt/kaltura/web/logs/`hostname`-kaltura_apache_access.log-`/bin/date +%Y%m%d-%H`.gz
 service apache2 reload
 su root kaltura

This line:

mv /opt/kaltura/log/kaltura_apache_access.log-`/bin/date +%Y%m%d`.gz /opt/kaltura/web/logs/`hostname`-kaltura_apache_access.log-`/bin/date +%Y%m%d-%H`.gz

Moves the access logs per node onto the NFS under /opt/kaltura/web/logs/ which should be mounted on the DWH node, the DWH node, knows where to find them because of /opt/kaltura/dwh/.kettle/kettle.properties:

EventsLogsDir = /opt/kaltura/web/logs
EventsWildcard = .*kaltura.*_access.*.log-.*


Maybe this can help you. We serve all our content through a nginx CDN/Frontend. I had a timing problem with the frontend logrotate script because it was compressing the logs AFTER Kaltura was looking for the files.

I changed compress for nodelaycompres and problem solved. This is my modified frontend script:

/var/log/nginx/*.log {
rotate 52
create 640 nginx adm
[ -f /var/run/nginx.pid ] && kill -USR1 cat /var/run/nginx.pid
mv /var/log/nginx/kaltura_apache_access.log-/bin/date +%Y%m%d.gz /media/MediaFS/kaltura/web/logs/hostname-kaltura_apache_access.log-/bin/date +%Y%m%d-%H.gz
chmod a+rw /media/MediaFS/kaltura/web/logs/hostname-kaltura_apache_access.log-/bin/date +%Y%m%d-%H.gz
mv /var/log/nginx/hdvideo_access.log-/bin/date +%Y%m%d.gz /media/KalturaFS/web/logs/hostname-kaltura_apache_access.log-/bin/date +%Y%m%d-%H.gz
chmod a+rw /media/KalturaFS/web/logs/hostname-kaltura_apache_access.log-/bin/date +%Y%m%d-%H.gz



Thank you @Jess, @David.Eusse,
I haven’t worked on that yet because I had a lot of work in other areas, will try both your solutions soon and let you know how everything went.
Again thank you very much for the prompt responses.

Jacob R.

Hello Jess,
So I’ve checked the etl user and password that’s in kettle.proprieties, i was able to connect to the mysql.
On the NFS /opt/kaltura/web/log i have the .gz apache logs from the front node. So everything look fine so far, what should i check further ?

Edit1: The etl logs retention/update/hourly/daily have absolutely no errors.
Edit2: When i do mysql> SELECT * FROM dwh_fact_events order by event_time DESC; the last entry is from 2017-1-27. meaninig today, this means the data is getting populated into the db.
Edit3: tail -f /var/log/cron on the dwh node:

Jan 27 08:00:01 mysql CROND[12992]: (root) CMD (root /opt/kaltura/dwh/etlsource/execute/etl_hourly.sh -p /opt/kaltura/dwh -k /opt/kaltura/pentaho/pdi/kitchen.sh)
Jan 27 08:00:01 mysql CROND[12991]: (root) CMD (root /opt/kaltura/dwh/etlsource/execute/etl_update_dims.sh -p /opt/kaltura/dwh -k /opt/kaltura/pentaho/pdi/kitchen.sh)
Jan 27 08:00:01 mysql CROND[12993]: (kaltura) CMD (/opt/kaltura/dwh/etlsource/execute/etl_update_dims.sh -p /opt/kaltura/dwh -k /opt/kaltura/pentaho/pdi/kitchen.sh)
Jan 27 08:00:01 mysql CROND[12994]: (kaltura) CMD (/opt/kaltura/dwh/etlsource/execute/etl_hourly.sh -p /opt/kaltura/dwh -k /opt/kaltura/pentaho/pdi/kitchen.sh)
Jan 27 08:01:01 mysql CROND[14475]: (root) CMD (run-parts /etc/cron.hourly)
Jan 27 08:01:01 mysql run-parts(/etc/cron.hourly)[14475]: starting 0anacron
Jan 27 08:01:01 mysql run-parts(/etc/cron.hourly)[14484]: finished 0anacron

Jacob R