# Error in adding yaml file for destinantion path in translate filter

**URL:** <https://discuss.elastic.co/t/error-in-adding-yaml-file-for-destinantion-path-in-translate-filter/278890>\
**Category:** Logstash\
**Created:** [July 16, 2021, 11:53am UTC](https://discuss.elastic.co/t/error-in-adding-yaml-file-for-destinantion-path-in-translate-filter/278890 "2021-07-16T11:53:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sarthak\_Mishra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sarthak_mishra/32/82772_2.png) [@Sarthak\_Mishra](https://discuss.elastic.co/u/Sarthak_Mishra)\
**Post date:** [July 16, 2021, 11:53am UTC](https://discuss.elastic.co/t/error-in-adding-yaml-file-for-destinantion-path-in-translate-filter/278890/1 "2021-07-16T11:53:16Z")

</div>

Hello community,  
I am trying to use translate filter where I add a yaml file with list of ips. When the ips in the csv don't match with IP in yaml file a new field is created "Added\_asset" with value as new. Please help debugging the error

input {

```
file {

    path => "C:/Users/kumar/Downloads/Sample_HPAM data.csv"

    start_position => "beginning"

    sincedb_path => "NULL"

}

```

}

filter {

csv {

```
separator => ","

columns => ["Devicetype","Assettag","AssignmentStatus","Makemodel","IP","Hostname","Serialnumber","OS","OSversion","NEID","Location","Business_Domain","BusinessDomianOwner","Application","AppLead","OPerationalSPOC","Platform","platformlead","HWMGMT","OSMGMT","OOBIP","Environment","Assignment Date","LastScanDt","AdditionalIP","","OperationalStatus"

```

]

}

translate{

field =\> "IP"

destination =\> "Added\_asset"

fallback =\> "new"

dictionary\_path =\> { 'C:/Users/kumar/Downloads/ip.yml'

}

}

}

output {

```
elasticsearch{

    hosts => "http://localhost:9200/"

    index => "hpam"

    user => "elastic"

    password => "XibKsoGe4p0uMhib6FdT"

}

stdout{}

```

}

Error:

Microsoft Windows [Version 10.0.19042.1083]  
(c) Microsoft Corporation. All rights reserved.

C:\Users\kumar\>cd C:\Users\kumar\Downloads\

C:\Users\kumar\Downloads\>logstash -f logstash.conf  
"Using bundled JDK: ""  
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.  
Sending Logstash logs to C:/elastic\_stack/logstash-7.12.1-windows-x86\_64/logstash-7.12.1/logs which is now configured via log4j2.properties  
[2021-07-16T17:17:37,440][INFO][logstash.runner] Log4j configuration path used is: C:\elastic\_stack\logstash-7.12.1-windows-x86\_64\logstash-7.12.1\config\log4j2.properties  
[2021-07-16T17:17:37,460][INFO][logstash.runner] Starting Logstash {"logstash.version"=\>"7.12.1", "jruby.version"=\>"jruby 9.2.13.0 (2.5.7) 2020-08-03 9a89c94bcc OpenJDK 64-Bit Server VM 11.0.10+9 on 11.0.10+9 +indy +jit [mswin32-x86\_64]"}  
[2021-07-16T17:17:37,774][WARN][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified  
[2021-07-16T17:17:39,407][INFO][logstash.agent] Successfully started Logstash API endpoint {:port=\>9600}  
[2021-07-16T17:17:39,827][ERROR][logstash.agent] Failed to execute action {:action=\>LogStash::PipelineAction::Create/pipeline\_id:main, :exception=\>"LogStash::ConfigurationError", :message=\>"Expected one of [\t\r\n], "#", "=\>" at line 21, column 3 (byte 726) after filter {\r\n csv {\r\n separator =\> ","\r\n columns =\> ["Devicetype","Assettag","AssignmentStatus","Makemodel","IP","Hostname","Serialnumber","OS","OSversion","NEID","Location","Business\_Domain","BusinessDomianOwner","Application","AppLead","OPerationalSPOC","Platform","platformlead","HWMGMT","OSMGMT","OOBIP","Environment","Assignment Date","LastScanDt","AdditionalIP","","OperationalStatus"\r\n]\r\n }\r\n\r\n translate{\r\n field =\> "IP"\r\n destination =\> "Added\_asset"\r\n fallback =\> "new"\r\n dictionary\_path =\> { 'C:/Users/kumar/Downloads/ip.yml'\r\n \r\n ", :backtrace=\>["C:/elastic\_stack/logstash-7.12.1-windows-x86\_64/logstash-7.12.1/logstash-core/lib/logstash/compiler.rb:32:in `compile_imperative'", "org/logstash/execution/AbstractPipelineExt.java:184:in `initialize'", "org/logstash/execution/JavaBasePipelineExt.java:69:in `initialize'", "C:/elastic_stack/logstash-7.12.1-windows-x86_64/logstash-7.12.1/logstash-core/lib/logstash/java_pipeline.rb:47:in `initialize'", "C:/elastic\_stack/logstash-7.12.1-windows-x86\_64/logstash-7.12.1/logstash-core/lib/logstash/pipeline\_action/create.rb:52:in `execute'", "C:/elastic_stack/logstash-7.12.1-windows-x86_64/logstash-7.12.1/logstash-core/lib/logstash/agent.rb:389:in `block in converge\_state'"]}  
[2021-07-16T17:17:39,993][INFO][logstash.runner] Logstash shut down.  
[2021-07-16T17:17:40,009][FATAL][org.logstash.Logstash] Logstash stopped processing because of an error: (SystemExit) exit  
org.jruby.exceptions.SystemExit: (SystemExit) exit  
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:747) ~[jruby-complete-9.2.13.0.jar:?]  
at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby-complete-9.2.13.0.jar:?]  
at C\_3a\_.elastic\_stack.logstash\_minus\_7\_dot\_12\_dot\_1\_minus\_windows\_minus\_x86\_64.logstash\_minus\_7\_dot\_12\_dot\_1.lib.bootstrap.environment.(C:\elastic\_stack\logstash-7.12.1-windows-x86\_64\logstash-7.12.1\lib\bootstrap\environment.rb:89) ~[?:?]

C:\Users\kumar\Downloads\>

---

<div class="post-metadata">

**Author:** ![Sarthak\_Mishra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sarthak_mishra/32/82772_2.png) [@Sarthak\_Mishra](https://discuss.elastic.co/u/Sarthak_Mishra)\
**Post date:** [July 20, 2021, 4:08am UTC](https://discuss.elastic.co/t/error-in-adding-yaml-file-for-destinantion-path-in-translate-filter/278890/2 "2021-07-20T04:08:06Z")

</div>

Hi,  
Anyone from elk, can you please help? Really appreciate it.Thank You

---

<div class="post-metadata">

**Author:** ![Cad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cad/32/86661_2.png) [@Cad](https://discuss.elastic.co/u/Cad)\
**Post date:** [July 20, 2021, 8:14am UTC](https://discuss.elastic.co/t/error-in-adding-yaml-file-for-destinantion-path-in-translate-filter/278890/3 "2021-07-20T08:14:49Z")

</div>

Hi,

> [@Sarthak\_Mishra](#):
>
> dictionary\_path =\> { 'C:/Users/kumar/Downloads/ip.yml'
> 
> }

I think you have to remove the curly braces.  
Dictionary\_path need a simple string

```auto
dictionary_path => "C:/Users/kumar/Downloads/ip.yml"

```

Cad.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 17, 2021, 8:15am UTC](https://discuss.elastic.co/t/error-in-adding-yaml-file-for-destinantion-path-in-translate-filter/278890/4 "2021-08-17T08:15:26Z")

</div>

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