direktiv / vorteil

turn your applications and containers into micro virtual machines
https://direktiv.io
Apache License 2.0
174 stars 13 forks source link

system level logging does not report utilisation information #117

Closed wwonigkeit closed 3 years ago

wwonigkeit commented 3 years ago

Problem description

When the following configuration is applied:

[[logging]]
  config = ["Name=tcp", "Host=35.201.9.144", "Port=3000", "Format=json"]
  type = "system"

[[logging]]
  config = ["Name=tcp", "Host=35.201.9.144", "Port=3000", "Format=json"]
  type = "kernel"

Kernel messages are received, however, the system messages with the CPU, memory, disk and network information is not received.

Expected behaviour

Expect to see these types of messages

[{"date":1570599209.000048,"cpu_p":13.000000,"user_p":12.000000,"system_p":1.000000,"cpu0.p_cpu":13.000000,"cpu0.p_user":12.000000,"cpu0.p_system":1.000000},{"date":1570599210.000038,"cpu_p":99.000000,"user_p":93.000000,"system_p":6.000000,"cpu0.p_cpu":99.000000,"cpu0.p_user":93.000000,"cpu0.p_system":6.000000},{"date":1570599211.000217,"cpu_p":89.000000,"user_p":87.000000,"system_p":2.000000,"cpu0.p_cpu":89.000000,"cpu0.p_user":87.000000,"cpu0.p_system":2.000000},{"date":1570599212.000099,"cpu_p":0.000000,"user_p":0.000000,"system_p":0.000000,"cpu0.p_cpu":0.000000,"cpu0.p_user":0.000000,"cpu0.p_system":0.000000},{"date":1570599213.000217,"cpu_p":0.000000,"user_p":0.000000,"system_p":0.000000,"cpu0.p_cpu":0.000000,"cpu0.p_user":0.000000,"cpu0......

Actual behaviour

Only kernel messages are received.

Steps to reproduce

Configure the vcfg file with:

[[logging]]
  config = ["Name=tcp", "Host=35.201.9.144", "Port=3000", "Format=json"]
  type = "system"

[[logging]]
  config = ["Name=tcp", "Host=35.201.9.144", "Port=3000", "Format=json"]
  type = "kernel"

System details

Please include details about the system that the issue can be reproduced on, including:

Version: 0.5.6 Ref: 764564e Released: Wed, 28 Oct 2020 01:00:09 +0000 Verified on AWS & GCP

wwonigkeit commented 3 years ago

Issue is with the latest version of FluentBit. The TCP stream is sent without a newline delimiter which causes the TCP logstash pipeline to buffer all of the performance information.

Changed the vcfg file to the following:

[[logging]]
  config = ["Name=http", "Host=35.201.9.144", "Port=3000", "Format=json"]
  type = "system"

and configured logstash to accept HTTP messages instead of TCP