Set default fleet managed agent log level

Hi all,

I'm running the stack via ECK. Does anyone know of a way to set the default log level of the agents?
I want to change it from info to error

Thanks
Tom

You can change it in the spec section of yaml config:

config:
    agent:
      logging:
        level: error

This throws an error when running in fleet mode

"fleet-server" is invalid: spec.config: Invalid value: v1.Config{Data:map[string]interface {}{"agent":map[string]interface {}{"logging":map[string]interface {}{"level":"error"}}}}: remove config, it can't be set in fleet

Could you try it for the elastic-agent entry?

Hi, sorry for the delay

The same error appears if it's on either fleet server or agent config

This is the full error:

Agent/elasticsearch/elastic-agent dry-run failed, reason: Forbidden: admission webhook "elastic-agent-validation-v1alpha1.k8s.elastic.co" denied the request: Agent.agent.k8s.elastic.co "elastic-agent" is invalid: spec.config: Invalid value: v1.Config{Data:map[string]interface {}{"agent":map[string]interface {}{"logging":map[string]interface {}{"level":"error"}}}}: remove config, it can't be set in fleet mode

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.