[ZBX-5874] Run a remote command on a trigger with multiple items on different hosts Created: 2012 Nov 20  Updated: 2017 May 30  Resolved: 2015 Mar 04

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 2.0.2
Fix Version/s: None

Type: Incident report Priority: Major
Reporter: Leonardo Bargagni Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: actions, remotecommands
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Zabbix server


Issue Links:
Duplicate
is duplicated by ZBX-9352 Remote command failed when there're m... Closed

 Description   

I've a problem configuring an action on a trigger with multiple items on different hosts.
If I try to send a message, I receive the email without problem but if I try to run a remote command, I receive the following error:

Too many hosts in a trigger expression



 Comments   
Comment by Alexei Vladishev [ 2012 Nov 21 ]

Where do you see this error?

Comment by Leonardo Bargagni [ 2012 Nov 21 ]

On Monitoring - Events - Event details
On the right (command action):

Step: 1
Time:
2012.Nov.21 16:39:04 not sent Command:
/Tivoli/wpostemsg -m "" hostname="n0611801" zab_item_name="ASPI Processo APDERSA" zab_item_value="0" zab_trigger_comment="" zab_trigger_id="24457" zab_trigger_name="SAP - APDERSA - process er.sapAPD_ERS02 is not running on n0611801/2/7/8" zab_trigger_severity="High" zab_trigger_status="PROBLEM" zab_trigger_url="APDERSA" component="APDERSA" Zabbix ZABBIX

Too many hosts in a trigger expression

Comment by Alexei Vladishev [ 2012 Nov 22 ]

How the command is defined? What macros does it use?

Comment by Leonardo Bargagni [ 2012 Nov 22 ]

Each trigger that snaps, run a remote command (wpostemsg with parameters) to send the alarm on a console for ced operators.
The command works properly if the trigger item refers to a single server.
If we check if a process is running on at least one server of two, when the trigger fires, Zabbix returns the error (Too many hosts in a trigger expression)

Comment by Leonardo Bargagni [ 2014 Sep 29 ]

The problem is also present on the 2.4 version.
Is there any news?

Comment by Xavier Qu [ 2015 Mar 01 ]

I have the same problem.
I created a trigger where trigger expression contains different hosts. And I want to zabbix server execute some script (with contains macros like

{HOST.NAME1}

{HOST.NAME2}

) when the trigger fires.
It works when expression contains only one host(even multiply items), but I get "Too many hosts in a trigger expression" when different hosts.
The items are in active mode.
Zabbix server v2.2.6 (revision 48483) (27 August 2014)

Can anyone tell me if I misuse the function or it's zabbix's bug?

Comment by Alexander Vladishev [ 2015 Mar 04 ]

It will be fixed under ZBX-9352.

Generated at Tue Jun 17 07:20:57 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.