Skip to content

Commit a41950b

Browse files
committed
Fix typo
1 parent d63354e commit a41950b

File tree

3 files changed

+28
-20
lines changed

3 files changed

+28
-20
lines changed

x-pack/plugins/ingest_manager/common/types/models/agent_config.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,12 @@ export interface FullAgentConfig {
5959
};
6060
datasources: FullAgentConfigDatasource[];
6161
revision?: number;
62-
'settings.monitoring'?: {
63-
use_output: string;
64-
enabled: boolean;
65-
metrics: boolean;
66-
logs: boolean;
62+
settings?: {
63+
monitoring: {
64+
use_output: string;
65+
enabled: boolean;
66+
metrics: boolean;
67+
logs: boolean;
68+
};
6769
};
6870
}

x-pack/plugins/ingest_manager/server/services/agent_config.test.ts

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,13 @@ describe('agent config', () => {
8383
},
8484
datasources: [],
8585
revision: 1,
86-
'settings.monitoring': {
87-
use_output: 'default',
88-
enabled: true,
89-
logs: true,
90-
metrics: false,
86+
settings: {
87+
monitoring: {
88+
use_output: 'default',
89+
enabled: true,
90+
logs: true,
91+
metrics: false,
92+
},
9193
},
9294
});
9395
});
@@ -111,11 +113,13 @@ describe('agent config', () => {
111113
},
112114
datasources: [],
113115
revision: 1,
114-
'settings.monitoring': {
115-
use_output: 'default',
116-
enabled: true,
117-
logs: false,
118-
metrics: true,
116+
settings: {
117+
monitoring: {
118+
use_output: 'default',
119+
enabled: true,
120+
logs: false,
121+
metrics: true,
122+
},
119123
},
120124
});
121125
});

x-pack/plugins/ingest_manager/server/services/agent_config.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,13 @@ class AgentConfigService {
330330
revision: config.revision,
331331
...(config.monitoring_enabled && config.monitoring_enabled.length > 0
332332
? {
333-
'settings.monitoring': {
334-
use_output: defaultOutput.name,
335-
enabled: true,
336-
logs: config.monitoring_enabled.indexOf('logs') >= 0,
337-
metrics: config.monitoring_enabled.indexOf('metrics') >= 0,
333+
settings: {
334+
monitoring: {
335+
use_output: defaultOutput.name,
336+
enabled: true,
337+
logs: config.monitoring_enabled.indexOf('logs') >= 0,
338+
metrics: config.monitoring_enabled.indexOf('metrics') >= 0,
339+
},
338340
},
339341
}
340342
: {}),

0 commit comments

Comments
 (0)