liveStats API error


I have API logs resulting in 3 Gb a day (uncompressed)

and I see this in the kaltlog, please are somebody familiarized with what can I do to solve it?
thank you very much

/#0 /opt/kaltura/app/api_v3/lib/KalturaBaseService.php(181): KalturaLog::err(‘Kaltura network…’)

/#6 {main}
2015-03-17 10:21:58 [0.000538] [IP] [412960039] [API] [KalturaFrontController->getExceptionObject] ERR: exception ‘KalturaAPIException’ with message ‘The access to service [liveStats->collect] is forbidden’ in /opt/kaltura/app/api_v3/lib/KalturaBaseService.php:117
Stack trace:
/#0 /opt/kaltura/app/api_v3/lib/KalturaActionReflector.php(251): KalturaBaseService->initService(‘liveStats’, ‘liveStats’, ‘collect’)

2015-03-17 10:21:58 [0.000305] [IP] [1341581782] [API] [KalturaActionReflector->initService] DEBUG: Create or retrieve instance of action class [LiveStatsService]
2015-03-17 10:21:58 [0.000275] [IP] [1341581782] [API] [kPermissionManager::isActionPermitted] ERR: exception ‘Exception’ with message ‘Service is not permitted’ in /opt/kaltura/app/infra/log/KalturaLog.php:82
Stack trace:
/#0 /opt/kaltura/app/alpha/apps/kaltura/lib/kPermissionManager.php(801): KalturaLog::err(‘Service is not …’)

/#7 {main}
2015-03-17 10:21:58 [0.000236] [IP] [1341581782] [API] [KalturaBaseService->isPermitted] ERR: exception ‘Exception’ with message ‘Action is not permitted’ in /opt/kaltura/app/infra/log/KalturaLog.php:82
Stack trace:
/#0 /opt/kaltura/app/api_v3/lib/KalturaBaseService.php(172): KalturaLog::err(‘Action is not p…’)

Hi @aquileasfx1,
You can add permissions to services using the add_permission scripts found in /opt/kaltura/app/deployment/updates/scripts/add_permission.

You should add a new file for you to run: php 2015_05_03_roni_add_livestats_service_permissions.php
This file should be:

<?php /** * @package deployment * @subpackage falcon.roles_and_permissions * * Add response-profile service permissions */ $script = realpath(dirname(__FILE__) . '/../../../../') . '/alpha/scripts/utils/permissions/addPermissionsAndItems.php'; $config = realpath(dirname(__FILE__)) . '/../../../permissions/service.liveStats.ini'; passthru("php $script $config"); Than you need to add /../../../permissions/service.liveStats.ini [action_permission_items] permissionItem1.service = liveStats permissionItem1.action = collect permissionItem1.partnerId = 0 permissionItem1.param3 = permissionItem1.param4 = permissionItem1.param5 = permissionItem1.tags = permissionItem1.permissions = ANALYTICS_SEND_DATA, ALWAYS_ALLOWED_ACTIONS, BASE_USER_SESSION_PERMISSION, WIDGET_SESSION_PERMISSION That should do the trick.

I also have this problem.
Is the fix mentioned here also relevant for current Kaltura CE versions?

Btw. when you create the script php 2015_05_03_roni_add_livestats_service_permissions.php do you also have to run it manually from console?

Yes, this is probably something missed in one of the upgrades or on your installation.
Let me know if this fixes this for you.