Fetched an invalid config

Hello all,
Please, can you help me to resolve this problem?
I've installed Only Logstash 5.2.1 in a Windows 8.1.

This is my CONFIG file:
########################################################

input {
file {
path => "C:\var\log\xmltest_2.xml"
start_position => "beginning"
type => "ticket"
codec => multiline

          pattern => "^<\?H_Ticket .*\>"
          negate => true
          what => "previous"
        
   }
  }

filter
{
xml
{
source => "ticket"
xpath =>
{
"/ticket/IDH_Ticket/text()", "ticketId",
"/ticket/CodeBus/text()", "codeBus",
"/ticket/CodeCh/text()", "codeCh",
"/ticket/CodeConv/text()", "codeConv",
"/ticket/Codeligne/text()", "codeLigne",
"/ticket/Date/text()", "date",
"/ticket/Heur/text()", "heure",
"/ticket/NomFR1/text()", "nomFR1",
"/ticket/NomFR2/text()", "nomFR2",
"/ticket/Prix/text()", "prix",
"/ticket/IDTicket/text()", "idTicket",
"/ticket/CodeRoute/text()", "codeRoute",
"/ticket/origine/text()", "origine",
"/ticket/Distination/text()", "destination",
"/ticket/Num/text()", "num",
"/ticket/Ligne/text()", "ligne",
"/ticket/requisition/text()", "requisition",
"/ticket/voyage/text()", "voyage",
"/ticket/faveur/text()", "faveur"
}
store_xml => true
target => "doc"
}
}

output {
stdout { codec => rubydebug }
}

########################################################

when I try to launch logstash, this outputs:

C:\logstash-5.2.1>bin\logstash -f C:\logstash-5.2.1\myfile_conf\xmltest_2.conf
[2017-03-06T10:06:41,578][ERROR][logstash.agent ] fetched an invalid config {:config=>"input { \n file {\n path => "C:\var\log\xmlt
est_2.xml"\n start_position => "beginning"\n type => "ticket"\n codec => multiline \n \n pattern => "^<\?H_Ti
cket .*\>"\n negate => true\n what => "previous"\n \n }\n }\nfilter \n{\n xml \n {\n
source => "ticket"\n xpath => \n {\n "/ticket/IDH_Ticket/text()", "ticketId",\n "/ticket/CodeBus/text()",
"codeBus",\n "/ticket/CodeCh/text()", "codeCh",\n "/ticket/CodeConv/text()", "codeConv",\n "/ticket/Codeli
gne/text()", "codeLigne",\n "/ticket/Date/text()", "date",\n "/ticket/Heur/text()", "heure",\n "/ticket/N
omFR1/text()", "nomFR1",\n "/ticket/NomFR2/text()", "nomFR2",\n "/ticket/Prix/text()", "prix",\n "/ticket
/IDTicket/text()", "idTicket",\n "/ticket/CodeRoute/text()", "codeRoute",\n "/ticket/origine/text()", "origine",\n
"/ticket/Distination/text()", "destination",\n "/ticket/Num/text()", "num",\n "/ticket/Ligne/text()", "ligne
",\n "/ticket/requisition/text()", "requisition",\n "/ticket/voyage/text()", "voyage",\n "/ticket/faveur/te
xt()", "faveur"\n }\n store_xml => true\n target => "doc"\n }\n}\n\noutput {\n stdout { codec => rubydebug }\n}\n", :rea
son=>"Expected one of #, => at line 21, column 40 (byte 408) after filter \n{\n xml \n {\n source => "ticket"\n xpath => \n
{\n "/ticket/IDH_Ticket/text()""}

Thanks a lot

Mattia

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