Getting Started with Logstash 1

Stashing your first event

让我们启动logstash的学习!
通过运行一个最最基础的Logstash pipeline来验证一下我们的Logstash安装。
 pipeline: 管道, 这个就是Linux/Unix中管道的概念。此处不做解释
Logstash 管道需要两个元素: inputoutput,经常还会配置可选元素:filter。 输入、过滤、输出,这就是一个标准的信息处理组件、很多个这种组件chain起来,就可以完成复杂的功能需求。在Logstash中,input、output、filter分别有许多plugin(插件),通过输入插件,从数据源中读取数据,filter插件按照配置修改数据,输出插件将数据写入目标端……
logstash description
为了测试我们安装的Logstash,我们来运行一个最基础的Logstash管道:
logstash -e 'input { stdin {} } output { stdout {} }'
上例中,-e 选项让我们直接从命令行中获取logstash配置(一般是用配置文件的),这个基础示例中,我们从标准输入(stdin)中获取输入数据,将数据输出到标准输出(stdout)—— 输出时会使用logstash结构化后的格式(最起码得添加个时间戳对、主机名吧?)
Logstash启动并不迅捷,等到看到“Pipeline main stated”才表示启动完毕,我们输入 hello word
[2017-11-19T22:32:20,445][INFO ][logstash.pipeline ] Pipeline started {"pipeline.id"=>"main"}
The stdin plugin is now waiting for input:
[2017-11-19T22:32:20,471][INFO ][logstash.agent ] Pipelines running {:count=>1, :pipelines=>["main"]}
hello world
2017-11-19T14:32:28.326Z bogon hello world
可以看到,上例中,Logstash将我们在标准输入中键入的hello world添加了时间戳、主机名(也可能是IP),显示在标准输出上。CTRL-D 或者 CTRL-C 中断这个运行着的Logstash pipeline。
如果获得上述结果,我们已经成功创建了一个最基础的Logstash pipeline。可喜可贺,很多开源项目的配置都是死在第一步的…… 接下来我们就需要学习创建更多的具有实际意义的pipeline。

 在整个ELK的学习过程中,我们最终是需要在Aix之类的传统平台上进行日志搜集、管理的,写这篇文章的时候,我还完全没有头绪(Aix平台一般都是正在运行的生产环境,升级个JDK都不太可能,更何况Logstash依赖于JRuby好像,IBM JDK可不见得有这个;Filebeat是go语言实现的,Aix上好像没有go编译器),只知道可能使用Logstash-Forwarder-Java是一个可行的方案 

82 Comments

  1. Pingback: balenciaga coca cola black

  2. Pingback: baby bibs with snaps youtube.com

  3. Pingback: more uptempo 96 pinterest.com

  4. Pingback: lebron 13 xiii gs america captain sport red blue hero uk trainers

  5. Pingback: best price sunglasses online

  6. Pingback: air max 2017 bronzy uk trainers

  7. Pingback: adidas zx flux gold white

  8. Pingback: big boys nba shoes womens kyrie 2

  9. Pingback: reebok classics spring summer 2013 lookbook uk trainers

  10. Pingback: puma puma classic sneakers

  11. Pingback: 2016 sparkly shoes nike crystal air zoom structure 18

  12. Pingback: 褋械褉褘泄 mens nike air max humara

  13. Pingback: asics gel nimbus 17 rio red

  14. Pingback: uk trainers lebron soldier 10 gs brassiness

  15. Pingback: nike free mens nike free 30 v3 2013

  16. Pingback: rouge bleu blanc femmes nike air max 90 87

  17. Pingback: uk trainers air jordan flight 45 black grey

  18. Pingback: us army pt uniform pinterest.com

  19. Pingback: volt lyser酶d adidas yeezy desert rat 500

  20. Pingback: uk trainers asics gel liquid gold sienna

  21. Pingback: uk trainers baby old skool vans

  22. Pingback: nike air max 270 black mens

  23. Pingback: mens adidas originals jackets originals yellow adidas superstar tracksuit coats modern

  24. Pingback: asics gel lyte 3

  25. Pingback: all naranja adidas nmd

  26. Pingback: nhl ny rangers nfl ny giants tiny heart hat white beanie

  27. Pingback: timberland men euro dub boots wheat timberland work boots discount timberland boots

  28. Pingback: adidas copa mundial 17 sky grey

  29. Pingback: nordstrom sleepyhead thermal pajamas

  30. Pingback: 2 pack boys monster toddler blanket sleepers

  31. Pingback: cheap basketball shorts wholesale

  32. Pingback: mlb new era pop series yellow green 59fifty

  33. Pingback: new balance womens fresh foam cruz v2 nubuck

  34. Pingback: womens puma rihana

  35. Pingback: huarache 50 anniversary moon landing theme space grey blue aq0553 200 men shoes

  36. Pingback: womens clothing women jumpsuits warminside fall women adult one piece pajama back sign hood

  37. Pingback: eyeglasses buy prescription glasses eyeglass frames zenni optical

  38. Pingback: 10pcs lot car jdm drift rally pig key chain keyring for sti wrx like sticker decal

  39. Pingback: 2016 newest air jordan cp3 ix shoes men

  40. Pingback: check out cute newborn baby

  41. Pingback: oakley flight jacket redline matte black w prizm ruby polarized sport sunglasses

  42. Pingback: hiking hiking mh500 mens waterproof jacket blue quechua hiking clothing and

  43. Pingback: new era cap company

  44. Pingback: carolina panthers v new york giants

  45. Pingback: rose white phone sleeve case flower wallet purse

  46. Pingback: hairstyle for round face men

  47. Pingback: women tutu ballet costumes tutus tu tu dancing costumes dancewear dance supply free custom tailored service

  48. Pingback: amazon pirma 2018 monarcas morelia home jersey l sports outdoors

  49. Pingback: vans gilbert jockey caps and hats heather grey men麓s vans galaxy

  50. Pingback: girls crocs sporty crocband sandal pink

  51. Pingback: all black superstars kids

  52. Pingback: rot gelb nike hypervenom phelon ii

  53. Pingback: yellow nikes womens champs

  54. Pingback: alabama crimson tide red cuff quot breakaway quot beanie hat with pom ncaa cuffed

  55. Pingback: skechers street moda bling bandit rhinestone lace up shoe 5 38 light pink bnib skechers lowtop

  56. Pingback: brazilian fusion hair extensions

  57. Pingback: womens air max plus youth

  58. Pingback: asics gel venture 5 womens trail runner b 9720

  59. Pingback: nike kaishi ns dark blue running shoes women footwear click image to close

  60. Pingback: converse grey purple pink high tops

  61. Pingback: nike nsw h86 cap nike nsw h86 cap

  62. Pingback: blue white limited edition air jordans

  63. Pingback: men adidas red grey purple originals zx 700 trainers t

  64. Pingback: air jordan black friday 2016

  65. Pingback: new adidas outdoor brushwood mesh gtx mens hiking trail shoes gore tex brown men

  66. Pingback: michael jordan how bad do you want it inspiration youtube

  67. Pingback: womens shoesnike.com vn

  68. Pingback: bridal shoes with bow

  69. Pingback: supreme prem ltr grey grey nike

  70. Pingback: boys nike rea run 4

  71. Pingback: cheap supreme back v printed logo t shirt short

  72. Pingback: air jordan 4 university red gold white shoes 99

  73. Pingback: evospeed 1.5 tricks fg fotballsko barn

  74. Pingback: autentique maillot nba los angeles clippers blanc shorts basketball hommes soldes nike de chine gtncc539

  75. Pingback: nike lebron 15 black and yellow red for sale

  76. Pingback: nike air 97 all white swarovski shoes

  77. Pingback: cheap international football shirts

  78. Pingback: nike air jordan 4 kids negro amarillo air

  79. Pingback: ucf fiesta bowl champions t shirt hat

  80. Pingback: puma urban mobility glide suede hussein chalayan shoes black 16xv4g2w

  81. Pingback: body chains online

  82. Pingback: chanel hot pink wallet on chain woc double zip chain shoulder bag

Leave Comment