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 2019-12-06 21:46:22

jp10558
Member
Registered: 2006-10-09
Posts: 101

GLPI log rotation / cleanup in the database

There are at least three ways to clean old logs, and I’m having a hard time finding documentation to guide which one we use.  All three are disabled currently:

Setup -> General -> Logs purge

Setup -> Automatic Actions -> circularlogs
    "Archives log files and deletes aging ones"

Setup -> Automatic Actions -> logs
    “Clean old logs”
Which is the best one to use?

Offline

#2 2021-03-04 21:06:07

eduardomozart
Member
Registered: 2020-10-13
Posts: 7

Re: GLPI log rotation / cleanup in the database

From my tests, the Automatic action "circularlog" rotates the files at "<GLPI_ROOT>\files\_log" folder.

Offline

#3 2023-07-13 10:06:12

Thanawut
Member
Registered: 2023-07-13
Posts: 4

Re: GLPI log rotation / cleanup in the database

This function use for clean Event log in historical page of Asset ?

Offline

#4 2023-07-13 12:15:05

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

Re: GLPI log rotation / cleanup in the database

Setup -> General -> Logs purge


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

#5 2023-07-15 06:04:54

Thanawut
Member
Registered: 2023-07-13
Posts: 4

Re: GLPI log rotation / cleanup in the database

Yesterday ,I'm setting Log purge to 6 month. But now log on 2022 still remaining  . Can I check that process is operated.  Thanks.

Offline

#6 2023-07-15 13:22:10

WebGreg
Member
Registered: 2020-02-27
Posts: 728

Re: GLPI log rotation / cleanup in the database

Hi


Task logs started to clear only after running this...
front/crontask.form.php?id=7


2023-07-10 I noticed that in automatic tasks I still have logs from last year. I ran this task (it was disabled and below the result)
Date                            Total duration            Number    Description
2023-07-10 17:16    1,261.500 seconds       2644712    Action completed, fully processed

There doesn't seem to be a single task to clean all logs identified as old. Different tasks can be responsible for different sections. Other places determine which logs are old (without clearing them). But I can be wrong. Here @cconard96 is the expert.

Last edited by WebGreg (2023-07-15 13:30:57)


--
GLPI 10.0.7
GLPI-Inventory 1.2.1
Ubuntu Server 20.04 LTS

Offline

#7 2023-07-17 02:59:46

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

Re: GLPI log rotation / cleanup in the database

Summary of the log-related automatic actions:
1. circularlogs - Periodically rename the file-based GLPI logs (files/_log) by the current date. This keeps the individual file sizes low, makes it easier to find logs for a specific date, and makes automatically cleaning old log entries easier.
2. logs - Deals with the administration log (Administration > Log) which contains data like logins and some generic item was added/updated info. Deletes entries older than X days (configurable by the value inside the automatic action form). Also deals with logs for automatic actions themselves.
3. purgelogs - Delete historical log entries based on the criteria set in Setup > General > Logs Purge.


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