You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2022-06-17 12:41:44

zelo
Member
Registered: 2022-06-17
Posts: 1

Send GLPI Logs to STDOUT

Hello!

Is there any solution to send the GLPI log's (event, cron, php-errors) to the stdout/stderr instead of the files?
I run the GLPI in Docker and would like to send out the logs to the stdout, so i can monitor it with an another application outside of the container.

Thanks,
Z

Offline

#2 2022-06-17 18:12:00

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,813
Website

Re: Send GLPI Logs to STDOUT

A generic solution for this is to just create the log files you want to monitor as symlinks of stdout and/or stderr like:
RUN ln -sf /dev/stderr /var/www/html/glpi/files/_log/php-errors.log \
    && ln -sf /dev/stderr /var/www/html/glpi/files/_log/sql-errors.log
This would remove the existing logs and replace them with links. You may want to backup the existing logs before creating the links.

Additionally, if you want to monitor individual features/services of GLPI instead of just raw errors, you may want to look into using the built-in status monitoring feature.
https://glpi-user-documentation.readthe … tatus.html

Last edited by cconard96 (2022-06-17 18:12:18)


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

Board footer

Powered by FluxBB