diff --git a/app/views/shared/vue/_in_tail_format.html.erb b/app/views/shared/vue/_in_tail_format.html.erb index 483dff7..9362b37 100644 --- a/app/views/shared/vue/_in_tail_format.html.erb +++ b/app/views/shared/vue/_in_tail_format.html.erb @@ -27,7 +27,9 @@
{{{ highlightedLines }}}
- TODO: grok reference +
+ <%= raw t('fluentd.settings.grok_manual') %> +
diff --git a/config/locales/translation_en.yml b/config/locales/translation_en.yml index 2b4c38d..f458e3b 100644 --- a/config/locales/translation_en.yml +++ b/config/locales/translation_en.yml @@ -105,6 +105,42 @@ en: recent_errors: "Recent %{count} Errors" settings: restart_from_first: Restart from first + grok_manual: | +

+ Grok syntax, for example, %{INT:foo} pattern given then translate to /(?<foo>(?:[+-]?(?:[0-9]+)))/ regexp. +

+

+ Available key/value are here. +

+ +

Example

+ +

+ Nov 29 17:02:55 MacBook-Pro-2.local UserEventAgent[239] : cannot find fw daemon port 1102 the log you have,
+ %{MONTH:month}%{SPACE}%{MONTHDAY:day} %{TIME:time} %{DATA} \[%{INT:pid}\] for matching that, you will gain following result. +

+ + + + + + + + + + + + + + + + + + + + + +
KeyValue
monthNov
day29
time17:02:55
pid239
in_tail_option_guide: | See in_tail Plugin or Fluentular for more details. diff --git a/config/locales/translation_ja.yml b/config/locales/translation_ja.yml index d86eb7e..39e32ee 100644 --- a/config/locales/translation_ja.yml +++ b/config/locales/translation_ja.yml @@ -108,6 +108,41 @@ ja: in_tail_option_guide: | in_tailプラグインの解説ページFluentularもご参照ください。 + grok_manual: | +

+ Grokの記法が使えます。例えば%{INT:foo}とすると、/(?<foo>(?:[+-]?(?:[0-9]+)))/という正規表現に変換されます。 +

+

+ 使えるキー・値についてはリファレンスをご確認ください。 +

+

+

+ + Nov 29 17:02:55 MacBook-Pro-2.local UserEventAgent[239] : cannot find fw daemon port 1102というログに対し、
+ %{MONTH:month}%{SPACE}%{MONTHDAY:day} %{TIME:time} %{DATA} \[%{INT:pid}\]というパターンを適用すると以下の結果が得られます。 + + + + + + + + + + + + + + + + + + + + + +
キー名
monthNov
day29
time17:02:55
pid239
+

show: <<: *fluentd_common edit: