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

logdog should collect all available log files for ECS CNI plugins #1481

Closed
samuelkarp opened this issue Apr 12, 2021 · 2 comments
Closed

logdog should collect all available log files for ECS CNI plugins #1481

samuelkarp opened this issue Apr 12, 2021 · 2 comments
Assignees
Labels
area/ecs ECS type/enhancement New feature or request
Milestone

Comments

@samuelkarp
Copy link
Contributor

samuelkarp commented Apr 12, 2021

What I'd like:
As part of enabling the ECS awsvpc networking mode for Bottlerocket (#1246), several new ECS-related components (CNI plugins) are added to Bottlerocket. As independent components, they do not share the log file that is used by the ECS agent itself. These components do their own log file rotation by writing files with hourly timestamp suffixes (and one of them even uses the hourly timestamp suffixed file name for the current log file), with file names like vpc-branch-eni.log.2021-04-09-00. Today, there is no mechanism to specify a non-static log file name with logdog, so logdog cannot collect any log files with hourly timestamp suffixes.

Any alternatives you've considered:
Here are some potential approaches

  1. Enable logdog to specify file paths with wildcards. Wildcards would enable us to specify a pattern of files to collect and is very flexible. However, the flexibility makes wildcards somewhat complicated (we'd need to define the exact rules we want to use for expansion) and we may not really need that level of flexibility.
  2. Enable file prefixes with logdog. Rather than an arbitrary pattern, prefixes are less complicated and easier to reason about. Prefixes adequately cover all of the ECS-related use-cases; none of the log files ever change the beginning of their names.
  3. Collect whole directories rather than just files. We could add a new directory directive to logdog’s configuration file. When a directory is specified, logdog includes the contents of the whole directory. For ECS, all of the log files are contained in /var/log/ecs, even rotated ones.
@samuelkarp samuelkarp added area/ecs ECS status/needs-triage Pending triage or re-evaluation labels Apr 12, 2021
@jhaynes jhaynes added this to the next milestone Apr 12, 2021
@jhaynes jhaynes added priority/p1 type/enhancement New feature or request and removed status/needs-triage Pending triage or re-evaluation labels Apr 12, 2021
@tjkirch
Copy link
Contributor

tjkirch commented Apr 12, 2021

However, the flexibility makes wildcards somewhat complicated (we'd need to define the exact rules we want to use for expansion)

I think we can use the glob crate and get a syntax that's widely understood, since it mimics shell wildcards. It's strictly more powerful, and easier to implement, too.

@srgothi92 srgothi92 added status/in-progress This issue is currently being worked on and removed status/notstarted labels Apr 19, 2021
@srgothi92
Copy link
Contributor

Fixed in PR-1509

@bcressey bcressey removed the status/in-progress This issue is currently being worked on label Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ecs ECS type/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants