R
R
Romich7772016-04-11 16:03:39
linux
Romich777, 2016-04-11 16:03:39

How to automate the creation of actions in Zabbix or set up sending messages from triggers?

You need to create a template for monitoring typical web server events (load, response time, service availability).
Triggers, Items, Web monitoring - can be saved to a template. But Actions have to be created manually for each server, which does not sit down quickly.
Is there a way to send messages without manually creating an action, or to automate their creation?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Pavel Selivanov, 2016-04-11
@selivanov_pavel

You can create an Action that will work for a specific group of hosts. Include web servers in the group. Action will be used only for them, it will not be used for other hosts.
Z.Y. And why does each host have its own separate Action? There are usually notifications. Some strange user-case.
Actions are set globally, as a reaction to triggers / discovery / auto-registration. The default zabbix installation already has one action, send a notification to everyone if { TRIGGER.STATUS } is not 'OK'. Fires for all triggers. You can configure some other actions with narrower conditions: a specific trigger, or a trigger on a specific group of hosts, and much more. The operations for an action can be sending notifications or executing commands on a remote host.
https://www.zabbix.com/documentation/2.4/manual/co...
I advise you to poke the mouse in Configuration -> Actions, everything is clear there

R
Romich777, 2016-04-11
@Romich777

This is probably due to my misunderstanding of the logic of working with the system: there are data sources, a trigger is configured for their changes, and an action is set for the trigger to fire. But everything is tied one-to-one.
I would be very grateful if you tell me how to work with groups. This is very similar to what I need.

V
viiy, 2016-04-12
@viiy

One to one is a waste.
The standard scheme is as follows:
1) Create a Host group by server affinity, for example "Web", "Mail", "File".
2) Create templates with Items, Triggers, Graphs
3) Associate templates with hostgroups
4) Just add hosts to the desired hostgroups, they will automatically be assigned all the checks from the template that was in the hostgroup.
That is, the schema should be:
( Items, Triggers -> Templates -> Hostgoups ) <- Hosts
By Action.
Most often (almost always) used for notifications
One Action must correspond to one type of notification, say "by email"
In the Action in the conditions field, do not specify anything in the hosts field,
You can create another Action type, for example via sms.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question