Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to use readall parameter for separate paths? #155

Open
lprzybylowicz opened this issue May 31, 2021 · 2 comments
Open

Is it possible to use readall parameter for separate paths? #155

lprzybylowicz opened this issue May 31, 2021 · 2 comments

Comments

@lprzybylowicz
Copy link

Is it possible to use readall parameter for separate paths? I dont see that in documentation. Te following configuration doesnt work:

input:
type: file
paths:
- '/var/log/ecs/ecs-agent.log*'
- '/var/log/host-logs/cloud-init.log*'
readall: false

  • type: counter
    name: cloudinit_errors
    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.

@fstab
Copy link
Owner

fstab commented May 31, 2021

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.

@lprzybylowicz
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants