1. Describe your incident:
I’m trying to work with modular configurations for my filebeat sidecars. For example I want to include an nginx related filestream only, when the sidecar has the “nginx” tag set. For that I have configured the nginx tag in my sidecar.conf:
tags:
- linux
- nginx
… added the tag in the Graylog UI and used it as following in the sidecar configuration:
Hello a tried something similar and this is not working
In “Collector Configuration”, in one conf I added “test” in “Configuration Assignment Tags”
and in “Configuraton” I added this :
<#if sidecar.tags.test??>
# test
</#if>
On the client side :
/etc/graylog/sidecar/sidecar.yml
tags:
- test
But nothing happened in “/var/lib/graylog-sidecar/generated/filebeat.conf”
The documentation of Sidecar is not clear at all about tags and how config files are applied if we have several tags on an host who match several configurations.
The sidecar is just a wrapper around getting a Elasticsearch filebeat (Or Nxlog ) configuration out to machines in a consistent manner. I have never seen conditionals <#if... used in a beats configuration (Which… actually doesn’t say much…) … I also can’t find its use in the filebeat documentation. Where are you finding examples of using it - because it would be pretty cool if we could get that working!
All it comes from the doc that is not clear about this.
I copy/paste the doc with “1.2” written in the commands.
You need to have at least 1.3 version of Sidecar to have it works.
The doc about tags and sniplets is too minimalist.
The things to know :
each Configuration must be a full configuration, as Sidecar will spawn one process of the log shipper for each Configuration attached to the host.
Ex. in “sidecar.yml” on my Linux host, i have this
tags:
- "Linux standard logs"
- "Graylog server"
I have 2 corresponding Configuration in Graylog (with the same tag as their name in their conf)