Even though the documentation gives two arguments "zabbix_trigger_draw_style" and "zabbix_trigger_color", the code only uses static values and doesn't recognize them when given as arguments.
ISSUE TYPE
Feature Idea
COMPONENT NAME
Module zabbix_map
ADDITIONAL INFORMATION
When describing the graph, you can add arguments to the created links. For example :
You're also supposed to be able to decide the style and color of the link, should the trigger activate, using "zabbix_trigger_draw_style" and "zabbix_trigger_color". However, the code does not take this into account and does not actually offer this possibility (see community.zabbix/plugins/modules/zabbix_map.py) :
def _get_triggers(self, data):
triggers = []
for trigger_definition in [remove_quotes(value) for key, value in data.items() if key.startswith("zbx_trigger")]:
triggerid = self._get_trigger_id(trigger_definition)
if triggerid:
triggers.append({
"triggerid": triggerid,
"color": self._get_color_hex(remove_quotes(data.get("zbx_trigger_color", "red"))),
"drawtype": self._get_link_draw_style_id(remove_quotes(data.get("zbx_trigger_draw_style", "bold"))),
})
else:
self._module.fail_json(msg="Failed to find trigger '%s'" % (trigger_definition))
return triggers
This does not verify the presence of the arguments, and even worse, recognizes them as possible triggers.
Additionnaly, it is unclear how you're supposed to differenciate between two triggers if you want them to have different colors.
SUMMARY
Even though the documentation gives two arguments "zabbix_trigger_draw_style" and "zabbix_trigger_color", the code only uses static values and doesn't recognize them when given as arguments.
ISSUE TYPE
COMPONENT NAME
Module zabbix_map
ADDITIONAL INFORMATION
When describing the graph, you can add arguments to the created links. For example :
You're also supposed to be able to decide the style and color of the link, should the trigger activate, using "zabbix_trigger_draw_style" and "zabbix_trigger_color". However, the code does not take this into account and does not actually offer this possibility (see community.zabbix/plugins/modules/zabbix_map.py) :
Normally you would add the arguments like this :
This does not verify the presence of the arguments, and even worse, recognizes them as possible triggers. Additionnaly, it is unclear how you're supposed to differenciate between two triggers if you want them to have different colors.