Skip to content

Instantly share code, notes, and snippets.

@desp0916
Created June 19, 2017 03:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save desp0916/29ad9be45bffda3c6be5026cf076981a to your computer and use it in GitHub Desktop.
Save desp0916/29ad9be45bffda3c6be5026cf076981a to your computer and use it in GitHub Desktop.
Test Chinese with Logstash 5.4.1 on Windows 10
C:\logstash-5.4.1>.\bin\logstash -f default.conf --log.level=debug --config.debug -l logs -w 1
Sending Logstash's logs to logs which is now configured via log4j2.properties
[2017-06-19T11:19:58,629][DEBUG][logstash.runner ] -------- Logstash Settings (* means modified) ---------
[2017-06-19T11:19:58,635][DEBUG][logstash.runner ] node.name: "GARY-NB"
[2017-06-19T11:19:58,637][DEBUG][logstash.runner ] *path.config: "default.conf"
[2017-06-19T11:19:58,638][DEBUG][logstash.runner ] path.data: "C:/logstash-5.4.1/data"
[2017-06-19T11:19:58,639][DEBUG][logstash.runner ] config.test_and_exit: false
[2017-06-19T11:19:58,640][DEBUG][logstash.runner ] config.reload.automatic: false
[2017-06-19T11:19:58,641][DEBUG][logstash.runner ] config.reload.interval: 3
[2017-06-19T11:19:58,641][DEBUG][logstash.runner ] metric.collect: true
[2017-06-19T11:19:58,645][DEBUG][logstash.runner ] pipeline.id: "main"
[2017-06-19T11:19:58,647][DEBUG][logstash.runner ] pipeline.system: false
[2017-06-19T11:19:58,648][DEBUG][logstash.runner ] *pipeline.workers: 1 (default: 2)
[2017-06-19T11:19:58,649][DEBUG][logstash.runner ] pipeline.output.workers: 1
[2017-06-19T11:19:58,650][DEBUG][logstash.runner ] pipeline.batch.size: 125
[2017-06-19T11:19:58,652][DEBUG][logstash.runner ] pipeline.batch.delay: 5
[2017-06-19T11:19:58,652][DEBUG][logstash.runner ] pipeline.unsafe_shutdown: false
[2017-06-19T11:19:58,656][DEBUG][logstash.runner ] path.plugins: []
[2017-06-19T11:19:58,659][DEBUG][logstash.runner ] *config.debug: true (default: false)
[2017-06-19T11:19:58,660][DEBUG][logstash.runner ] *log.level: "debug" (default: "info")
[2017-06-19T11:19:58,660][DEBUG][logstash.runner ] version: false
[2017-06-19T11:19:58,661][DEBUG][logstash.runner ] help: false
[2017-06-19T11:19:58,662][DEBUG][logstash.runner ] log.format: "plain"
[2017-06-19T11:19:58,663][DEBUG][logstash.runner ] http.host: "127.0.0.1"
[2017-06-19T11:19:58,663][DEBUG][logstash.runner ] http.port: 9600..9700
[2017-06-19T11:19:58,664][DEBUG][logstash.runner ] http.environment: "production"
[2017-06-19T11:19:58,667][DEBUG][logstash.runner ] queue.type: "memory"
[2017-06-19T11:19:58,670][DEBUG][logstash.runner ] queue.drain: false
[2017-06-19T11:19:58,670][DEBUG][logstash.runner ] queue.page_capacity: 262144000
[2017-06-19T11:19:58,671][DEBUG][logstash.runner ] queue.max_bytes: 1073741824
[2017-06-19T11:19:58,673][DEBUG][logstash.runner ] queue.max_events: 0
[2017-06-19T11:19:58,674][DEBUG][logstash.runner ] queue.checkpoint.acks: 1024
[2017-06-19T11:19:58,675][DEBUG][logstash.runner ] queue.checkpoint.writes: 1024
[2017-06-19T11:19:58,675][DEBUG][logstash.runner ] queue.checkpoint.interval: 1000
[2017-06-19T11:19:58,680][DEBUG][logstash.runner ] slowlog.threshold.warn: -1
[2017-06-19T11:19:58,681][DEBUG][logstash.runner ] slowlog.threshold.info: -1
[2017-06-19T11:19:58,682][DEBUG][logstash.runner ] slowlog.threshold.debug: -1
[2017-06-19T11:19:58,683][DEBUG][logstash.runner ] slowlog.threshold.trace: -1
[2017-06-19T11:19:58,684][DEBUG][logstash.runner ] path.queue: "C:/logstash-5.4.1/data/queue"
[2017-06-19T11:19:58,684][DEBUG][logstash.runner ] path.settings: "C:/logstash-5.4.1/config"
[2017-06-19T11:19:58,685][DEBUG][logstash.runner ] *path.logs: "logs" (default: "C:/logstash-5.4.1/logs")
[2017-06-19T11:19:58,686][DEBUG][logstash.runner ] --------------- Logstash Settings -------------------
[2017-06-19T11:19:58,709][DEBUG][logstash.agent ] Agent: Configuring metric collection
[2017-06-19T11:19:58,712][DEBUG][logstash.instrument.periodicpoller.os] PeriodicPoller: Starting {:polling_interval=>5, :polling_timeout=>120}
[2017-06-19T11:19:58,734][DEBUG][logstash.instrument.periodicpoller.jvm] PeriodicPoller: Starting {:polling_interval=>5, :polling_timeout=>120}
[2017-06-19T11:19:58,758][DEBUG][logstash.instrument.periodicpoller.persistentqueue] PeriodicPoller: Starting {:polling_interval=>5, :polling_timeout=>120}
[2017-06-19T11:19:58,775][DEBUG][logstash.agent ] Reading config file {:config_file=>"C:/logstash-5.4.1/default.conf"}
[2017-06-19T11:19:58,779][DEBUG][logstash.agent ]
The following is the content of a file {:config_file=>"C:/logstash-5.4.1/default.conf"}
[2017-06-19T11:19:58,782][DEBUG][logstash.agent ]
input {
stdin { }
}
output {
stdout { }
}
[2017-06-19T11:19:58,783][DEBUG][logstash.agent ]
The following is the merged configuration
[2017-06-19T11:19:58,784][DEBUG][logstash.agent ]
input {
stdin { }
}
output {
stdout { }
}
[2017-06-19T11:19:58,796][DEBUG][logstash.pipeline ] Compiled pipeline code {:code=>" @inputs = []\n @filters = []\n @outputs = []\n @periodic_flushers = []\n @shutdown_flushers = []\n @generated_objects = {}\n\n @generated_objects[:input_stdin_1] = plugin(\"input\", \"stdin\")\n\n @inputs << @generated_objects[:input_stdin_1]\n\n @generated_objects[:output_stdout_2] = plugin(\"output\", \"stdout\")\n\n @outputs << @generated_objects[:output_stdout_2]\n\n define_singleton_method :filter_func do |event|\n events = [event]\n @logger.debug? && @logger.debug(\"filter received\", \"event\" => event.to_hash)\n events\n end\n define_singleton_method :output_func do |event|\n targeted_outputs = []\n @logger.debug? && @logger.debug(\"output received\", \"event\" => event.to_hash)\n targeted_outputs << @generated_objects[:output_stdout_2]\n \n targeted_outputs\n end"}
[2017-06-19T11:19:58,848][DEBUG][logstash.plugins.registry] On demand adding plugin to the registry {:name=>"stdin", :type=>"input", :class=>LogStash::Inputs::Stdin}
[2017-06-19T11:19:58,879][DEBUG][logstash.plugins.registry] On demand adding plugin to the registry {:name=>"line", :type=>"codec", :class=>LogStash::Codecs::Line}
[2017-06-19T11:19:58,889][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@id = "line_a29dd2ab-1d9f-4eac-9fba-96849ae60405"
[2017-06-19T11:19:58,890][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@enable_metric = true
[2017-06-19T11:19:58,890][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@charset = "UTF-8"
[2017-06-19T11:19:58,893][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@delimiter = "\n"
[2017-06-19T11:19:58,905][DEBUG][logstash.inputs.stdin ] config LogStash::Inputs::Stdin/@id = "038d0d8a21eefd3f4ae000d63c58230d8e3e222d-1"
[2017-06-19T11:19:58,907][DEBUG][logstash.inputs.stdin ] config LogStash::Inputs::Stdin/@enable_metric = true
[2017-06-19T11:19:58,908][DEBUG][logstash.inputs.stdin ] config LogStash::Inputs::Stdin/@codec = <LogStash::Codecs::Line id=>"line_a29dd2ab-1d9f-4eac-9fba-96849ae60405", enable_metric=>true, charset=>"UTF-8", delimiter=>"\n">
[2017-06-19T11:19:58,909][DEBUG][logstash.inputs.stdin ] config LogStash::Inputs::Stdin/@add_field = {}
[2017-06-19T11:19:58,911][DEBUG][logstash.plugins.registry] On demand adding plugin to the registry {:name=>"stdout", :type=>"output", :class=>LogStash::Outputs::Stdout}
[2017-06-19T11:19:58,919][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@id = "line_3d9e7efc-ee8c-482a-92d6-a1de2ea1d79f"
[2017-06-19T11:19:58,919][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@enable_metric = true
[2017-06-19T11:19:58,920][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@charset = "UTF-8"
[2017-06-19T11:19:58,922][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@delimiter = "\n"
[2017-06-19T11:19:58,927][DEBUG][logstash.outputs.stdout ] config LogStash::Outputs::Stdout/@id = "038d0d8a21eefd3f4ae000d63c58230d8e3e222d-2"
[2017-06-19T11:19:58,928][DEBUG][logstash.outputs.stdout ] config LogStash::Outputs::Stdout/@enable_metric = true
[2017-06-19T11:19:58,930][DEBUG][logstash.outputs.stdout ] config LogStash::Outputs::Stdout/@codec = <LogStash::Codecs::Line id=>"line_3d9e7efc-ee8c-482a-92d6-a1de2ea1d79f", enable_metric=>true, charset=>"UTF-8", delimiter=>"\n">
[2017-06-19T11:19:58,931][DEBUG][logstash.outputs.stdout ] config LogStash::Outputs::Stdout/@workers = 1
[2017-06-19T11:19:58,944][DEBUG][logstash.agent ] starting agent
[2017-06-19T11:19:58,953][DEBUG][logstash.agent ] starting pipeline {:id=>"main"}
[2017-06-19T11:19:58,958][INFO ][logstash.pipeline ] Starting pipeline {"id"=>"main", "pipeline.workers"=>1, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>125}
[2017-06-19T11:19:58,980][INFO ][logstash.pipeline ] Pipeline main started
The stdin plugin is now waiting for input:
[2017-06-19T11:19:59,002][DEBUG][logstash.agent ] Starting puma
[2017-06-19T11:19:59,009][DEBUG][logstash.agent ] Trying to start WebServer {:port=>9600}
[2017-06-19T11:19:59,013][DEBUG][logstash.api.service ] [api-service] start
[2017-06-19T11:19:59,079][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2017-06-19T11:20:03,992][DEBUG][logstash.pipeline ] Pushing flush onto pipeline
network 網路
[2017-06-19T11:20:06,999][WARN ][logstash.codecs.line ] Received an event that has a different character encoding than you configured. {:text=>"network \\xBA\\xF4\\xB8\\xF4\\r", :expected_charset=>"UTF-8"}
[2017-06-19T11:20:07,027][DEBUG][logstash.pipeline ] filter received {"event"=>{"@timestamp"=>2017-06-19T03:20:07.018Z, "@version"=>"1", "host"=>"GARY-NB", "message"=>"network \\xBA\\xF4\\xB8\\xF4\\r"}}
[2017-06-19T11:20:07,033][DEBUG][logstash.pipeline ] output received {"event"=>{"@timestamp"=>2017-06-19T03:20:07.018Z, "@version"=>"1", "host"=>"GARY-NB", "message"=>"network \\xBA\\xF4\\xB8\\xF4\\r"}}
2017-06-19T03:20:07.018Z GARY-NB network \xBA\xF4\xB8\xF4\r
[2017-06-19T11:20:08,995][DEBUG][logstash.pipeline ] Pushing flush onto pipeline
C:\logstash-5.4.1>.\bin\logstash -f CP950.conf --log.level=debug --config.debug -l logs -w 1
Sending Logstash's logs to logs which is now configured via log4j2.properties
[2017-06-19T11:25:16,244][DEBUG][logstash.runner ] -------- Logstash Settings (* means modified) ---------
[2017-06-19T11:25:16,251][DEBUG][logstash.runner ] node.name: "GARY-NB"
[2017-06-19T11:25:16,252][DEBUG][logstash.runner ] *path.config: "CP950.conf"
[2017-06-19T11:25:16,252][DEBUG][logstash.runner ] path.data: "C:/logstash-5.4.1/data"
[2017-06-19T11:25:16,253][DEBUG][logstash.runner ] config.test_and_exit: false
[2017-06-19T11:25:16,253][DEBUG][logstash.runner ] config.reload.automatic: false
[2017-06-19T11:25:16,254][DEBUG][logstash.runner ] config.reload.interval: 3
[2017-06-19T11:25:16,256][DEBUG][logstash.runner ] metric.collect: true
[2017-06-19T11:25:16,256][DEBUG][logstash.runner ] pipeline.id: "main"
[2017-06-19T11:25:16,257][DEBUG][logstash.runner ] pipeline.system: false
[2017-06-19T11:25:16,258][DEBUG][logstash.runner ] *pipeline.workers: 1 (default: 2)
[2017-06-19T11:25:16,263][DEBUG][logstash.runner ] pipeline.output.workers: 1
[2017-06-19T11:25:16,264][DEBUG][logstash.runner ] pipeline.batch.size: 125
[2017-06-19T11:25:16,265][DEBUG][logstash.runner ] pipeline.batch.delay: 5
[2017-06-19T11:25:16,265][DEBUG][logstash.runner ] pipeline.unsafe_shutdown: false
[2017-06-19T11:25:16,266][DEBUG][logstash.runner ] path.plugins: []
[2017-06-19T11:25:16,267][DEBUG][logstash.runner ] *config.debug: true (default: false)
[2017-06-19T11:25:16,267][DEBUG][logstash.runner ] *log.level: "debug" (default: "info")
[2017-06-19T11:25:16,268][DEBUG][logstash.runner ] version: false
[2017-06-19T11:25:16,269][DEBUG][logstash.runner ] help: false
[2017-06-19T11:25:16,270][DEBUG][logstash.runner ] log.format: "plain"
[2017-06-19T11:25:16,275][DEBUG][logstash.runner ] http.host: "127.0.0.1"
[2017-06-19T11:25:16,276][DEBUG][logstash.runner ] http.port: 9600..9700
[2017-06-19T11:25:16,276][DEBUG][logstash.runner ] http.environment: "production"
[2017-06-19T11:25:16,277][DEBUG][logstash.runner ] queue.type: "memory"
[2017-06-19T11:25:16,278][DEBUG][logstash.runner ] queue.drain: false
[2017-06-19T11:25:16,278][DEBUG][logstash.runner ] queue.page_capacity: 262144000
[2017-06-19T11:25:16,279][DEBUG][logstash.runner ] queue.max_bytes: 1073741824
[2017-06-19T11:25:16,279][DEBUG][logstash.runner ] queue.max_events: 0
[2017-06-19T11:25:16,280][DEBUG][logstash.runner ] queue.checkpoint.acks: 1024
[2017-06-19T11:25:16,281][DEBUG][logstash.runner ] queue.checkpoint.writes: 1024
[2017-06-19T11:25:16,281][DEBUG][logstash.runner ] queue.checkpoint.interval: 1000
[2017-06-19T11:25:16,282][DEBUG][logstash.runner ] slowlog.threshold.warn: -1
[2017-06-19T11:25:16,286][DEBUG][logstash.runner ] slowlog.threshold.info: -1
[2017-06-19T11:25:16,287][DEBUG][logstash.runner ] slowlog.threshold.debug: -1
[2017-06-19T11:25:16,288][DEBUG][logstash.runner ] slowlog.threshold.trace: -1
[2017-06-19T11:25:16,290][DEBUG][logstash.runner ] path.queue: "C:/logstash-5.4.1/data/queue"
[2017-06-19T11:25:16,290][DEBUG][logstash.runner ] path.settings: "C:/logstash-5.4.1/config"
[2017-06-19T11:25:16,291][DEBUG][logstash.runner ] *path.logs: "logs" (default: "C:/logstash-5.4.1/logs")
[2017-06-19T11:25:16,291][DEBUG][logstash.runner ] --------------- Logstash Settings -------------------
[2017-06-19T11:25:16,313][DEBUG][logstash.agent ] Agent: Configuring metric collection
[2017-06-19T11:25:16,316][DEBUG][logstash.instrument.periodicpoller.os] PeriodicPoller: Starting {:polling_interval=>5, :polling_timeout=>120}
[2017-06-19T11:25:16,333][DEBUG][logstash.instrument.periodicpoller.jvm] PeriodicPoller: Starting {:polling_interval=>5, :polling_timeout=>120}
[2017-06-19T11:25:16,356][DEBUG][logstash.instrument.periodicpoller.persistentqueue] PeriodicPoller: Starting {:polling_interval=>5, :polling_timeout=>120}
[2017-06-19T11:25:16,370][DEBUG][logstash.agent ] Reading config file {:config_file=>"C:/logstash-5.4.1/CP950.conf"}
[2017-06-19T11:25:16,376][DEBUG][logstash.agent ]
The following is the content of a file {:config_file=>"C:/logstash-5.4.1/CP950.conf"}
[2017-06-19T11:25:16,380][DEBUG][logstash.agent ]
input {
stdin {
codec => line {
charset => "CP950"
}
}
}
output {
stdout {
codec => line {
charset => "CP950"
}
}
}
[2017-06-19T11:25:16,381][DEBUG][logstash.agent ]
The following is the merged configuration
[2017-06-19T11:25:16,381][DEBUG][logstash.agent ]
input {
stdin {
codec => line {
charset => "CP950"
}
}
}
output {
stdout {
codec => line {
charset => "CP950"
}
}
}
[2017-06-19T11:25:16,404][DEBUG][logstash.pipeline ] Compiled pipeline code {:code=>" @inputs = []\n @filters = []\n @outputs = []\n @periodic_flushers = []\n @shutdown_flushers = []\n @generated_objects = {}\n\n @generated_objects[:input_stdin_1] = plugin(\"input\", \"stdin\", LogStash::Util.hash_merge_many({ \"codec\" => plugin(\"codec\", \"line\", LogStash::Util.hash_merge_many({ \"charset\" => (\"CP950\") })) }))\n\n @inputs << @generated_objects[:input_stdin_1]\n\n @generated_objects[:output_stdout_2] = plugin(\"output\", \"stdout\", LogStash::Util.hash_merge_many({ \"codec\" => plugin(\"codec\", \"line\", LogStash::Util.hash_merge_many({ \"charset\" => (\"CP950\") })) }))\n\n @outputs << @generated_objects[:output_stdout_2]\n\n define_singleton_method :filter_func do |event|\n events = [event]\n @logger.debug? && @logger.debug(\"filter received\", \"event\" => event.to_hash)\n events\n end\n define_singleton_method :output_func do |event|\n targeted_outputs = []\n @logger.debug? && @logger.debug(\"output received\", \"event\" => event.to_hash)\n targeted_outputs << @generated_objects[:output_stdout_2]\n \n targeted_outputs\n end"}
[2017-06-19T11:25:16,425][DEBUG][logstash.plugins.registry] On demand adding plugin to the registry {:name=>"line", :type=>"codec", :class=>LogStash::Codecs::Line}
[2017-06-19T11:25:16,439][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@charset = "CP950"
[2017-06-19T11:25:16,440][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@id = "23930df3de3f817de84720e0273cca0f57c713e5-1"
[2017-06-19T11:25:16,441][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@enable_metric = true
[2017-06-19T11:25:16,442][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@delimiter = "\n"
[2017-06-19T11:25:16,486][DEBUG][logstash.plugins.registry] On demand adding plugin to the registry {:name=>"stdin", :type=>"input", :class=>LogStash::Inputs::Stdin}
[2017-06-19T11:25:16,491][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@charset = "CP950"
[2017-06-19T11:25:16,492][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@id = "23930df3de3f817de84720e0273cca0f57c713e5-1"
[2017-06-19T11:25:16,495][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@enable_metric = true
[2017-06-19T11:25:16,496][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@delimiter = "\n"
[2017-06-19T11:25:16,498][DEBUG][logstash.inputs.stdin ] config LogStash::Inputs::Stdin/@codec = <LogStash::Codecs::Line charset=>"CP950", id=>"23930df3de3f817de84720e0273cca0f57c713e5-1", enable_metric=>true, delimiter=>"\n">
[2017-06-19T11:25:16,501][DEBUG][logstash.inputs.stdin ] config LogStash::Inputs::Stdin/@id = "23930df3de3f817de84720e0273cca0f57c713e5-2"
[2017-06-19T11:25:16,502][DEBUG][logstash.inputs.stdin ] config LogStash::Inputs::Stdin/@enable_metric = true
[2017-06-19T11:25:16,503][DEBUG][logstash.inputs.stdin ] config LogStash::Inputs::Stdin/@add_field = {}
[2017-06-19T11:25:16,506][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@charset = "CP950"
[2017-06-19T11:25:16,506][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@id = "23930df3de3f817de84720e0273cca0f57c713e5-3"
[2017-06-19T11:25:16,507][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@enable_metric = true
[2017-06-19T11:25:16,510][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@delimiter = "\n"
[2017-06-19T11:25:16,514][DEBUG][logstash.plugins.registry] On demand adding plugin to the registry {:name=>"stdout", :type=>"output", :class=>LogStash::Outputs::Stdout}
[2017-06-19T11:25:16,523][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@charset = "CP950"
[2017-06-19T11:25:16,525][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@id = "23930df3de3f817de84720e0273cca0f57c713e5-3"
[2017-06-19T11:25:16,526][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@enable_metric = true
[2017-06-19T11:25:16,527][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@delimiter = "\n"
[2017-06-19T11:25:16,529][DEBUG][logstash.outputs.stdout ] config LogStash::Outputs::Stdout/@codec = <LogStash::Codecs::Line charset=>"CP950", id=>"23930df3de3f817de84720e0273cca0f57c713e5-3", enable_metric=>true, delimiter=>"\n">
[2017-06-19T11:25:16,530][DEBUG][logstash.outputs.stdout ] config LogStash::Outputs::Stdout/@id = "23930df3de3f817de84720e0273cca0f57c713e5-4"
[2017-06-19T11:25:16,530][DEBUG][logstash.outputs.stdout ] config LogStash::Outputs::Stdout/@enable_metric = true
[2017-06-19T11:25:16,533][DEBUG][logstash.outputs.stdout ] config LogStash::Outputs::Stdout/@workers = 1
[2017-06-19T11:25:16,539][DEBUG][logstash.agent ] starting agent
[2017-06-19T11:25:16,547][DEBUG][logstash.agent ] starting pipeline {:id=>"main"}
[2017-06-19T11:25:16,554][INFO ][logstash.pipeline ] Starting pipeline {"id"=>"main", "pipeline.workers"=>1, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>125}
[2017-06-19T11:25:16,577][INFO ][logstash.pipeline ] Pipeline main started
The stdin plugin is now waiting for input:
[2017-06-19T11:25:16,599][DEBUG][logstash.agent ] Starting puma
[2017-06-19T11:25:16,608][DEBUG][logstash.agent ] Trying to start WebServer {:port=>9600}
[2017-06-19T11:25:16,613][DEBUG][logstash.api.service ] [api-service] start
[2017-06-19T11:25:16,679][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
[2017-06-19T11:25:21,589][DEBUG][logstash.pipeline ] Pushing flush onto pipeline
[2017-06-19T11:25:26,594][DEBUG][logstash.pipeline ] Pushing flush onto pipeline
network 網路
[2017-06-19T11:25:27,683][DEBUG][logstash.pipeline ] filter received {"event"=>{"@timestamp"=>2017-06-19T03:25:27.672Z, "@version"=>"1", "host"=>"GARY-NB", "message"=>"network 網路\r"}}
[2017-06-19T11:25:27,690][DEBUG][logstash.pipeline ] output received {"event"=>{"@timestamp"=>2017-06-19T03:25:27.672Z, "@version"=>"1", "host"=>"GARY-NB", "message"=>"network 網路\r"}}
2017-06-19T03:25:27.672Z GARY-NB network ??
[2017-06-19T11:25:31,595][DEBUG][logstash.pipeline ] Pushing flush onto pipeline
C:\logstash-5.4.1>.\bin\logstash -f rubydebug.conf --log.level=debug --config.debug -l logs -w 1
Sending Logstash's logs to logs which is now configured via log4j2.properties
[2017-06-19T11:26:36,289][DEBUG][logstash.runner ] -------- Logstash Settings (* means modified) ---------
[2017-06-19T11:26:36,295][DEBUG][logstash.runner ] node.name: "GARY-NB"
[2017-06-19T11:26:36,297][DEBUG][logstash.runner ] *path.config: "rubydebug.conf"
[2017-06-19T11:26:36,298][DEBUG][logstash.runner ] path.data: "C:/logstash-5.4.1/data"
[2017-06-19T11:26:36,298][DEBUG][logstash.runner ] config.test_and_exit: false
[2017-06-19T11:26:36,299][DEBUG][logstash.runner ] config.reload.automatic: false
[2017-06-19T11:26:36,300][DEBUG][logstash.runner ] config.reload.interval: 3
[2017-06-19T11:26:36,300][DEBUG][logstash.runner ] metric.collect: true
[2017-06-19T11:26:36,301][DEBUG][logstash.runner ] pipeline.id: "main"
[2017-06-19T11:26:36,301][DEBUG][logstash.runner ] pipeline.system: false
[2017-06-19T11:26:36,302][DEBUG][logstash.runner ] *pipeline.workers: 1 (default: 2)
[2017-06-19T11:26:36,305][DEBUG][logstash.runner ] pipeline.output.workers: 1
[2017-06-19T11:26:36,307][DEBUG][logstash.runner ] pipeline.batch.size: 125
[2017-06-19T11:26:36,308][DEBUG][logstash.runner ] pipeline.batch.delay: 5
[2017-06-19T11:26:36,309][DEBUG][logstash.runner ] pipeline.unsafe_shutdown: false
[2017-06-19T11:26:36,310][DEBUG][logstash.runner ] path.plugins: []
[2017-06-19T11:26:36,311][DEBUG][logstash.runner ] *config.debug: true (default: false)
[2017-06-19T11:26:36,312][DEBUG][logstash.runner ] *log.level: "debug" (default: "info")
[2017-06-19T11:26:36,312][DEBUG][logstash.runner ] version: false
[2017-06-19T11:26:36,315][DEBUG][logstash.runner ] help: false
[2017-06-19T11:26:36,317][DEBUG][logstash.runner ] log.format: "plain"
[2017-06-19T11:26:36,318][DEBUG][logstash.runner ] http.host: "127.0.0.1"
[2017-06-19T11:26:36,318][DEBUG][logstash.runner ] http.port: 9600..9700
[2017-06-19T11:26:36,319][DEBUG][logstash.runner ] http.environment: "production"
[2017-06-19T11:26:36,320][DEBUG][logstash.runner ] queue.type: "memory"
[2017-06-19T11:26:36,320][DEBUG][logstash.runner ] queue.drain: false
[2017-06-19T11:26:36,321][DEBUG][logstash.runner ] queue.page_capacity: 262144000
[2017-06-19T11:26:36,322][DEBUG][logstash.runner ] queue.max_bytes: 1073741824
[2017-06-19T11:26:36,322][DEBUG][logstash.runner ] queue.max_events: 0
[2017-06-19T11:26:36,323][DEBUG][logstash.runner ] queue.checkpoint.acks: 1024
[2017-06-19T11:26:36,326][DEBUG][logstash.runner ] queue.checkpoint.writes: 1024
[2017-06-19T11:26:36,338][DEBUG][logstash.runner ] queue.checkpoint.interval: 1000
[2017-06-19T11:26:36,339][DEBUG][logstash.runner ] slowlog.threshold.warn: -1
[2017-06-19T11:26:36,339][DEBUG][logstash.runner ] slowlog.threshold.info: -1
[2017-06-19T11:26:36,341][DEBUG][logstash.runner ] slowlog.threshold.debug: -1
[2017-06-19T11:26:36,342][DEBUG][logstash.runner ] slowlog.threshold.trace: -1
[2017-06-19T11:26:36,343][DEBUG][logstash.runner ] path.queue: "C:/logstash-5.4.1/data/queue"
[2017-06-19T11:26:36,349][DEBUG][logstash.runner ] path.settings: "C:/logstash-5.4.1/config"
[2017-06-19T11:26:36,350][DEBUG][logstash.runner ] *path.logs: "logs" (default: "C:/logstash-5.4.1/logs")
[2017-06-19T11:26:36,350][DEBUG][logstash.runner ] --------------- Logstash Settings -------------------
[2017-06-19T11:26:36,367][DEBUG][logstash.agent ] Agent: Configuring metric collection
[2017-06-19T11:26:36,371][DEBUG][logstash.instrument.periodicpoller.os] PeriodicPoller: Starting {:polling_interval=>5, :polling_timeout=>120}
[2017-06-19T11:26:36,385][DEBUG][logstash.instrument.periodicpoller.jvm] PeriodicPoller: Starting {:polling_interval=>5, :polling_timeout=>120}
[2017-06-19T11:26:36,403][DEBUG][logstash.instrument.periodicpoller.persistentqueue] PeriodicPoller: Starting {:polling_interval=>5, :polling_timeout=>120}
[2017-06-19T11:26:36,408][DEBUG][logstash.agent ] Reading config file {:config_file=>"C:/logstash-5.4.1/rubydebug.conf"}
[2017-06-19T11:26:36,410][DEBUG][logstash.agent ]
The following is the content of a file {:config_file=>"C:/logstash-5.4.1/rubydebug.conf"}
[2017-06-19T11:26:36,411][DEBUG][logstash.agent ]
input {
stdin {
codec => line {
charset => "CP950"
}
}
}
output {
stdout {
codec => rubydebug
}
}
[2017-06-19T11:26:36,413][DEBUG][logstash.agent ]
The following is the merged configuration
[2017-06-19T11:26:36,413][DEBUG][logstash.agent ]
input {
stdin {
codec => line {
charset => "CP950"
}
}
}
output {
stdout {
codec => rubydebug
}
}
[2017-06-19T11:26:36,451][DEBUG][logstash.pipeline ] Compiled pipeline code {:code=>" @inputs = []\n @filters = []\n @outputs = []\n @periodic_flushers = []\n @shutdown_flushers = []\n @generated_objects = {}\n\n @generated_objects[:input_stdin_1] = plugin(\"input\", \"stdin\", LogStash::Util.hash_merge_many({ \"codec\" => plugin(\"codec\", \"line\", LogStash::Util.hash_merge_many({ \"charset\" => (\"CP950\") })) }))\n\n @inputs << @generated_objects[:input_stdin_1]\n\n @generated_objects[:output_stdout_2] = plugin(\"output\", \"stdout\", LogStash::Util.hash_merge_many({ \"codec\" => (\"rubydebug\") }))\n\n @outputs << @generated_objects[:output_stdout_2]\n\n define_singleton_method :filter_func do |event|\n events = [event]\n @logger.debug? && @logger.debug(\"filter received\", \"event\" => event.to_hash)\n events\n end\n define_singleton_method :output_func do |event|\n targeted_outputs = []\n @logger.debug? && @logger.debug(\"output received\", \"event\" => event.to_hash)\n targeted_outputs << @generated_objects[:output_stdout_2]\n \n targeted_outputs\n end"}
[2017-06-19T11:26:36,471][DEBUG][logstash.plugins.registry] On demand adding plugin to the registry {:name=>"line", :type=>"codec", :class=>LogStash::Codecs::Line}
[2017-06-19T11:26:36,481][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@charset = "CP950"
[2017-06-19T11:26:36,482][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@id = "358e60a461bc0f5560e6ecbe92472f464a2b0a4a-1"
[2017-06-19T11:26:36,483][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@enable_metric = true
[2017-06-19T11:26:36,486][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@delimiter = "\n"
[2017-06-19T11:26:36,526][DEBUG][logstash.plugins.registry] On demand adding plugin to the registry {:name=>"stdin", :type=>"input", :class=>LogStash::Inputs::Stdin}
[2017-06-19T11:26:36,531][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@charset = "CP950"
[2017-06-19T11:26:36,533][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@id = "358e60a461bc0f5560e6ecbe92472f464a2b0a4a-1"
[2017-06-19T11:26:36,534][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@enable_metric = true
[2017-06-19T11:26:36,535][DEBUG][logstash.codecs.line ] config LogStash::Codecs::Line/@delimiter = "\n"
[2017-06-19T11:26:36,536][DEBUG][logstash.inputs.stdin ] config LogStash::Inputs::Stdin/@codec = <LogStash::Codecs::Line charset=>"CP950", id=>"358e60a461bc0f5560e6ecbe92472f464a2b0a4a-1", enable_metric=>true, delimiter=>"\n">
[2017-06-19T11:26:36,537][DEBUG][logstash.inputs.stdin ] config LogStash::Inputs::Stdin/@id = "358e60a461bc0f5560e6ecbe92472f464a2b0a4a-2"
[2017-06-19T11:26:36,537][DEBUG][logstash.inputs.stdin ] config LogStash::Inputs::Stdin/@enable_metric = true
[2017-06-19T11:26:36,540][DEBUG][logstash.inputs.stdin ] config LogStash::Inputs::Stdin/@add_field = {}
[2017-06-19T11:26:36,547][DEBUG][logstash.plugins.registry] On demand adding plugin to the registry {:name=>"stdout", :type=>"output", :class=>LogStash::Outputs::Stdout}
[2017-06-19T11:26:36,556][DEBUG][logstash.plugins.registry] On demand adding plugin to the registry {:name=>"rubydebug", :type=>"codec", :class=>LogStash::Codecs::RubyDebug}
[2017-06-19T11:26:36,561][DEBUG][logstash.codecs.rubydebug] config LogStash::Codecs::RubyDebug/@id = "rubydebug_f148e97d-b866-42e4-9174-0b347f004e09"
[2017-06-19T11:26:36,563][DEBUG][logstash.codecs.rubydebug] config LogStash::Codecs::RubyDebug/@enable_metric = true
[2017-06-19T11:26:36,569][DEBUG][logstash.codecs.rubydebug] config LogStash::Codecs::RubyDebug/@metadata = false
[2017-06-19T11:26:36,645][DEBUG][logstash.outputs.stdout ] config LogStash::Outputs::Stdout/@codec = <LogStash::Codecs::RubyDebug id=>"rubydebug_f148e97d-b866-42e4-9174-0b347f004e09", enable_metric=>true, metadata=>false>
[2017-06-19T11:26:36,649][DEBUG][logstash.outputs.stdout ] config LogStash::Outputs::Stdout/@id = "358e60a461bc0f5560e6ecbe92472f464a2b0a4a-3"
[2017-06-19T11:26:36,651][DEBUG][logstash.outputs.stdout ] config LogStash::Outputs::Stdout/@enable_metric = true
[2017-06-19T11:26:36,652][DEBUG][logstash.outputs.stdout ] config LogStash::Outputs::Stdout/@workers = 1
[2017-06-19T11:26:36,660][DEBUG][logstash.agent ] starting agent
[2017-06-19T11:26:36,674][DEBUG][logstash.agent ] starting pipeline {:id=>"main"}
[2017-06-19T11:26:36,680][INFO ][logstash.pipeline ] Starting pipeline {"id"=>"main", "pipeline.workers"=>1, "pipeline.batch.size"=>125, "pipeline.batch.delay"=>5, "pipeline.max_inflight"=>125}
[2017-06-19T11:26:36,703][INFO ][logstash.pipeline ] Pipeline main started
The stdin plugin is now waiting for input:
[2017-06-19T11:26:36,726][DEBUG][logstash.agent ] Starting puma
[2017-06-19T11:26:36,736][DEBUG][logstash.agent ] Trying to start WebServer {:port=>9600}
[2017-06-19T11:26:36,743][DEBUG][logstash.api.service ] [api-service] start
[2017-06-19T11:26:36,809][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}
network 網路
[2017-06-19T11:26:39,170][DEBUG][logstash.pipeline ] filter received {"event"=>{"@timestamp"=>2017-06-19T03:26:39.159Z, "@version"=>"1", "host"=>"GARY-NB", "message"=>"network 網路\r"}}
[2017-06-19T11:26:39,182][DEBUG][logstash.pipeline ] output received {"event"=>{"@timestamp"=>2017-06-19T03:26:39.159Z, "@version"=>"1", "host"=>"GARY-NB", "message"=>"network 網路\r"}}
{
"@timestamp" => 2017-06-19T03:26:39.159Z,
"@version" => "1",
"host" => "GARY-NB",
"message" => "network 網路\r"
}
[2017-06-19T11:26:41,714][DEBUG][logstash.pipeline ] Pushing flush onto pipeline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment