I decided to dig in and figure how I will actually migrate to the new sidecar system if I end up going that route, since I rely on tags for configuration.
Using the API browser I noticed a PUT endpoint at
/sidecars/configurations, which was encouraging… but the JSON model in the API browser only mentions a
nodes object. After digging into the code, it looks like
nodes is a way of referencing
NodeConfiguration objects, which require
node_id (string) and
assignments (another array of objects) as values. That
assignments object has two strings,
You can get both
configuration_id by calling GET on
/sidecars/configurations - add
?name=configname on that request to search for a specific named configuration. Once you have those values, you can build an object to send to
/sidecars/configurations endpoint like so:
After sending this to that PUT endpoint, the collector output shows:
time="2019-02-23T16:56:54Z" level=info msg="[filebeat] Configuration change detected, rewriting configuration file."
so it got the updated configuration. Hopefully this is helpful to folks looking to replicate the old behavior!
I think it’s important to mention, though: this change would be easier to handle if there were more complete documentation and examples on how to register a configuration to a sidecar programatically. While I appreciate the flexibility of the new solution and work you’ve done, bringing up SemVer and “this is better” as a response isn’t very empathetic or kind. For those who are using configuration management to deploy configuration out to their machines, it might be easier to deploy and configure filebeat without sidecar now.