Datos show_audit.ftl

cancel
Showing results for 
Search instead for 
Did you mean: 
roger_obis
Member II

Datos show_audit.ftl

Buenos dias,
Encontré la manera de auditar las descargas como READ, y tengo toda la información que necesito, pero no puedo hacer estadísticas. 
Me gustaría saber donde almacena los datos que muestra esta presentación.
Buscando por la base de datos encontré algunos registros en alf_node, pero no salen todos.
En tomcat/logs/localhost(+date) también encontré algún registro pero no la información requerida.

Instalé el modulo A.A.A.R en Alfresco 4.2.e, muy eficaz, pero no es lo que estoy buscando en concreto.

Toda ayuda es bien recibida y apreciada, muchas gracias por vuestro tiempo.
7 Replies
fcorti
Alfresco Employee

Re: Datos show_audit.ftl

Hola,

Lo siento, pero yo no hablo español. :-)

Si yo entiendo que busca todo tipo de auditoría READ en el repositorio.

Si es así, te puedo ayudar fácilmente a formular preguntas sobre AAAR y ayudarle a realizar su informe personalizado con Pentaho (luego publicarlo en Alfresco).

De lo contrario, justificar la intrusión.
roger_obis
Member II

Re: Datos show_audit.ftl

Gracias por la ayuda, lo que me interesaría saber es donde guarda la información que aparece en el show_audit.ftl, para poder hacer un .php que presente los datos, y poder así hacer una auditoria concreta.

Thanks for your help, I only want to know, where are the information that appears in show_audit.ftl, because I want to make a .php file that show only the entries I want.

I like AAAR, U are doing a great great job.
fcorti
Alfresco Employee

Re: Datos show_audit.ftl

Thank Roger for talking in english and for your feedback on the AAAR solution. :-)

AAAR and show_audit get data from an Alfresco's webscript, very easy to parse and enquiry.
You can find lot of useful informations here:
<a href="https://wiki.alfresco.com/wiki/Content_Auditing">https://wiki.alfresco.com/wiki/Content_Auditing</a>
<a href="https://wiki.alfresco.com/wiki/Auditing_(from_V3.4)">https://wiki.alfresco.com/wiki/Auditing_(from_V3.4)</a>

With the AAAR solution I use the JSON as result of the REST call to the webscript… exactly in the way you are probably looking for.
So, if you call from your PHP page the webscript, you will get a JSON result containing the audit data that you can manipulate, store, enquiry and so on… ;-)

I hope this will help you.
roger_obis
Member II

Re: Datos show_audit.ftl

Gracias por tu ayuda, intentare de esta forma haber si puedo hacer lo que pretendo.

Thanks for your help, im going to try it, if u want i can send u my .php when i finish it.
Good luck and really really thanks.
fcorti
Alfresco Employee

Re: Datos show_audit.ftl

Good… if you think my check will help you, send me the PHP to fcorti at gmail dot com and I'll tell you an opinion comparing on what I usually do for AAAR.

Have a nice day.

:-)
roger_obis
Member II

Re: Datos show_audit.ftl

He estado intentando conseguir los datos por el webscript, pero no lo encuentro muy eficiente programarlo así, lo perfecto sería saber donde guarda exactamente los datos, entiendo que solo puede haber 2 lugares, en la base de datos o en sistema de ficheros. Si fuese por base de datos haría una simple consulta para saber los registros, o si esta en disco duro, leer el fichero sea xml,csv,txt,dat…. y filtrar segun requisitos.
Alguien sabe donde puedo encontrar estos registros?

I try to do it with the webscript, but i have a lot of problems. The best solution is to know where are the entries, in the database or in a file(xml,txt,dat,csv…) and make a connection/read with php.
Anyone know where are the entries?
roger_obis
Member II

Re: Datos show_audit.ftl

Al final use el webscript para realizar lo que queria.
Aviso: al descargar marca el registro como "READ"
Por si a alguien le sirve:

-Primero habilitamos el audit.
-Para confirmar que audita lo que queremos podemos usar el webscript, por ejemplo usar esta sentencia: http://localhost:8080/alfresco/service/api/audit/query/alfresco-access?&verbose=true&limit=1000
-Una vez tenemos los datos que queremos podemos habilitar el audit para todo usuario, no es obligatorio, para ello deberemos modificar los xml que se encuentran en: \Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\templates\webscripts\org\alfresco\repository\audit\
Veremos que hay una linea que dice: "authentication" "admin" "/authentication", cambiar por "authentication runas="admin"" none "/authentication"
-Una vez hemos editado la autorización, ya no nos pedirá usuario cada vez que queramos ver el contenido.
- A partir de aquí cada uno debe decidir si quiere o no mejorar la presentación, si se desea modificar directamente sobre el webscript, se debe modificar el archivo query.get.json.ftl. Si se desea hacer un php, podemos importar el contenido del webscript llamandolo:
<?php
$variable = readfile("http://localhost:8080/alfresco/service/api/audit/query/alfresco-access?&verbose=true&limit=1000");
echo $variable;
?>

Espero que les sirva.
Un agradecimiento a fcorti por su ayuda y su gran modulo A.A.A.R, lo recomiendo.