cockroachdb/kubernetes在stackdriver上记录了很多错误 [英] cockroachdb/kubernetes logging lots of errors on stackdriver
问题描述
我刚刚从一个非常讨厌的gcp账单中注意到,cockroachDB在stackdriver上记录了1.5tb的错误,在短短几天之内使我损失了几百美元.可悲的是,我将其留在了100%的日志记录中.错误看起来像这样,并且每秒堆积多次.
I've just noticed from a very nasty gcp bill that cockroachDB has logged 1.5tb of errors on stackdriver, costing me several hundred dollars in just a few days. Sadly I had left it on 100% logging. The errors look like this and are piling up multiple times per second.
E I180712 11:18:41.963205 106 server/status/runtime.go:223 [n2]
runtime stats: 1.5 GiB RSS, 283 goroutines, 254 MiB/54 MiB/441 MiB GO alloc/idle/total,
918 MiB/1.1 GiB CGO alloc/total,
2175.51cgo/sec,
0.16/0.02 %(u/s)time, 0.00 %gc (1x)
有人知道他们的意思,以及如何阻止他们吗?
Does anybody know what they mean, and how to stop them?
推荐答案
这些都是CockroachDB日志,而不仅仅是错误.这由CockroachDB日志行中的I
前缀(表示Info
)指示.列出的日志行显示了cockroach
进程的基本内存信息.每10秒记录一次.
These are all CockroachDB logs, not just errors. This is indicated by the I
prefix (meaning Info
) in the CockroachDB log line. The listed log lines show basic memory information for the cockroach
process. This is logged every 10 seconds.
如果您希望保留日志,我建议您按照严重性进行过滤.
If you wish to persist logs I would recommend filtering by severity.
当使用以下命令将日志重定向到stderr时,这可由CockroachDB本身完成:--logtostderr=Level
其中Level
是Info
,Warning
,Error
或Fatal
之一.
This can be done by CockroachDB itself when redirecting logs to stderr by using: --logtostderr=Level
where Level
is one of Info
, Warning
, Error
, or Fatal
.
如果要保存原始日志,则可以快速通过以丢弃所有不以所需前缀开头的内容.但是,这不如--logtostderr
方法准确,因为您需要处理多行日志条目.
If you are saving the raw logs, you could do a quick pass to discard anything not starting with a desired prefix. This will however not be as accurate as the --logtostderr
method as you would need to handle multi-line log entries.
这篇关于cockroachdb/kubernetes在stackdriver上记录了很多错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!