-
Notifications
You must be signed in to change notification settings - Fork 669
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
Allow Logging format to be changed #965
Comments
Hi @gallowaystorm, is the |
How can I use that with the Helm chart? |
helm install ...... --set cmdOptions.logging-format=json @gallowaystorm This should get you going ❯ helm install test . --dry-run --set cmdOptions.logging-format=json | grep -A2 logging
- "--logging-format"
- "json"
- "--v"
|
Thank you I will try this! |
@harshanarayana what is the default setting for this |
Also that did not help the issue in Datadog. It did change the log format however |
@gallowaystorm could you give more details on what the issue in Datadog is? Some sample output or screenshots would help, I don't know if they are looking for a specific format or what that format you need is |
We just use the klog library to set our logs, which should also handle the json formatting, so I'm not sure why it wouldn't be passing the severity. Could you try setting |
@harshanarayana ah you may be right, I bumped that issue and will try to figure out what still needs to be done for it |
@damemi I tried to set the skip headers via our helm release in Terraform (how we do helm releases) and it does not seem possible to do so:
Log from DD: Error: unknown command "true" for "descheduler" Seems like that flag does not allow a Boolean |
@gallowaystorm I think the problem is actually closer to #811 like @harshanarayana mentioned. But it's worth unsticking this just to see Running locally, the following commands work:
but this one gives the
since we don't add a
|
That did not make the logging error any better, however it did make the logs easier to read... I then tried the logtostderr method with: resource "helm_release" "descheduler" {
chart = local.service_name
name = "${local.service_name}-${var.environment}"
namespace = local.namespace
repository = "https://kubernetes-sigs.github.io/descheduler/"
version = "0.24.1" # APP VERSION v0.24.1
set {
name = "cmdOptions.logtostderr"
value = "false"
}
} This still seemed to not do the trick... |
Any updates on this? |
Hi @gallowaystorm, thanks for bumping this. This issue is in our usage of logging libraries from upstream Kubernetes and their default output streams. I dug around some more and found this issue which also had to do with DataDog integration: #676 It sounds like #676 (comment) describes a datadog workaround to redirect logs to the right log level based on parsing the lines. This might un stick you until we fix our own implementation. |
@gallowaystorm have you tried a combination of |
That workaround in #676 did the trick for our needs. However, because of the workaround depending on the headers being on the logs, we can now no longer remove the headers. Will this be fixed in any future releases? |
@gallowaystorm I'm glad that worked for you. Yes, there appears to be some issue in our logging as others have also reported issues with logs so we will be discussing this at our next project meeting |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Is your feature request related to a problem? Please describe.
Yes it is related to a problem. When sending the logs to Datadog, all logs show as errors because I cannot switch them to a format that Datadog excepts. This means that all logs are errors even if they are just info level logs.
Describe the solution you'd like
The ability to change the format of the logs.
Describe alternatives you've considered
none
What version of descheduler are you using?
descheduler version: Helm 0.24.1
Additional context
The text was updated successfully, but these errors were encountered: