GLPI automatic actions: how to find what is slow, stuck or running for nothing

Cron Health, a free NexTool module, analyses the automatic actions of GLPI and its plugins, points out oversized frequencies, piled-up queues and disabled cleanups, and suggests adjustments that you apply with one click and can undo.

In this article7 sections

Almost nobody reviews GLPI's automatic actions after installation, and that is where the late notification, the recurring ticket that does not open and the silently growing email queue come from. Cron Health, a free NexTool module, shows what is oversized, slow, stuck or failing and suggests the adjustment, which you apply with one click and can undo.

The problem

GLPI has dozens of automatic actions: sending notifications, the mail collector, SLA and OLA escalation, recurring tickets, log cleanups, and each plugin adds its own. They keep the installation values and nobody looks at them again. Over time four symptoms appear:

  • Actions running for nothing. OLA escalation runs every 5 minutes in an environment with no escalation level; the reservations one runs with no reservable item. Each run takes up a cron slot.
  • Competition for cron slots. The system cron runs only a few actions at a time (5 by default). When there are more 1-minute actions than slots, they start taking turns, and one slow action holds up the whole run. In one of our environments, sending notifications with a slow mail server reached 552 seconds in a single run.
  • Piled-up queues. The email queue or the webhook queue grows because the destination fails, and nobody notices until the user complains that they received nothing.
  • Wrong retention. The execution history of some actions is kept forever, while the item history may be set to delete too early what the audit needs.

To find the cause, you have to open action by action in Setup > Automatic actions and read the execution logs. Nobody does that often.

How Cron Health works

Once a day the module scans all automatic actions and execution logs, compares each one with a curated GLPI catalogue and shows the findings in the Diagnostics tab, grouped and with filters by severity, source and action.

Cron Health Diagnostics tab in GLPI with filters and grouped findings, each with a suggestion, Apply and Ignore
The Diagnostics tab: search, filters and each finding with what was seen, the suggested value, Apply and Ignore
  • Oversized frequency and actions with no work: an action running at an interval shorter than recommended, or one that runs without ever processing anything. Zero volume alone is not enough: the module only reports it when there is proof that no work exists (for example, no escalation level configured).
  • Slow, stuck and failing: average or maximum duration above the limit, an action running for longer than GLPI itself considers normal, and the latest runs ending with an error.
  • Queues and system cron: emails or webhooks waiting to be sent above the limit and the system cron stopped.
  • Cleanups and retention: technical logs between 30 and 90 days and the item history with a minimum per group: 60 months for access and security, 36 for item changes and 12 for inventory. “Delete all” is never suggested.

So that the screen does not become a wall of text, each finding shows only what was seen. The reason and the source, in GLPI's own code, are behind the “?” next to it.

Tooltip of a finding: the recurring tickets action runs with no active recurrence, with the source in the GLPI code
The reason for each finding is behind the “?”, with the source in the GLPI code

Apply, undo and ignore

Nothing changes in GLPI without your click. Apply asks for confirmation, and changes to retention periods ask for a second one, because records older than the new period are deleted in the next cleanup and do not come back.

Confirmation before applying a retention reduction from 300 to 90 days, with the impact warning and the second confirmation
Retention change: the warning about what will be deleted and the second confirmation
  • Through GLPI methods: the adjustment appears in the history of the action or of the configuration, with your user.
  • Safe undo: restores the previous value, but only if nobody changed it afterwards. For retention, it restores the period, not the records already deleted.
  • In bulk or one by one: suggestions of the same type can be applied together; the ones you do not want to follow are ignored with a reason and can be reopened.
  • Unlock: a stuck action can be released, only when it has passed the period GLPI itself uses to consider it blocked.

At the end of Diagnostics is the list of all automatic actions, with source, state, mode, runs, errors, duration and total time spent, sorted by what weighs most on the cron. The findings button on each row shows only the findings of that action.

List of all GLPI automatic actions with source, state, mode, frequency, runs, errors and duration
All automatic actions, sorted by the time spent in the cron

When an action fails several times in a row, Cron Health sends a bell alert through Smart Notify to whoever looks after the environment, and closes the alert when it runs well again.

How to enable it

  1. Install NexTool in your GLPI (10, 11 or 12)
  2. Go to Setup > NexTool > Modules and enable Cron Health
  3. In Settings, choose whether you want the bell alert and adjust the analysis window and the limits
  4. In NexTool's permission matrix, grant by profile who sees the diagnostics, who applies the adjustments and who receives the alerts
  5. In the Diagnostics tab, use Scan now the first time
Cron Health settings in GLPI: module active, bell alert, analysis window and limits
The settings fit on one screen, with the explanation of each field behind the “?”

Tip: first check that the system cron calls GLPI's cron.php every minute. It is what runs the actions in CLI mode and the module's scan. In a container, see how to keep the cron running in the GLPI 11 on Docker guide.

Who it is for

For those who manage a GLPI with a high volume of tickets, several plugins or a slow mail server, and have already seen a late notification, an SLA that does not escalate on time or a recurring ticket that did not open. Also for those who need to justify log and history retention periods: the module shows the period of each one and points out what is outside the range.

Compatibility

  • GLPI: 10, 11 and 12
  • Plan: free
  • Plugin: NexTool 6.60 or higher

Next step

See the details on the Cron Health page. The module is part of NexTool, an ecosystem of modules to extend GLPI without code customisation. Talk to the team for a demonstration.


Reviewed by the NexTool Solutions team. The screenshots are from the real GLPI environment with the NexTool plugin. GLPI is a registered trademark of Teclib'. NexTool is not affiliated with Teclib'.

Advertising

Comments

Comments on this post come from GitHub (giscus). When you load them, your browser connects to GitHub, which receives your IP address and may set its own cookies.

To load them automatically, enable functional cookies

Need help?