diff --git a/x-pack/plugins/ingest_manager/common/services/datasources_to_agent_inputs.test.ts b/x-pack/plugins/ingest_manager/common/services/datasources_to_agent_inputs.test.ts index df94168ec88d02..8c4e1b57e37075 100644 --- a/x-pack/plugins/ingest_manager/common/services/datasources_to_agent_inputs.test.ts +++ b/x-pack/plugins/ingest_manager/common/services/datasources_to_agent_inputs.test.ts @@ -106,7 +106,7 @@ describe('Ingest Manager - storedDatasourcesToAgentInputs', () => { id: 'some-uuid', name: 'mock-datasource', type: 'test-logs', - dataset: { namespace: 'default' }, + dataset: { namespace: 'default', type: 'test-logs' }, use_output: 'default', streams: [ { @@ -142,7 +142,7 @@ describe('Ingest Manager - storedDatasourcesToAgentInputs', () => { id: 'some-uuid', name: 'mock-datasource', type: 'test-logs', - dataset: { namespace: 'default' }, + dataset: { namespace: 'default', type: 'test-logs' }, use_output: 'default', streams: [ { diff --git a/x-pack/plugins/ingest_manager/common/services/datasources_to_agent_inputs.ts b/x-pack/plugins/ingest_manager/common/services/datasources_to_agent_inputs.ts index 1c677722c3bcd8..15298607e32a10 100644 --- a/x-pack/plugins/ingest_manager/common/services/datasources_to_agent_inputs.ts +++ b/x-pack/plugins/ingest_manager/common/services/datasources_to_agent_inputs.ts @@ -24,7 +24,10 @@ export const storedDatasourcesToAgentInputs = ( id: datasource.id || datasource.name, name: datasource.name, type: input.type, - dataset: { namespace: datasource.namespace || 'default' }, + dataset: { + namespace: datasource.namespace || 'default', + type: input.type, + }, use_output: DEFAULT_OUTPUT.name, ...Object.entries(input.config || {}).reduce((acc, [key, { value }]) => { acc[key] = value; diff --git a/x-pack/plugins/ingest_manager/common/types/models/agent_config.ts b/x-pack/plugins/ingest_manager/common/types/models/agent_config.ts index 36b3176ffa4151..deb75daa8b6eae 100644 --- a/x-pack/plugins/ingest_manager/common/types/models/agent_config.ts +++ b/x-pack/plugins/ingest_manager/common/types/models/agent_config.ts @@ -39,7 +39,10 @@ export interface FullAgentConfigInput { id: string; name: string; type: string; - dataset: { namespace: string }; + dataset: { + namespace: string; + type: string; + }; use_output: string; package?: Pick; streams: FullAgentConfigInputStream[];