Atom - Fluentd Config File syntax highlighting
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

116 lines
2.7 KiB

  1. # Receive events from 24224/tcp
  2. # This is used by log forwarding and the fluent-cat command
  3. <source>
  4. @type forward
  5. port 24224
  6. str1a_param "foo"
  7. str1b_param "foo
  8. bar"
  9. str2a_param 'foo'
  10. str2b_param 'foo
  11. bar'
  12. str2c_param "foo\nbar" # \n is interpreted as actual LF character
  13. array_param [
  14. "a", "b"
  15. ]
  16. hash_param {
  17. "k": "v",
  18. "k1": 10
  19. }
  20. host_param "#{Socket.gethostname}" # host_param is actual hostname like `webserver1`.
  21. env_param "foo-#{ENV["FOO_BAR"]}" # NOTE that foo-"#{ENV["FOO_BAR"]}" doesn't work.
  22. tag "test.#{ENV['PROJECT_NAME']}"
  23. </source>
  24. <source>
  25. @type tail
  26. @label @SYSTEM
  27. </source>
  28. # http://this.host:9880/myapp.access?json={"event":"data"}
  29. <source>
  30. @type http
  31. port 9880
  32. </source>
  33. <filter foo.bar>
  34. @type record_transformer
  35. <record>
  36. hostname "#{Socket.gethostname}"
  37. tag ${record["project_name"]}.scope.${tag}_old
  38. key.flatten x
  39. </record>
  40. </filter>
  41. <match myapp.access yourapp.access>
  42. @type file
  43. path /var/log/fluent/access
  44. </match>
  45. <label @SYSTEM>
  46. <filter var.log.middleware.**>
  47. @type grep
  48. # ...
  49. </filter>
  50. <match **>
  51. @type s3
  52. include_tag_key true
  53. buffer_chunk_limit 2M
  54. buffer_queue_limit 32
  55. flush_interval 5s
  56. # ...
  57. </match>
  58. </label>
  59. <system>
  60. # equal to -qq option
  61. log_level error
  62. # equal to --without-source option
  63. without_source
  64. # ...
  65. </system>
  66. # Include config files in the ./config.d directory
  67. @include config.d/*.conf
  68. # =======================
  69. # v1_literal_example.conf
  70. # =======================
  71. <section1>
  72. key1 'text' # text
  73. key2 '\'' # ' (1 char)
  74. key3 '\\' # \ (1 char)
  75. key4 '\t' # \t (2 char)
  76. key5 '\[' # \[ (2 char)
  77. key6 '\\[' # \[ (2 char)
  78. key7 '#t' # #t (2 char)
  79. key8 '\#{test}' # \#{test} (8 char)
  80. key9 '#{test}' # #{test} (7 char)
  81. key10 '\[(?<time>[^\]]*)\] (?<message>.*)' # \[(?<time>[^\]]*\] (?<message>.*)
  82. </section1>
  83. <section2>
  84. key1 "text" # text
  85. key2 "\"" # " (1 char)
  86. key3 "\\" # \ (1 char)
  87. key4 "\t" # TAB (1 char)
  88. key5 "\[" # [ (1 char)
  89. key6 "\\[" # \[ (2 char)
  90. key7 "#t" # #t (2 char)
  91. key8 "\#{test}" # #{test} (7 char)
  92. key9 "#{test}" # replaced by eval('test')
  93. key10 "\\[(?<time>[^\\]]*)\\] (?<message>.*)" # \[(?<time>[^\]]*\] (?<message>.*)
  94. </section2>
  95. <section3>
  96. key1 text # text
  97. key2 \ # \ (1 char)
  98. key3 \\ # \\ (2 char)
  99. key4 \t # \t (2 char)
  100. key5 \[ # \[ (2 char)
  101. key6 \\[ # \\[ (3 char)
  102. key7 #t # #t (2 char)
  103. key8 \#{test} # \#{test} (8 char)
  104. key9 #{test} # #{test} (7 char)
  105. key10 \[(?<time>[^\]]*)\] (?<message>.*) # \[(?<time>[^\]]*\] (?<message>.*)
  106. </section3>