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

Server side logs #30

Open
moshloop opened this issue Oct 27, 2022 · 2 comments
Open

Server side logs #30

moshloop opened this issue Oct 27, 2022 · 2 comments

Comments

@moshloop
Copy link
Member

moshloop commented Oct 27, 2022

Add a new log backend for retrieving logs on disk:

file:
   - labels:
         name: acmehost
         type: Nginx
     path:
        - /var/log/access.log

A query with labels name=achmehost,type=Nginx will then read logs from the file, line by line

@adityathebe
Copy link
Member

For file searching, what level of support is required for the SearchParams?

  1. Is pagination support required? It's not clear to me whether the Limit search param is a limit per page or for the whole result.
    https://github.com/flanksource/apm-hub/blob/main/api/logs/logs.go#L39
  2. The timestamps cannot be retrieved reliably from a log file. It varies based on the type of log file. Unless, only few set of log types are supported, I'm not sure if this data can be extracted.
  3. What do the params Type & Id mean in terms of searching a log file?

@moshloop
Copy link
Member Author

@adityathebe

Is pagination support required?

No

The timestamps cannot be retrieved reliably from a log file.

You can set them all as the last modified date of the file

What do the params Type & Id mean in terms of searching a log file?

They have no meaning when searching a log file, they are used purely to identify which config to use.

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