diff --git a/agentcfg/fetch.go b/agentcfg/fetch.go index cf24ff9df71..944ca69bdf3 100644 --- a/agentcfg/fetch.go +++ b/agentcfg/fetch.go @@ -65,7 +65,7 @@ type Fetcher interface { // NewFetcher returns a new Fetcher based on the provided config. func NewFetcher(cfg *config.Config) Fetcher { - if cfg.AgentConfigs != nil { + if cfg.AgentConfigs != nil || !cfg.Kibana.Enabled { // Direct agent configuration is present, disable communication // with kibana. return NewDirectFetcher(cfg.AgentConfigs) diff --git a/apmpackage/apm/0.3.0/agent/input/template.yml.hbs b/apmpackage/apm/0.3.0/agent/input/template.yml.hbs index 0e181262004..62f822b8d5d 100644 --- a/apmpackage/apm/0.3.0/agent/input/template.yml.hbs +++ b/apmpackage/apm/0.3.0/agent/input/template.yml.hbs @@ -4,8 +4,6 @@ apm-server: max_event_size: {{max_event_bytes}} capture_personal_data: {{capture_personal_data}} default_service_environment: {{default_service_environment}} - kibana: - api_key: {{kibana_api_key}} rum: enabled: {{enable_rum}} source_mapping.elasticsearch.api_key: {{sourcemap_api_key}} diff --git a/apmpackage/apm/0.3.0/manifest.yml b/apmpackage/apm/0.3.0/manifest.yml index e051c922702..a9fe2a411ba 100644 --- a/apmpackage/apm/0.3.0/manifest.yml +++ b/apmpackage/apm/0.3.0/manifest.yml @@ -65,12 +65,6 @@ policy_templates: required: false show_user: true default: false - - name: kibana_api_key - type: text - title: API Key for Central Configuration - required: false - description: API Key for APM central configuration feature. Enter as : - show_user: true - name: enable_rum type: bool title: Enable RUM diff --git a/beater/config/agentconfig.go b/beater/config/agentconfig.go index 63901fa4527..30bc9ca4a51 100644 --- a/beater/config/agentconfig.go +++ b/beater/config/agentconfig.go @@ -53,9 +53,6 @@ type AgentConfig struct { } func (s *AgentConfig) setup() error { - if !s.Service.isValid() { - return errInvalidAgentConfigServiceName - } if s.Config == nil { return errInvalidAgentConfigMissingConfig } @@ -87,7 +84,3 @@ func (s *Service) String() string { } return strings.Join([]string{name, env}, " ") } - -func (s *Service) isValid() bool { - return s.Name != "" || s.Environment != "" -} diff --git a/beater/config/config.go b/beater/config/config.go index cd33f9612a7..3c09fdf5007 100644 --- a/beater/config/config.go +++ b/beater/config/config.go @@ -38,7 +38,6 @@ const ( ) var ( - errInvalidAgentConfigServiceName = errors.New("agent_config: either service.name or service.environment must be set") errInvalidAgentConfigMissingConfig = errors.New("agent_config: no config set") )