After upgrade to 5.6.2 Logstash wont replace the environment variables

Hi,

We were using Logstash 1 and now we are upgrading to Logstash 5.6.2. As part of upgrade, we are doing the sanity check and we found that the environment variables are not getting replaced and we are getting the below error.

In output, we are using this environment variables.

output {
xxxudp{
host => "x.x.x.x"
port => 1024
codec => xxxcodec {
template => "CEF:0|${deviceVendor}|${deviceProduct}|rt=${timestamp:2017-11-06T08:23:45:559Z} src=${sourceAddress:10.0.0.1} spt=${sourcePort:1234: 52} suser=${identity:ADMIN} sourceServiceName=${deviceService:vibhor_srvc} deviceExternalId=${deviceExternalId:1152} deviceProcessName=${deviceProcessName:vibhor_proc} outcome=${outcome:vibhor_outcome} msg=${text:daemon_vibhs}"
facility => "USER"
}
}
}

Can someone help us here?

"Cannot create pipeline
{:reason=>""Cannot evaluate ${deviceVendor}.
Environment variable deviceVendor is not set and there is no default value given."",
:backtrace=>[""/opt/logstash/logstash-core/lib/logstash/util/environment_variables.rb:38:in replace_env_placeholders'"", ""org/jruby/RubyString.java:3064:ingsub'"",
""/opt/logstash/logstash-core/lib/logstash/util/environment_variables.rb:28:in replace_env_placeholders'"", ""/opt/logstash/logstash-core/lib/logstash/util/environment_variables.rb:18:indeep_replace'"",
""/opt/logstash/logstash-core/lib/logstash/config/mixin.rb:109:in config_init'"", ""org/jruby/RubyHash.java:1342:ineach'"", ""/opt/logstash/logstash-core/lib/logstash/config/mixin.rb:108:in config_init'"", ""/opt/logstash/logstash-core/lib/logstash/codecs/base.rb:19:ininitialize'"",
""/opt/logstash/logstash-core/lib/logstash/pipeline.rb:112:in plugin'"", ""(eval):8:ininitialize'"",
""org/jruby/RubyKernel.java:1079:in eval'"", ""/opt/logstash/logstash-core/lib/logstash/pipeline.rb:75:ininitialize'"",
""/opt/logstash/logstash-core/lib/logstash/pipeline.rb:165:in initialize'"", ""/opt/logstash/logstash-core/lib/logstash/agent.rb:286:increate_pipeline'"",
""/opt/logstash/logstash-core/lib/logstash/agent.rb:95:in register_pipeline'"", ""/opt/logstash/logstash-core/lib/logstash/runner.rb:313:inexecute'"",
""/opt/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:in run'"", ""/opt/logstash/logstash-core/lib/logstash/runner.rb:204:inrun'"",
""/opt/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:in run'"", ""/opt/logstash/lib/bootstrap/environment.rb:71:in(root)'""]}"

How are you setting the deviceVendor environment variable?

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