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

How to do ignore rules in kubernetes? #497

Open
vorandrew opened this issue Apr 18, 2023 · 4 comments
Open

How to do ignore rules in kubernetes? #497

vorandrew opened this issue Apr 18, 2023 · 4 comments

Comments

@vorandrew
Copy link

My cluster sending too much logs, Can I ignore\include patterns?

@jakedipity
Copy link
Contributor

You can use the LOGDNA_EXCLUSION_RULES or LOGDNA_INCLUSION_RULES environment variables with a glob like pattern to include/exclude files and directories from monitoring. There's also a regex equivalent for these. More information can be found here

@vorandrew
Copy link
Author

vorandrew commented Apr 22, 2023

You are not overriding. Same for exclusion rules

extraEnv:
  - name: LOGDNA_INCLUSION_RULES
    value: /var/log/pods/dev-**

Still gives me - "*.log"

Because of INFO config: read the following options from cli, env and config:

log:
  dirs:
    - /var/log/
  include:
    glob:
      - "*.log"
      - /var/log/pods/dev-**

@vorandrew
Copy link
Author

vorandrew commented May 12, 2023

@jakedipity News?

@dkhokhlov
Copy link
Contributor

dkhokhlov commented May 19, 2023

@vorandrew

this log & journald options should work:

log:
  dirs:
    - /var/log/containers
  include:
    glob:
      - "*/dev-*.log"
    regex: []
  exclude:
    glob: []
    regex: []
journald:
  systemd_journal_tailer: false

Notes:

But unfortunately there is an issue with env vars. Need to use config file to override "log dirs" and put config somewhere on host and define LOGDNA_CONFIG_FILE.

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

3 participants