-
Notifications
You must be signed in to change notification settings - Fork 72
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
As a korifi operator I want to be able to use my own log cache endpoint #3668
Comments
Hi, CF for VMs suports various log types which practically are the app logs themselves combined with the logs written from the platform components and a related to an app. An example would be: access logs, staging logs, app restarts, rescheduling and similar. All these logs are stored in Log Cache and are available through the Log Cache API. It would be nice to have all these app and app lifecycle logs available, but we should find out how and where to get them from. I've tested and compared what kind of logs are being printed out with During my tests I've seen so far The other aspect to think about is that CF for VMs follows the Loggregator API format and observability metadata, if we want to use the same format and where and how do we get the data from. In regards to the I guess, the The one important thing to think about is how to collect and merge the logs and metrics in a single output(api) in case an app has multiple instances (a workload with multiple pods). For implementation of the API we could take a look at the log-cache-release and the log-cache-cf-cli plugin. It will be interesting to check and decide if a simple API facade on top of the k8s API would be enough or we need a central cache component which will collect everything and serve the data with the Log Cache API. Update: Log Cache uses Syslog to inject logs and metrics, but in k8s Syslog is barely used, so if we need to have a short term storage to serve the Log Cache API, we could take one of the shelf observability backends and put an API facade in front of it. It is suggested that Log Cache stores the data for at least 15 minutes. btw. I'm one of the maintainers of the Loggregator, the CF's logging and metrics stack and I want to help ;) |
@chombium thank you for your input! All your observations are correct, however we are thinking about a very minimal "batteries-included" implementation of the log-cache api to get the most basic behaviour. This of course leaves the door open for anyone to bring their own log cache that will have to do all the things you talk about in your comment. As of today Korifi's API already provides a minimal The problematic part is the fetching of app metrics. Towards the end of the Our idea is to push the metrics fetching code behind the TL;DR We do not have the capacity to implement log cache properly, but we want to enable Korifi users to bring their own. |
Hi @georgethebeatle, If we implement the Log Cache API fasade properly it will be easy for someone to get their own backend and plug it in. I see that the Log Cache API handler for Logs has a defined interface which is good. I guess we should do something for logs as well.
This is indeed a problem. The Metrics Server README states explicitly that it should not be used for forwarding metrics to monitoring solutions and Log Cache is one API for that..
I guess we shouldn't use the use the metrics server to get the app metrics. It's sort of a gray zone for our use-case as we have a custom controller which monitors the cf apps, but it feels wrong to me. I would propose to what the others are doing about monitoring workloads running on k8s before implementing something. On the other hand we could also check if there is already something implemented in the OpenTelemetry Collector and its receivers for collecting resource consumption metrics from the workloads running in the cluster. I'll take a look at this. |
Hi @chombium
The log cache REST API IS the facade. The way we envision it is that we would have a helm value where users would be able to specify where (the url) their real, fancy, open-telemetry-based, whatever logcache implementation is. As @georgethebeatle said, we do not have the capacity to implement logcache properly. We also do not want to support a pluggable logcache implementation for k8s - that is a completely unrelated project. Furthermore, Korifi is a CF API implementation, therefore logcache should not be implemented at all in the first place. We have this very basic and naive "batteries-included" implementation to only facilitate cases where users just want to play with Korifi (and do not want to install additional stuff), or are happy to accept abusing the metrics server. |
Hi @danail-branekov , I completely agree with what you've written. We should add the basic functionality so that |
Closing in favour of the sub-issues |
Dev Notes
api/v1/read
log cache endpoint in order to get logs for appapi/v1/query
in the log cache handler and make the process stats repository loop back to this endpointThe text was updated successfully, but these errors were encountered: