测试时Logstash自定义配置不起作用

时间:2019-07-29 02:45:11

标签: logstash logstash-configuration

我是Logstash的新手,所以我想用我的配置文件对其进行测试。但是,即使指定了配置文件,Logstash也不会使用该文件。

我尝试删除除我的测试配置文件之外的所有配置文件。但这仍然行不通。顺便说一句,pipeline.yml中的所有行均已注释。

我的Logstash路径:/home/pwangbo/data/elastic/logstash-6.2.4

我使用以下命令:./bin/logstash -f config/myconf/simple_test.conf

这是 simple_test.conf

input { stdin { } }
output { stdout { codec => rubydebug } }

输出不是在等我输入,而是从mysql数据库中打印一些内容:

[pwangbo@localhost logstash-6.2.4]$ bin/logstash -f config/myconf/simple_test.conf
Sending Logstash's logs to /home/pwangbo/data/elastic/logstash-6.2.4/logs which is now configured via log4j2.properties
[2019-07-29T10:42:23,009][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"netflow", :directory=>"/home/pwangbo/data/elastic/logstash-6.2.4/modules/netflow/configuration"}
[2019-07-29T10:42:23,029][INFO ][logstash.modules.scaffold] Initializing module {:module_name=>"fb_apache", :directory=>"/home/pwangbo/data/elastic/logstash-6.2.4/modules/fb_apache/configuration"}
[2019-07-29T10:42:23,599][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
[2019-07-29T10:42:24,387][INFO ][logstash.runner          ] Starting Logstash {"logstash.version"=>"6.2.4"}
[2019-07-29T10:42:25,083][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600}
[2019-07-29T10:42:29,395][INFO ][logstash.pipeline        ] Starting pipeline {:pipeline_id=>"main", "pipeline.workers"=>2, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>50}
[2019-07-29T10:42:29,610][INFO ][logstash.pipeline        ] Pipeline started successfully {:pipeline_id=>"main", :thread=>"#<Thread:0x3bd1e11a run>"}
The stdin plugin is now waiting for input:
[2019-07-29T10:42:29,824][INFO ][logstash.agent           ] Pipelines running {:count=>1, :pipelines=>["main"]}
{
       "@version" => "1",
         "myname" => "citicbank",
     "@timestamp" => 2019-07-22T10:18:00.981Z,
       "app_name" => "citicbank_github",
    "search_site" => "github",
         "result" => "{\"repository\": \"kaishenqiu/Investment\", \"checkin_time\": \"\", \"file_content\": \"8 |  \\\"idiom\\\" : \\\"universal\\\",  \\n---|---  \\n9 |  \\\"filename\\\" : \\\" _\\u4e2d\\u4fe1\\u94f6\\u884c_.png \\\",  \\n10 |  \\\"scale\\\" : \\\"2x\\\"  \\n11 |  },  \\n12 |  {  \\n13 |  \\\"idiom\\\" : \\\"universal\\\",\\n\\n\", \"file_name\": \"kaishenqiu/Investment\", \"file_url\": \"https://github.com/kaishenqiu/Investment/blob/c03c9ff278d597a9d690e2c3f456068be7ea39cc/Investment/Assets.xcassets/%E4%B8%AD%E4%BF%A1%E9%93%B6%E8%A1%8C.imageset/Contents.json\", \"repository_url\": \"https://github.com/kaishenqiu/Investment\"}"
}
{

0 个答案:

没有答案