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

feat: added support for reading locally generated file logs via vector inst… #5166

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

aayushdhiman01
Copy link

@aayushdhiman01 aayushdhiman01 commented Jun 29, 2024

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Added the code for reading locally generated file logs via vector instance, but need to verify that local logs are coming, can u guide how to check that?

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@aayushdhiman01 aayushdhiman01 requested a review from a team as a code owner June 29, 2024 08:11
@aayushdhiman01 aayushdhiman01 changed the title added support for reading locally generated file logs via vector inst… feat: added support for reading locally generated file logs via vector inst… Jun 29, 2024
@aayushdhiman01 aayushdhiman01 marked this pull request as draft July 1, 2024 04:06
@aayushdhiman01 aayushdhiman01 marked this pull request as ready for review July 1, 2024 04:08
@lsampras
Copy link
Member

lsampras commented Jul 1, 2024

Hey @aayushdhiman01 ,
Can you take a look at this for reference.

So the logs would be written in a shared local folder and we mount that folder in vector to read them,

You can enable file logging via the config file(development/docker_compose.toml),

The vector/loki/grafana cotainers can be run via docker compose --profile monitoring up -d

@lsampras lsampras added A-infra Area: Infrastructure C-feature Category: Feature request or enhancement labels Jul 1, 2024
@aayushdhiman01 aayushdhiman01 requested a review from a team as a code owner July 2, 2024 09:39
@aayushdhiman01
Copy link
Author

@lsampras can you check the changes made, mounted the logs folder in vector , in docker-compose file and enabled file logging in development.toml and docker_compose.toml file.

config/docker_compose.toml Outdated Show resolved Hide resolved
config/development.toml Outdated Show resolved Hide resolved
monitoring/docker-compose.yaml Show resolved Hide resolved
monitoring/docker-compose.yaml Outdated Show resolved Hide resolved
monitoring/docker-compose.yaml Outdated Show resolved Hide resolved
Copy link
Member

@lsampras lsampras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add extra labels to distinguish between file & console logs,
can add a label like source = console/file

Also can you share screenshots of the file logs in loki

config/vector.yaml Outdated Show resolved Hide resolved
config/vector.yaml Outdated Show resolved Hide resolved
config/vector.yaml Outdated Show resolved Hide resolved
@aayushdhiman01
Copy link
Author

aayushdhiman01 commented Jul 5, 2024

@lsampras i am not able to connect to loki server in grafana,monitoring containers are running. Made the commented changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-infra Area: Infrastructure C-feature Category: Feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(logging): add support for reading locally generated file logs via vector instance
2 participants