I'm trying to set up a logstash-> zabbix gateway, that collects inputs from multiple servers running filebeat.
I gather that zabbix_host is a mandatory field.
It also seems like it would be set to the ACTUAL generating host, not the one running the logstash server. So that zabbix can fire off alerts about the actual relevant host.
How can I do this?
After much searching, I stumbled across a reference to using
zabbix_host => "%{source_host}"
but apparently that isnt valid either.
What can I do here? Kinda in shock that I cant seem to find any working examples of this.
Is this for the zabbix output plugin? We don't use that plugin, but we use both ELK and Zabbix. I suspect zabbix_host would be the case sensitive host name as defined to zabbix. The agent.hostname might work, depending if it is FQDN and if you used that in Zabbix.
I think the syntax would be "%{[agent][hostname]}".
Hmm... "%{[agent][hostname]}" sounds potentially useful.
I was also thinking maybe [@metadata][host] ?
Is there any listof all the predefined @metadata or [agent] type variables somewhere?
I've had no luck finding those either
These fields are being renamed for ECS "common schema".... A noble goal but a clear violation of "if it's not broke don't fix it".
I just thought there were noting that these fields are aliased in the template for used in Elasticsearch, I think you only see one in the document when it hits logstash.
Hit some major weirdness.
I used that very useful ruby debug output thing.
determine that the metadata is very small. ONLY actually has:
type
beat
ip_address
the ONE thing that is now stopping me from having a fully working zabbix output, is
[2020-01-08T11:20:17,173][WARN ][logstash.outputs.zabbix ][main] Field referenced by filebeat.XXXX is missing
[2020-01-08T11:20:17,431][WARN ][logstash.outputs.zabbix ][main] Zabbix server at x.x.x.x rejected all items sent. {:zabbix_host=>"xxxxxxx"}
Is this saying that I cant just do
zabbix_key => "filebeat.XXXX"
I have to do another stupid indirect reference for [@metadata][zabbix_key] or something??
What kind of whackjob plugin is this??
:-/
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.