Skip to content

Commit d02d87b

Browse files
authored
[Ingest Manager] stop creating events-* index pattern and placeholder index (#74683) (#74720)
* stop creating events-* index pattern and indices * add integration test to check for placeholder indices
1 parent 2ea01d3 commit d02d87b

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

x-pack/plugins/ingest_manager/server/services/epm/kibana/index_pattern/install.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ export interface IndexPatternField {
7272
export enum IndexPatternType {
7373
logs = 'logs',
7474
metrics = 'metrics',
75-
events = 'events',
7675
}
7776
// TODO: use a function overload and make pkgName and pkgVersion required for install/update
7877
// and not for an update removal. or separate out the functions
@@ -111,11 +110,7 @@ export async function installIndexPatterns(
111110
const installedPackagesInfo = await Promise.all(installedPackagesFetchInfoPromise);
112111

113112
// for each index pattern type, create an index pattern
114-
const indexPatternTypes = [
115-
IndexPatternType.logs,
116-
IndexPatternType.metrics,
117-
IndexPatternType.events,
118-
];
113+
const indexPatternTypes = [IndexPatternType.logs, IndexPatternType.metrics];
119114
indexPatternTypes.forEach(async (indexPatternType) => {
120115
// if this is an update because a package is being unisntalled (no pkgkey argument passed) and no other packages are installed, remove the index pattern
121116
if (!pkgName && installedPackages.length === 0) {

x-pack/test/ingest_manager_api_integration/apis/epm/install_remove_assets.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,6 @@ export default function (providerContext: FtrProviderContext) {
8282
id: 'metrics-*',
8383
});
8484
expect(resIndexPatternMetrics.id).equal('metrics-*');
85-
const resIndexPatternEvents = await kibanaServer.savedObjects.get({
86-
type: 'index-pattern',
87-
id: 'events-*',
88-
});
89-
expect(resIndexPatternEvents.id).equal('events-*');
9085
const resDashboard = await kibanaServer.savedObjects.get({
9186
type: 'dashboard',
9287
id: 'sample_dashboard',
@@ -108,6 +103,18 @@ export default function (providerContext: FtrProviderContext) {
108103
});
109104
expect(resSearch.id).equal('sample_search');
110105
});
106+
it('should have installed placeholder indices', async function () {
107+
const resLogsIndexPatternPlaceholder = await es.transport.request({
108+
method: 'GET',
109+
path: `/logs-index_pattern_placeholder`,
110+
});
111+
expect(resLogsIndexPatternPlaceholder.statusCode).equal(200);
112+
const resMetricsIndexPatternPlaceholder = await es.transport.request({
113+
method: 'GET',
114+
path: `/metrics-index_pattern_placeholder`,
115+
});
116+
expect(resMetricsIndexPatternPlaceholder.statusCode).equal(200);
117+
});
111118
it('should have created the correct saved object', async function () {
112119
const res = await kibanaServer.savedObjects.get({
113120
type: 'epm-packages',

0 commit comments

Comments
 (0)