07.06.2023

Actions and operations in Zabbix

Another one of the features of Zabbix is its ability to perform automated actions and operations based on predefined triggers. In this article, we will discuss how to configure and use actions and operations in Zabbix.

Actions in Zabbix

Actions are a set of predefined steps that are triggered automatically when a certain event occurs. These actions can be used to perform a wide range of tasks, such as sending notifications, executing scripts, and restarting services.

There are several types of actions that you can use to automate tasks. Here are some common types of actions and how to use them:

Creating actions

To create an action in Zabbix, follow these steps:

Click on "Configuration" in the main menu, and then click on the desired type of action under "Actions".

Click on the "Create action" button to create a new action.

Enter a name for the action and select the trigger that will activate the action.

Under the "Operations" tab, you can define the actions that will be performed when the trigger is activated. You can add multiple operations to a single action.

Operations in Zabbix

Operations in Zabbix are individual tasks that are performed as part of an action. The list of available operations depends on the chosen type of action.

Some of the tasks are:

And the ones available for discovery actions:

Adding operations

Click on the "Operations". Choose the type of operation you want to add, “Operations” works on the trigger, “Recovery operations” reacts to problems resolving, and Update operations activate on problems being updated by other users.

Choose the type of operation you want to create.

Enter the required details for the operation. For example, if you are creating a "Send message" operation, you will need to enter the recipient's email address and the message text.

As you add more operations they will get the step numbers, you can determine the time it takes for Zabbix to go from step 1 to step 2, etc, and how many times those steps are repeated.

Also you can add conditions for those operations to work, like acknowledgment of the problem, and such.

Save the operation.

Conclusion

We looked into configuring and using actions and operations in Zabbix that can help you automate a wide range of tasks, from sending notifications to executing scripts.

You may be also interested in