Hi,
I want to create a Discovery rule key, Zabbix trapper type, where the key has the hostname as a "parameter" then I would want the item prototypes for that discovery rule that will also be type zabbix trapper get hostname and data (another piece of info), till will then generate a set of item Zabbix trapper type with two parameters.
Does it make sense?
So I am trying to send from the remote host (using the sender or not, doesn't matter but either way the key type will be trapper) some information, I would like not to have to create the items under each required hosts in Zabbix front end manually for each server/host but rather have a template (or similar) that using a discovery rule generates the items automatically on all required hosts.
The issue I see with implementing something like this using Zabbix trapper is that the discovery key needs to be unique to each host entry in Zabbix right? if not how does the sender know what key to populate the data on? so I was looking for a way to use some default macro in the discovery rule key for the hostname of the host
Template:
Discovery rule:
Key: DiscoveryRuleKey[{HOST.NAME}]
BUT when I go to the host where this should create the discovery with a key containing the hostname the Macro is not "parsed" ... so doesn't work...
I have thought about a few ways around
have the discovery rules be a zabbix agent, use userparameter and get the data for the remote host using passive checks where the remote server (zabbix agent) sends the necessary information to create the items type trapper with hostname and another parameter using item prototypes
another option I have been using lately is to have a script on zabbix server backend get info from zabbix server API a list of host, then using the API create on those hosts the discovery rules with the required information (hostname) as zabbix trapper, then at that point the discovery rule key will be able to parse watever the remote host send to zabbix as there are individual keys for each discovery rule key.
first question. is it not possible to have a discovery rule key use the {host.name} macro or any other macro that takes the name of the host where that discovery rule is "running from"?
second any suggestion on how to implement what I am trying to implement?
Thanks.
\M
I want to create a Discovery rule key, Zabbix trapper type, where the key has the hostname as a "parameter" then I would want the item prototypes for that discovery rule that will also be type zabbix trapper get hostname and data (another piece of info), till will then generate a set of item Zabbix trapper type with two parameters.
Does it make sense?
So I am trying to send from the remote host (using the sender or not, doesn't matter but either way the key type will be trapper) some information, I would like not to have to create the items under each required hosts in Zabbix front end manually for each server/host but rather have a template (or similar) that using a discovery rule generates the items automatically on all required hosts.
The issue I see with implementing something like this using Zabbix trapper is that the discovery key needs to be unique to each host entry in Zabbix right? if not how does the sender know what key to populate the data on? so I was looking for a way to use some default macro in the discovery rule key for the hostname of the host
Template:
Discovery rule:
Key: DiscoveryRuleKey[{HOST.NAME}]
BUT when I go to the host where this should create the discovery with a key containing the hostname the Macro is not "parsed" ... so doesn't work...
I have thought about a few ways around
have the discovery rules be a zabbix agent, use userparameter and get the data for the remote host using passive checks where the remote server (zabbix agent) sends the necessary information to create the items type trapper with hostname and another parameter using item prototypes
another option I have been using lately is to have a script on zabbix server backend get info from zabbix server API a list of host, then using the API create on those hosts the discovery rules with the required information (hostname) as zabbix trapper, then at that point the discovery rule key will be able to parse watever the remote host send to zabbix as there are individual keys for each discovery rule key.
first question. is it not possible to have a discovery rule key use the {host.name} macro or any other macro that takes the name of the host where that discovery rule is "running from"?
second any suggestion on how to implement what I am trying to implement?
Thanks.
\M
Comment