You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Under python3 the LogService._get_raw_data fails with an exception when undecodable bytes are read from a log file (e.g. the file encoding is different from what locale.getpreferredencoding() specifies or some garbage data is logged by the monitored application). This blocks any LogService-based collector until a log rotation happens or Netdata is restarted (the method will retry reading the same line every time it is invoked).
OS / Environment
Arch Linux, python3.7
Netdata version (ouput of netdata -V)
v1.12.0-46-gf1d69813 (built from master)
Component Name
collectors/python.d.plugin
Steps To Reproduce
As an example with fail2ban module:
head -c 200 < /dev/urandom >> /var/log/fail2ban.log
This will result with having error.log flooded with
python.d ERROR: fail2ban: fail2ban: update() unhandled exception: 'utf-8' codec can't decode byte 0xbd in position 0: invalid start byte
Expected behavior
_get_raw_data ignores the encoding errors by skipping invalid bytes or the entire line.
The text was updated successfully, but these errors were encountered:
Bug report summary
Under python3 the LogService._get_raw_data fails with an exception when undecodable bytes are read from a log file (e.g. the file encoding is different from what
locale.getpreferredencoding()
specifies or some garbage data is logged by the monitored application). This blocks any LogService-based collector until a log rotation happens or Netdata is restarted (the method will retry reading the same line every time it is invoked).OS / Environment
Arch Linux, python3.7
Netdata version (ouput of
netdata -V
)v1.12.0-46-gf1d69813 (built from master)
Component Name
collectors/python.d.plugin
Steps To Reproduce
As an example with fail2ban module:
This will result with having error.log flooded with
Expected behavior
_get_raw_data ignores the encoding errors by skipping invalid bytes or the entire line.
The text was updated successfully, but these errors were encountered: