Skip to content

Commit

Permalink
Fix fluent-bit.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-tan committed Mar 29, 2021
1 parent 2b84eea commit b62f123
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/ep3/extensions/cwl-metrics/conf/fluent-bit-parsers.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[PARSER]
Name telegraf
Format json
Read_from_Head True
Time_Key timestamp
Time_Keep On
17 changes: 17 additions & 0 deletions lib/ep3/extensions/cwl-metrics/conf/fluent-bit.conf
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
[SERVICE]
Parsers_File ${EP3_EXT_PATH}/cwl-metrics/conf/fluent-bit-parsers.conf

[INPUT]
Name tail
Path ${MEDAL_TMPDIR}/metrics/container-metrics.json
Parser telegraf

[FILTER]
Name lua
Match *
script time.lua
call float_time

[FILTER]
Name parser
Match *
Key_Name log
Parser telegraf

[OUTPUT]
Name es
Match *
Host ${ES_HOST}
Port ${ES_PORT}
Index metrics
Time_Key timestamp
3 changes: 3 additions & 0 deletions lib/ep3/extensions/cwl-metrics/conf/time.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function float_time(tag, timestamp, record)
return 1, record["Timestamp"], record
end

0 comments on commit b62f123

Please sign in to comment.