-
Notifications
You must be signed in to change notification settings - Fork 40
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
Separate logging for each namespace #73
Comments
Hi @collimarco ,
kubectl create secret generic logzio-logs-secret \
--from-literal=logzio-log-shipping-token-1='<<SHIPPING-TOKEN-1>>' \
--from-literal=logzio-log-shipping-token-2='<<SHIPPING-TOKEN-2>>' \
... ADD MORE TOKENS IF NEEDED ...
--from-literal=logzio-log-listener='https://<<LISTENER-HOST>>:8071' \
-n monitoring
env:
- name: LOGZIO_LOG_SHIPPING_TOKEN_1
valueFrom:
secretKeyRef:
name: logzio-logs-secret
key: logzio-log-shipping-token-1
- name: LOGZIO_LOG_SHIPPING_TOKEN_2
valueFrom:
secretKeyRef:
name: logzio-logs-secret
key: logzio-log-shipping-token-2
... REST OF ENV VARS ...
Note that in this snippet it's not the entire config for the Logzio output, I just copied the part you'd need to edit. Full config can be found here. Once all of these changes are applied, I think you should accomplish what you wanted. |
@mirii1994 Thank you! Very appreciated. It would be possible to keep the Logz.io configs inside their own namespace? In your example everything would be stored in a global "monitoring" namespace. I am wondering if each team, which owns only the namespace for their app, can configure logging using only their app namespace (and not the global "monitoring" namespace). |
That's an interesting idea. |
@collimarco Closing this issue as your original question was answered :) |
Hello,
I have a Kubernetes cluster with multiple applications (i.e. different websites), each one in its own namespace.
Each application should send the logs (only for that specific app / namespace) to a different Logz.io account.
Is it possible to achieve that?
Basically I would like logging limited to a specific namespace, and not for the whole cluster.
The text was updated successfully, but these errors were encountered: