Surprising error!

Hello
I have a problem with the creation of the config file and when launching the command.
I have this error
"do was unexpected."
=> do était inattendu.

Command line : C:\Program Files\Elastic\logstash\bin\logstash -f logstash.conf
<
input {

file {

    path > "H:/20190627 Données CLIENTS Historique  Mavina.csv"

    start_position => "beginning"

    sincedb_path => "NULL"  

}

}

filter {

csv { 

    separator => ";"

    columns => [Code société";"Actif";"Somme de Feu";"Catégorie de prix";"Langue";"Code tiers";"Code titre";"Titre";"'Clients'[Nom]";"Prénom";"Compl. adresse 1";"Compl. adresse 2";"Code postal";"Rue";"No rue";"Localité";"Pays";"Téléphone";"Téléphone portable";"Fax";"Email";"Statut du contrôle de la poste";"'Table représentants'[Nom]";"Code dépôt";"PICOD";"PINO";"No facture";"Date structurée - Année";"Date structurée - Trimestre";"Date structurée - Mois";"Date structurée - No jour";"Référence";"Désignation";"Code opération";"OP";"SERIE";"Somme de Quantité";"Somme de Quantité facturée";"Devise";"Somme de Montant HT ligne";"Code HT/TVA";"Code mode de règlement";"Mode de règlement";"Code mode de transport";"Mode de transport";"TICOD";"Etat intégration"]

]

    }

}

output {

elasticsearch {

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

    index => "mavina"

}

stdout {}

}

You are missing an opening " there.

If you do not want the in-memory sincedb persisted across restarts on Windows then use "NUL", not "NULL".

What is the complete error message?

Hello, I made the modification, I still have this message.
"do était inattendu"

Blockquote
input {

file {

    path > "H:/20190627 Données CLIENTS Historique  Mavina.csv"

    start_position => "beginning"

    sincedb_path => "NUL"  

}

}

filter {

csv { 

    separator => ";"

    columns => ["Code société";"Actif";"Somme de Feu";"Catégorie de prix";"Langue";"Code tiers";"Code titre";"Titre";"'Clients'[Nom]";"Prénom";"Compl. adresse 1";"Compl. adresse 2";"Code postal";"Rue";"No rue";"Localité";"Pays";"Téléphone";"Téléphone portable";"Fax";"Email";"Statut du contrôle de la poste";"'Table représentants'[Nom]";"Code dépôt";"PICOD";"PINO";"No facture";"Date structurée - Année";"Date structurée - Trimestre";"Date structurée - Mois";"Date structurée - No jour";"Référence";"Désignation";"Code opération";"OP";"SERIE";"Somme de Quantité";"Somme de Quantité facturée";"Devise";"Somme de Montant HT ligne";"Code HT/TVA";"Code mode de règlement";"Mode de règlement";"Code mode de transport";"Mode de transport";"TICOD";"Etat intégration"]

]

    }

}

output {

elasticsearch {

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

    index => "mavina"

}

stdout {}

}

Question:
The config file should be placed in which folder?
Bin or Config?

I don't think the error is anything to do with your configuration. I think it is a more fundamental problem with running logstash.

OK,
Thanks a lot for your help.
What test can I do?
Java : Picture

I installed JRuby because I had a message "He couldn't find jRuby"

rem ### 3: set jruby

set JRUBY_BIN="%LS_HOME%\vendor\bundle\jruby-9.2.11.1"
if not exist %JRUBY_BIN% (
echo "could not find jruby in %LS_HOME%\vendor\bundle\jruby\2.5.0\bin\jruby" 1>&2
exit /b 1
)

If you need other parameters, I am at your disposal.
Greetings
Guy Muller

Hello, I reinstall everything, Elastic, logstash, I have a new error

Error: unable to find or load the main class Files\Elastic\logstash-7.6.2\logstash-7.6.2\logstash-core\lib\jars\animal-sniffer-annotations-1.14.jar;C:\Program


thank you in advance

That looks like an error in quoting in the batch script that sets up the command line.

hello !?!?!
[2020-04-02T21:10:54,813][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 3, column 14 (byte 35) after input {\r\n file {\r\n path ", :backtrace=>["C:/logstash/logstash-core/lib/logstash/compiler.rb:41:in compile_imperative'", "C:/logstash/logstash-core/lib/logstash/compiler.rb:49:in compile_graph'", "C:/logstash/logstash-core/lib/logstash/compiler.rb:11:in block in compile_sources'", "org/jruby/RubyArray.java:2580:in map'", "C:/logstash/logstash-core/lib/logstash/compiler.rb:10:in compile_sources'", "org/logstash/execution/AbstractPipelineExt.java:161:in initialize'", "org/logstash/execution/JavaBasePipelineExt.java:47:in initialize'", "C:/logstash/logstash-core/lib/logstash/java_pipeline.rb:27:in initialize'", "C:/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:36:in execute'", "C:/logstash/logstash-core/lib/logstash/agent.rb:326:in block in converge_state'"]}
[2020-04-02T21:10:55,283][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}

That should be =>, not just >

Hello,
it's almost ok !!!
In the first line was not priced as a definition of the fields.
Here is an example of a recording.
thank you in advance

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