Skip to content

Feature Request: "debug" flag should surface Prometheus scraper errors #1948

@andersnm

Description

@andersnm

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]

Metadata

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