elasticsearch官档翻译-日志存储:Logstash 入门>Logstash基础例子

To test your Logstash installation, run the most basic Logstash pipeline:

测试你的Logstash安装,运行最基础的Logstash管道

cd logstash-2.3.0
bin/logstash -e 'input { stdin { } } output { stdout {} }'

The -e flag enables you to specify a configuration directly from the command line. Specifying configurations at the command line lets you quickly test configurations without having to edit a file between iterations. This pipeline takes input from the standard input, stdin, and moves that input to the standard output, stdout, in a structured format.

可以使用-e 参数在命令行上指定目录。这种方式不用编辑文件。

Once "Logstash startup completed" is displayed, type hello world at the command prompt to see Logstash respond:

一旦显示"Logstash startup completed" ,在命令行输入hello world 看logstash的响应

hello world
2013-11-21T01:22:14.405+0000 0.0.0.0 hello world

Logstash adds timestamp and IP address information to the message. Exit Logstash by issuing a CTRL-Dcommand in the shell where Logstash is running.

Logstash 添加了时间戳和ip信息到了message。退出Logstash可以使用CTRL-D命令。

The Advanced Tutorial expands the capabilities of your Logstash instance to cover broader use cases.

高级的指南可: 查看Logstash示例更多的功能

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 134,923评论 18 139
  • JavaScript - 继承和类 在这一篇中,我要聊聊 JavaScript 中的继承和“类”。 首先跟你请教下...
    NARUTO_86阅读 296评论 0 2
  • 你相信世界上有死神吗? 没错就是专门收走别人灵魂的死神! 我叫默,默默无语的默,人如其名,我也一样,我不喜欢热闹,...
    淡忘曾经阅读 366评论 0 0
  • 老陈从北京出差回来做的第一件事是在我们几个老友的微信群里大喊了一句,我TMD恋爱了,快来个人给我贺喜。 先不管老陈...
    多啦a梦b阅读 226评论 1 1
  • 房价的飞速增长,为许多人增加了投资的路径,也为许多人增添了众多的苦恼。买房对投资来说是大事,但对于普通人来说更是大...
    Erin棋落阅读 317评论 2 0