I assumed the agent surfaces Prometheus scraper errors in the agent logs, especifically when the agent { debug: true } is set. Turns out it doesn't. Would of been a time-saver if it did.
EDIT: There is an undocumented DEBUG environment variable to enable Prometheus debug logging in the CloudWatch Agent:
|
func Start(configFilePath string, receiver storage.Appendable, shutDownChan chan interface{}, wg *sync.WaitGroup, mth *metricsTypeHandler) { |
|
logLevel := &promslog.AllowedLevel{} |
|
logLevel.Set("info") |
|
|
|
if os.Getenv("DEBUG") != "" { |
|
runtime.SetBlockProfileRate(20) |
|
runtime.SetMutexProfileFraction(20) |
|
logLevel.Set("debug") |
|
} |
[EDIT: removed confused bugreport caused by warning while expecting other errors in the logs]
I assumed the agent surfaces Prometheus scraper errors in the agent logs, especifically when the agent { debug: true } is set. Turns out it doesn't. Would of been a time-saver if it did.
EDIT: There is an undocumented
DEBUGenvironment variable to enable Prometheus debug logging in the CloudWatch Agent:amazon-cloudwatch-agent/plugins/inputs/prometheus/start.go
Lines 82 to 90 in 71bdd66
[EDIT: removed confused bugreport caused by warning while expecting other errors in the logs]