Skip to content

Gostatsd with Graphite backend send log to stderr #426

Open
@barrowkwan

Description

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"
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions