elastic / elastic-agent

Elastic Agent - single, unified way to add monitoring for logs, metrics, and other types of data to a host.
Other
23 stars 144 forks source link

`log_level` source should be reported #4748

Open jen-huang opened 6 months ago

jen-huang commented 6 months ago

Follow up to https://github.com/elastic/kibana/issues/180778

After the work in https://github.com/elastic/elastic-agent/pull/3090, the log level for an agent can now be set (and unset) at various levels.

Currently agent simply reports a local_metadata.elastic.agent.log_level which does not indicate where it retrieved the log level from.

Suggest to expose another field which tells the user and the UI where the log level is sourced from, i.e.:

local_metadata.elastic.agent:
      log_level_source: 'agent_setting' | 'agent_policy' | 'default'

Once this is added, please open a followup Kibana issue so that Fleet can read it to conditionally display Apply changes and Reset to policy on the agent log level selector UI. Today we have to always show both actions because we do not have this information:

image
elasticmachine commented 6 months ago

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)