Logstash Variables

add_field => { "pipeline_ingress" => "$node.name" }

You'd have to make that ${node.name}, but since node.name isn't an environment variable it wouldn't work anyway.

So how can I build a variable that Logstash "can" read?

Assuming you're starting Logstash as a service via systemd or SysV init, setting the variables in /etc/default/logstash should work.

Ok and then reference it, via a Logstash config, like ${variable.name} ?

Yes.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.