Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

"Information" -> "Log visualization" shows "NO RESULT"

Problem

I have a running/working OCS server (on Ubuntu 16.04) which already deployed some activated packages to my test-clients. So the basic setup works.

Currently i am wondering why "Information" -> "Log visualization" just shows a "NO RESULT" notification.

I am assuming it should display the content of /var/log/ocsinventory-server/activity.log or what else should be displayed there?

EDIT (as i cant find a comment or reply function)

The solution mentioned by Stéphane is working. As a result i got a table displayed featuring a downloadable .csv log file.

Just for the completness:

This .csv log contains in my case right now 8 lines, 5 of them are empty. the other 4 are covering a time of 6 seconds and do represent access to the webinterface by user, date, time, page and ip.

in OCS Inventory NG server for Unix by (240 points)
edited by

3 Answers

+1 vote

Hi Fpoeck,

for some reason, the log.csv file can not be created by the v. 2.31 OCS server...

To solve this problem, in the file : /usr/share/ocsinventory-reports/ocsreports/require/function_commun.php

Add doubles slashs at the beginning of these lines :

//if (is_writable(LOG_FILE)){

and

//}

Result :

 /********************************END SQL FUNCTION************************************/

 function addLog( $type, $value="",$lbl_sql='') {
         //global $logHandler;
         if ($_SESSION['OCS']['LOG_GUI'] == 1){

                 //if (is_writable(LOG_FILE)){
                         $logHandler = fopen( LOG_FILE, "a");
                         $dte = getDate();
                         $date = sprintf("%02d/%02d/%04d %02d:%02d:%02d", $dte["mday"], $dte["mon"], $dte["year"], $dte["hours"], $dte["minutes"], $dte["seconds"]);
                         if ($lbl_sql != ''){
                                 $value=$lbl_sql.' => '.$value;
                         }
                         $towite=$_SESSION['OCS']["loggeduser"].";".$date.";".DB_NAME.";".$type.";".$value.";".$_SERVER['REMOTE_ADDR'].";\n";
                         fwrite($logHandler,$towite);
                         fclose($logHandler);
                 //}
         }

Regards, Stéphane

by (32.6k points)
edited by
0 votes
Hi,
I have those line with double slash and, I continue seeing NO RESULT there....

there is some solution alternative? THX
by (650 points)
0 votes
I had the same problem. And also have the double slasches as Steph suggested.
Apache restart has been done, but still NO RESULT.

Anybody has a good pics about it, how should it be look? :)

Thanks!
by (320 points)
 
Powered by Question2Answer
...