-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 send knative logs via TCP? #15745
Comments
Parsing happens here I'd honestly use fluentbit or something - I doubt anyone's done this before and I don't think we'd support this if you have problems. eg. what happens to latency in the activator when logging over the URL is slow. |
Thanks for the reply, I'll look into fluentbit setup since looks like I have no other choice. In regards to the following:
Is there something like async TCP appender for zap? (something similar to the config I mentioned for logback) |
If you dive deeper (I added some logging here):
the error is this:
b) "outputPaths": ["http://logging-agent-svc-main:5170"]
You need a custom async sink it seems as in here which you will have to register e.g. RegisterHTTPSink("http", "http://logging-agent-svc-main:5170") before you parse the configuration. However, as @dprotaso mentioned probably it is easier to handle this via parsing logs with some tooling (especially if it is already there for other purposes). |
Going to close this out as there isn't anything actionable here |
Hi, I'm looking for a way to send logs produced by knative pods to OpenSearch.
We have a standard way of doing this for our applications running in k8s:
app --[sends logs via TCP Socket Appender to]--> logging-agent --[sends to]--> Kafka --> validator/enricher --> OpenSearch
So, ideally I want to use the same mechanism for knative, with no new components installed in the k8s cluster (fluentbit, sidecars, etc).
The app logging configuration uses logback and looks like this (logging to
logging-agent-svc-main:5170
usingLogstashTcpSocketAppender
):And now I want the same thing for knative pods, but I cannot figure out how to configure it. I read the docs on logging and tried to update
config-logging
ConfigMap, i.e. addingdata.zap-logger-config
field:I looked at the zap documentation and tried to set
outputPaths
with one of the following:"outputPaths": ["logging-agent-svc-main:5170"]
"outputPaths": ["http://logging-agent-svc-main:5170"]
However, it does not work and I can see the warning message in a knative pod (e.g., controller) during the start:
Could you suggest the way this can be done, please?
The text was updated successfully, but these errors were encountered: