Open lprzybylowicz opened 3 years ago
readall
can only be set on a global level, not per metric. It's intended for debugging, because in production you usually want to see log events that are currently happening, and not events that have been logged since the last logrotate.
Thank you for the answer. But in the above case - cloud-init is run before grok-exporter, so there is no way for the grok to know any errors that happened before.
Is it possible to use readall parameter for separate paths? I don
t see that in documentation. Te following configuration doesn
t work:input: type: file paths:
help: Errors occured in cloudinit script execution. match: '%{ERROR_LINE:line}' path: /var/log/host-logs/cloud-init.log* labels: logfile: '{{base .logfile}}' line: '{{.line}}' readall: true
The cloudinit_errors metric doesn`t read whole /var/log/host-logs/cloud-init.log file.