Skip to content

Commit

Permalink
[Serverless Search] Remove unwanted alterting rule and connector types (
Browse files Browse the repository at this point in the history
elastic#162105)

## Summary

This moves alerting in Serverless Search to the Stack Management
alerting page, and removes

To remove these rule types, I had to disable the observability,
securitySolution, uptime, monitoring and infra plugins and make sure
that their server plugins (not just the frontend plugins) respected the
`enabled: false` flag.
  • Loading branch information
sphilipse authored Jul 19, 2023
1 parent 9c7dda0 commit 0a6b5e9
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 7 deletions.
10 changes: 10 additions & 0 deletions config/serverless.es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@

## Disable APM and Uptime, enable Enterprise Search
xpack.apm.enabled: false

xpack.cloudSecurityPosture.enabled: false
xpack.infra.enabled: false
xpack.observability.enabled: false
xpack.securitySolution.enabled: false
xpack.serverless.observability.enabled: false
xpack.uptime.enabled: false
enterpriseSearch.enabled: false
monitoring.ui.enabled: false

## Enable the Serverless Search plugin
xpack.serverless.search.enabled: true
Expand All @@ -16,3 +23,6 @@ xpack.serverless.plugin.developer.projectSwitcher.currentType: 'search'

# Specify in telemetry the project type
telemetry.labels.serverless: search

# Alerts config
xpack.actions.enabledActionTypes: ['.email', '.index', '.slack', '.jira', '.webhook', '.teams']
1 change: 1 addition & 0 deletions x-pack/plugins/infra/common/plugin_config_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface InfraConfig {
group_by_page_size: number;
};
};
enabled: boolean;
inventory: {
compositeSize: number;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1901,6 +1901,7 @@ const createMockStaticConfiguration = (sources: any): InfraConfig => ({
logs: {
app_target: 'logs-ui',
},
enabled: true,
sources,
});

Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/infra/server/lib/sources/sources.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ const createMockStaticConfiguration = (sources: any): InfraConfig => ({
app_target: 'logs-ui',
},
sources,
enabled: true,
});

const createRequestContext = (savedObject?: SavedObject<unknown>) => {
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/infra/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ import { mapSourceToLogView } from './utils/map_source_to_log_view';

export const config: PluginConfigDescriptor<InfraConfig> = {
schema: schema.object({
enabled: schema.boolean({ defaultValue: true }),
// Setting variants only allowed in the Serverless offering, otherwise always default `logs-ui` value
logs: schema.conditional(
schema.contextRef('serverless'),
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/serverless_search/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"grokdebugger",
"management",
"ml",
"observabilityShared",
"painlessLab",
"searchprofiler",
"security",
Expand Down
7 changes: 6 additions & 1 deletion x-pack/plugins/serverless_search/public/layout/nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ const navigationTree: NavigationTreeDefinition = {
);
},
},
{ link: 'observability-overview:alerts' },
{
link: 'management:triggersActions',
title: i18n.translate('xpack.serverlessSearch.nav.alerts', {
defaultMessage: 'Alerts',
}),
},
],
},
{
Expand Down
3 changes: 1 addition & 2 deletions x-pack/plugins/serverless_search/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,10 @@ export class ServerlessSearchPlugin

public start(
core: CoreStart,
{ serverless, management, observabilityShared, cloud }: ServerlessSearchPluginStartDependencies
{ serverless, management, cloud }: ServerlessSearchPluginStartDependencies
): ServerlessSearchPluginStart {
serverless.setProjectHome('/app/elasticsearch');
serverless.setSideNavComponent(createComponent(core, { serverless, cloud }));
observabilityShared.setIsSidebarEnabled(false);
management.setupCardsNavigation({
enabled: true,
hideLinksTo: [appIds.MAINTENANCE_WINDOWS],
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/serverless_search/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { ManagementSetup, ManagementStart } from '@kbn/management-plugin/public'
import { SecurityPluginStart } from '@kbn/security-plugin/public';
import { ServerlessPluginSetup, ServerlessPluginStart } from '@kbn/serverless/public';
import { SharePluginStart } from '@kbn/share-plugin/public';
import { ObservabilitySharedPluginStart } from '@kbn/observability-shared-plugin/public';

// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ServerlessSearchPluginSetup {}
Expand All @@ -27,7 +26,6 @@ export interface ServerlessSearchPluginSetupDependencies {
export interface ServerlessSearchPluginStartDependencies {
cloud: CloudStart;
management: ManagementStart;
observabilityShared: ObservabilitySharedPluginStart;
security: SecurityPluginStart;
serverless: ServerlessPluginStart;
share: SharePluginStart;
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/serverless_search/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,5 @@
"@kbn/ml-plugin",
"@kbn/management-cards-navigation",
"@kbn/core-elasticsearch-server",
"@kbn/observability-shared-plugin",
]
}

0 comments on commit 0a6b5e9

Please sign in to comment.