Since I started to use zabbix I am missing a feature to dynamically set items in templates.
#. We have a template for a service like Redis server - it is ok, but what if we will use more than one instance? We would need to clone this template for each additional redis instance.
#. We have multiple servers with different partition layout. On some servers we have only one root partition ( /) which we want to monitor but on some others we have for example root partition( /), database partition(/mnt/database), and on some other we have additional parititon for log (/var/log). In all different cases we would need separate templates to configure it all.
#. In my particular case we have also occured to have multiple TCP ports to be monitored if they are working properly or missing. Our customers may want to define a new one (additional) so for each additional set of ports I would need multiple templates to use. Right this could be done with standard LLD and we could discover ports either from netstat or from configuration (this would be impossible in this case).
I want to limit to minimum zabbix agent modifications (additional scripts, userparameters modification etc).
I have managed to find a solution for that problem. It is by using Low Level Discovery and specific MACROs layout. This required from me to extend MACRO length in database and frontend limitations in some cases, but I guess that more people may want to use this as a built-in feature. How it works is described on attached graph.
We have a Macro in a format (I have used all available special characters I guess)
We are having autodiscovery key named:
. Zabbix agent uses a bash script to build up the response and response is in given format:
So the format generally looks like:
We can add multiple parameters by concatenating them with plus sign like:
It is still LLD. Trigger dependencies are hard, and items are discovered with given frequency. If it would be built in zabbix it could be generated automatically by server (without need zabbix-agent to respond to this query).
I would like you to think about this as a new feature. I am not sure how it could be build into zabbix, don't want to suggest anything, because my way of thinking about it may be wrong. Do you have any suggestions, propositions or comments for this feature? It gives a lot of flexibility for Zabbix.
Please ask if something is unclear.