-
Incident report
-
Resolution: Won't fix
-
Major
-
None
-
2.0.1
Scenario:
- need to create template for monitoring NAMED pool of applications (may be IIS app-pool, db instance, etc.) - one host have more than one pool, but all of these should have same values monitored - one creates template with items and keys using user defined macro for pool name distinction: - name: item1[${POOL1}], key:item1[${POOL1}] - name: item2[${POOL1}], key:item2[${POOL1}] - name: item3[${POOL1}], key:item3[${POOL1}] - name: item1[${POOL2}], key:item1[${POOL2}] - name: item2[${POOL2}], key:item2[${POOL2}] - name: item3[${POOL2}], key:item3[${POOL2}] ...
- host has ${POOL1},... macros defined giving the POOL names as values, and the template assigned to it
To this point everything works fine. The items and keys are listed in host list with macros substituted with app-pool names.
Unfortunately populating these keys with zabbix_sender does not work. With zabbix_sender correct values and item keys with app pool names are beeing send - this works fine, checked with manually entered keys.
It seems that macros are not ready to be used in item names/keys, and are not visible for zabbix_server.
Drilling down to zabbix db reveals that these items are stored with macros variables, that are not substituted with correct values. I've ended that way with two sets of items that had same item name/key but different itemid. This show also that other methods of inserting values with item name/key, and not itemid, will fail.
I think that either the way that such items are stored should be changed, or use of user macros in item names/keys should be prohibited. Also documentation should be updated - now it does not state anything about this behaviour.