Skip to content

Reminders#

In this article we will look at how to configure alerts in GLPI.

An "alert" in GLPI is the combination of four concepts:

  • A Saved search
  • An alert configured for this search
  • An automatic action to trigger the alert
  • A Notification

Case study to illustrate the concept

I want to be alerted when the number of Tickets with the New status exceeds 4

Adapt the following method to your context (other examples: alert if the number of computers with the status "In stock" is less than 10, or alert if at least one server-type computer has less than 90% free disk space).

First, we need to save the search on which we want to place an alert.

  • In the menu Assistance > Tickets (in our case)
  • Enter the search parameters in the search engine
  • Start the search!

Alt text

  • The search result is displayed

Alt text

To save your search, click on the icon in the search engine.

Alt text

  • Give your search a name
  • Define its visibility (private in this case)
  • The Count field defines whether you want the number of results to appear in a tooltip
  • Choose the entity and the recursivity
  • Click on add

The search is now saved.

View saved searches#

You can view your searches via the Lists icon at the top right of your interface:

Alt text

The sliding banner will give you a list of your saved searches:

Alt text

Now just click on your search to display the results.

  • Go to Tools > Saved searches
  • Choose the saved search on which you wish to place an alert
  • In the Saved search alerts tab
  • Click on Add an alert.

Alt text

Here you need to :

  • Name this alert
  • Choose the operator and value that will trigger the alert (strictly greater than 4 in our case)
  • Make this alert active
  • Click on add

Alt text

Our alert is configured.

Automatic action to trigger the alert#

The principle is simple:

  • You have configured a search linked to an alert.
  • In this alert, you have defined a threshold that triggers the alert (in our example above, the alert is triggered if the number of Tickets in New status is strictly greater than 4).

An automatic action will therefore be run regularly to trigger these alerts; this is called savedsearchesalerts:

  • Go to setup > Automatic actions.
  • Click on savedsearchesalerts.
  • Configure it according to your needs:

Alt text

Warning

As this automatic action is global to your entire platform, we strongly recommend that you configure the execution frequency to be as low as possible in order to cover as many alerts as possible.

Notification (by email)#

The final step is to set up a notification that will be sent if the defined threshold is exceeded.

There are two possible scenarios:

  • Alert on a saved search Personal
  • Alert on a saved search Public

If the alert comes from a saved "Personal" (non-public) search, you will only need to create a single notification that will group together all your alerts. You will be the only recipient, so there is no need to multiply the number of emails.

If the alert comes from a search that has been saved as "Public", you will need to create a new notification. Personal notification :

  • In the menu setup > Notifications > Notifications
  • Choose the Saved searches notification
  • Change it to Activated
  • Click on Save

Alt text

  • On the Gabarits tab, you can specify whether you want an email notification and the notification template and/or an Ajax notification and the notification template.
  • In the Recipients tab, it will only be possible to add Users.

Public Notification:

  • The first step is to create the event that will be associated with the notification for this alert
  • Go to Tools > Saved Searches Choose the saved search on which you want to create the event.
  • Choose the saved search on which you want to be notified.

If the search is in public mode, go to the Search alerts tab and GLPI will ask you to create this event:

Alt text

  • You will then need to click on the create now button.

Next, create the notification:

  • setup > Notifications > Notifications
  • Add a new notification
  • Add a name
  • Active : Yes
  • Type : Saved search alert
  • Event : choose the search desired
  • Click on save

Alt text

  • In the "Templates" tab, you can specify whether you want an email notification and the notification template and/or an Ajax notification and the notification template.
  • Finally, in the Recipients tab, you will need to add the desired recipients.

References#

GLPI documentation "Notifications"


Last update: 13/06/2023