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

Gostatsd with Graphite backend send log to stderr #426

Open
barrowkwan opened this issue Dec 3, 2021 · 3 comments
Open

Gostatsd with Graphite backend send log to stderr #426

barrowkwan opened this issue Dec 3, 2021 · 3 comments

Comments

@barrowkwan
Copy link

I am not sure what option to make the log not to send to stderr. Right now even INFO log will send to stderr.

Here is our configuration:

server-mode = 'standalone' # input is aggregated and sent to backend
ignore-host = true
metrics-addr = ':8125'
backends = ['graphite']
flush-interval = '10s'
max-readers = 8
max-parsers = 8
max-workers = 8
max-concurrent-events = 1024
max-queue-size = 100000
bad-lines-per-minute = 100 # don't put too much space for trash metrics
expiry-interval='1h'
log-raw-metric = true
[graphite]
address = "carbon-relay-ng.monitoring:2033"
dial_timeout = '15s'
write_timeout = '30s'
mode = 'legacy' 
global_suffix = ''

Here is the log in GCP, in textPayload the message severity is level=info

{
insertId: "xxxxxxxxxxxx"
labels: {
compute.googleapis.com/resource_name: "gke-xxxx-s-1f2202f0-xsp3"
k8s-pod/app: "gostatsd"
k8s-pod/pod-template-hash: "78c89b6648"
}
logName: "projects/xxxx-01/logs/stderr"
receiveTimestamp: "2021-12-03T22:24:29.492892849Z"
resource: {
labels: {
cluster_name: "xxxxxxx-apps"
container_name: "gostatsd"
location: "asia-southeast1"
namespace_name: "monitoring"
pod_name: "gostatsd-78c89b6648-qdrg8"
project_id: "xxxx-01"
}
type: "k8s_container"
}
severity: "ERROR"
textPayload: "time="2021-12-03T22:24:27Z" level=info msg="[{timer, myapp.api.ping.GET.latency, 0.055000, , } {counter, myapp.api.ping.GET.status.200, 1.000000, , } {timer, myapp.api_aggregate.latency, 0.055000, , } {counter, myapp.api_aggregate.status.200, 1.000000, , }]"
"
timestamp: "2021-12-03T22:24:27.885278648Z"
}
@barrowkwan
Copy link
Author

Is it because of the log-raw-metric option?

@tiedotguy
Copy link
Collaborator

Yep - that's intended for debugging, it's basically logging the decoded udp packet, not the aggregated data on flush.

@barrowkwan
Copy link
Author

@tiedotguy thanks!

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

3 participants
@barrowkwan @tiedotguy and others