[ZBXNEXT-1191] define user macros on Host Group level Created: 2012 Apr 19  Updated: 2022 Jun 14

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F), Server (S)
Affects Version/s: 2.0.0
Fix Version/s: None

Type: New Feature Request Priority: Minor
Reporter: Simon Kowallik Assignee: Alexei Vladishev
Resolution: Unresolved Votes: 40
Labels: hostgroup, macros, usermacros
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Zabbix server v2.0.0rc3 (revision 26929) (22 March 2012)


Issue Links:
Duplicate
is duplicated by ZBXNEXT-2127 Host groups level macros Closed
is duplicated by ZBXNEXT-3380 Hostgroup variables (like SNMP commun... Closed
is duplicated by ZBXNEXT-3246 Add hostgroup macros Closed

 Description   

{$MACROS} are available globally, per Host and per Template. Why not adding it for per Host Group too?



 Comments   
Comment by Denis Kot [ 2013 Jun 14 ]

+1 for this feature. I have to deploy environments for different customers, each env has about 100 servers and we have Host Group per Customer in Zabbix.
It would be really helpful if I can define macros per Host Group (per customer).

Comment by Brian Gallew [ 2013 Sep 10 ]

I would want HOST->HOSTGROUP->TEMPLATE, but "configurable" is probably the correct way to set it up.

Comment by Brian Gallew [ 2013 Sep 10 ]

For dealing with hostgroup collision (e.g. two hostgroups supply a user macro

{#FOO}

), this could be handled with any kind of sort, with the "first" item winning. It would probably be nicer if user macros (or the host groups themselves) could be assigned priorities as well as values, in which case sorting on the priority would be natural and perhaps easier for the user to plan for in light of mandated naming schemes.

Comment by Gareth Brown [ 2014 Jan 27 ]

bump. We have a need to set different thresholds based on environment and location, so as a result, we have to create inheritable templates that simply have the purpose of holding macros and no new items

Comment by Benjamin Gronvall [ 2014 Jun 26 ]

Host group level macros which follow the HOST->HOSTGROUP->TEMPLATE chain of command would greatly help manage the adjustment of thresholds and other values.

Comment by David Peterson [ 2014 Aug 26 ]

This would be a huge feature for us to since we are managing over 40 different clients of ours. Is this even being considered to be added or not?

Comment by Marc [ 2014 Aug 26 ]

Maybe you can "team up with other users to commonly sponsor implementation" of this feature.
Just wanna point out that this option exists, since it was not obvious to everybody in the past.

Comment by Frank Wall [ 2015 Oct 07 ]

I just wanted to create user macros inside my host groups and then discovered this feature request. Would love to see this implemented in one of the next major releases!

Comment by richlv [ 2016 Aug 14 ]

how should this work when a host is a member of several groups ?

Comment by Victor-Philipp Busch [ 2016 Aug 14 ]

Let us build our own hierarchy of groups (f.e. with a integer):
1. Global
2. Template
=> Group 1...1001...n
5. Host (we can correct all conflicts here)

Comment by Tony den Haan [ 2017 Oct 26 ]

Would be quite useful for me, having ansible pull host info from zabbix.
richlv: i'd imagine host macro would overrule group one

Comment by Roman Rajniak [ 2018 Sep 21 ]

Setting macros using Hostgroups? Good idea and also with: Theese macros also should set level of insertion in hierarchy Global, , Template, , Host , - to replace prev. level of stored macro value (Set/Replace macro in level).

Comment by Frank Wall [ 2019 Oct 01 ]

how should this work when a host is a member of several groups ?

Maybe by introducing a new "primary" group for hosts. Macros in this group would take precedence.
Macros in all other groups would be processed in alphanumerical order, the last match would win.

FWIW, I wouldn't really need a primary group, the "last macro wins" solution would also be OK for me.

Generated at Thu Apr 25 01:36:59 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.