Skip to content

Commit

Permalink
Merge branch 'master' into lens/functional-tests-transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Aug 6, 2020
2 parents e20e8c6 + 13fd9e3 commit a4c70fb
Show file tree
Hide file tree
Showing 87 changed files with 1,535 additions and 625 deletions.
13 changes: 13 additions & 0 deletions .ci/pipeline-library/src/test/prChanges.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,17 @@ class PrChangesTest extends KibanaBasePipelineTest {

assertFalse(prChanges.areChangesSkippable())
}

@Test
void 'areChangesSkippable() with plugin readme changes'() {
props([
githubPrs: [
getChanges: { [
[filename: 'src/plugins/foo/README.asciidoc'],
] },
],
])

assertFalse(prChanges.areChangesSkippable())
}
}
6 changes: 0 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,6 @@ module.exports = {
'react-hooks/rules-of-hooks': 'off',
},
},
{
files: ['x-pack/plugins/lens/**/*.{js,mjs,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
},
},
{
files: ['x-pack/plugins/ml/**/*.{js,mjs,ts,tsx}'],
rules: {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/user/monitoring/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ include::xpack-monitoring.asciidoc[]
include::beats-details.asciidoc[leveloffset=+1]
include::cluster-alerts.asciidoc[leveloffset=+1]
include::elasticsearch-details.asciidoc[leveloffset=+1]
include::kibana-alerts.asciidoc[leveloffset=+1]
include::kibana-details.asciidoc[leveloffset=+1]
include::logstash-details.asciidoc[leveloffset=+1]
include::monitoring-troubleshooting.asciidoc[leveloffset=+1]
36 changes: 36 additions & 0 deletions docs/user/monitoring/kibana-alerts.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[role="xpack"]
[[kibana-alerts]]
= {kib} Alerts

The {stack} {monitor-features} provide
<<alerting-getting-started,{kib} alerts>> out-of-the box to notify you of
potential issues in the {stack}. These alerts are preconfigured based on the
best practices recommended by Elastic. However, you can tailor them to meet your
specific needs.

When you open *{stack-monitor-app}*, the preconfigured {kib} alerts are
created automatically. If you collect monitoring data from multiple clusters,
these alerts can search, detect, and notify on various conditions across the
clusters. The alerts are visible alongside your existing {watcher} cluster
alerts. You can view details about the alerts that are active and view health
and performance data for {es}, {ls}, and Beats in real time, as well as
analyze past performance. You can also modify active alerts.

[role="screenshot"]
image::user/monitoring/images/monitoring-kibana-alerts.png["Kibana alerts in the Stack Monitoring app"]

To review and modify all the available alerts, use
<<managing-alerts-and-actions,*{alerts-ui}*>> in *{stack-manage-app}*.

[discrete]
[[kibana-alerts-cpu-threshold]]
== CPU threshold

This alert is triggered when a node runs a consistently high CPU load. By
default, the trigger condition is set at 85% or more averaged over the last 5
minutes. The alert is grouped across all the nodes of the cluster by running
checks on a schedule time of 1 minute with a re-notify internal of 1 day.

NOTE: Some action types are subscription features, while others are free.
For a comparison of the Elastic subscription levels, see the alerting section of
the {subscriptions}[Subscriptions page].
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,20 @@ export const InfoComponent = () => {
<>
<FormattedMessage
id="visualize.experimentalVisInfoText"
defaultMessage="This visualization is marked as experimental. Have feedback? Please create an issue in"
/>{' '}
<EuiLink external href="https:/elastic/kibana/issues/new/choose" target="_blank">
GitHub
</EuiLink>
{'.'}
defaultMessage="This visualization is experimental and is not subject to the support SLA of official GA features.
For feedback, please create an issue in {githubLink}."
values={{
githubLink: (
<EuiLink
external
href="https:/elastic/kibana/issues/new/choose"
target="_blank"
>
GitHub
</EuiLink>
),
}}
/>
</>
);

Expand Down
2 changes: 2 additions & 0 deletions vars/prChanges.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ def getNotSkippablePaths() {
return [
// this file is auto-generated and changes to it need to be validated with CI
/^docs\/developer\/architecture\/code-exploration.asciidoc$/,
// don't skip CI on prs with changes to plugin readme files (?i) is for case-insensitive matching
/(?i)\/plugins\/[^\/]+\/readme\.(md|asciidoc)$/,
]
}

Expand Down
17 changes: 12 additions & 5 deletions x-pack/plugins/alerts/server/alerts_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,11 +387,18 @@ export class AlertsClient {
updateResult.scheduledTaskId &&
!isEqual(alertSavedObject.attributes.schedule, updateResult.schedule)
) {
this.taskManager.runNow(updateResult.scheduledTaskId).catch((err: Error) => {
this.logger.error(
`Alert update failed to run its underlying task. TaskManager runNow failed with Error: ${err.message}`
);
});
this.taskManager
.runNow(updateResult.scheduledTaskId)
.then(() => {
this.logger.debug(
`Alert update has rescheduled the underlying task: ${updateResult.scheduledTaskId}`
);
})
.catch((err: Error) => {
this.logger.error(
`Alert update failed to run its underlying task. TaskManager runNow failed with Error: ${err.message}`
);
});
}
})(),
]);
Expand Down
34 changes: 34 additions & 0 deletions x-pack/plugins/enterprise_search/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,40 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { i18n } from '@kbn/i18n';

export const ENTERPRISE_SEARCH_PLUGIN = {
ID: 'enterpriseSearch',
NAME: i18n.translate('xpack.enterpriseSearch.productName', {
defaultMessage: 'Enterprise Search',
}),
URL: '/app/enterprise_search',
};

export const APP_SEARCH_PLUGIN = {
ID: 'appSearch',
NAME: i18n.translate('xpack.enterpriseSearch.appSearch.productName', {
defaultMessage: 'App Search',
}),
DESCRIPTION: i18n.translate('xpack.enterpriseSearch.appSearch.productDescription', {
defaultMessage:
'Leverage dashboards, analytics, and APIs for advanced application search made simple.',
}),
URL: '/app/enterprise_search/app_search',
};

export const WORKPLACE_SEARCH_PLUGIN = {
ID: 'workplaceSearch',
NAME: i18n.translate('xpack.enterpriseSearch.workplaceSearch.productName', {
defaultMessage: 'Workplace Search',
}),
DESCRIPTION: i18n.translate('xpack.enterpriseSearch.workplaceSearch.productDescription', {
defaultMessage:
'Search all documents, files, and sources available across your virtual workplace.',
}),
URL: '/app/enterprise_search/workplace_search',
};

export const JSON_HEADER = { 'Content-Type': 'application/json' }; // This needs specific casing or Chrome throws a 415 error

export const ENGINES_PAGE_SIZE = 10;
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,24 @@ import { EuiSpacer, EuiTitle, EuiText } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';

import { APP_SEARCH_PLUGIN } from '../../../../../common/constants';
import { SetupGuide as SetupGuideLayout } from '../../../shared/setup_guide';
import { SetAppSearchBreadcrumbs as SetBreadcrumbs } from '../../../shared/kibana_breadcrumbs';
import { SendAppSearchTelemetry as SendTelemetry } from '../../../shared/telemetry';
import GettingStarted from '../../assets/getting_started.png';

export const SetupGuide: React.FC = () => (
<SetupGuideLayout
productName={i18n.translate('xpack.enterpriseSearch.appSearch.productName', {
defaultMessage: 'App Search',
})}
productName={APP_SEARCH_PLUGIN.NAME}
productEuiIcon="logoAppSearch"
standardAuthLink="https://swiftype.com/documentation/app-search/self-managed/security#standard"
elasticsearchNativeAuthLink="https://swiftype.com/documentation/app-search/self-managed/security#elasticsearch-native-realm"
>
<SetBreadcrumbs text="Setup Guide" />
<SetBreadcrumbs
text={i18n.translate('xpack.enterpriseSearch.setupGuide.title', {
defaultMessage: 'Setup Guide',
})}
/>
<SendTelemetry action="viewed" metric="setup_guide" />

<a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
import { EuiBreadcrumb } from '@elastic/eui';
import { History } from 'history';

import {
ENTERPRISE_SEARCH_PLUGIN,
APP_SEARCH_PLUGIN,
WORKPLACE_SEARCH_PLUGIN,
} from '../../../../common/constants';

import { letBrowserHandleEvent } from '../react_router_helpers';

/**
Expand Down Expand Up @@ -44,14 +50,20 @@ export type TBreadcrumbs = IGenerateBreadcrumbProps[];
export const enterpriseSearchBreadcrumbs = (history: History) => (
breadcrumbs: TBreadcrumbs = []
) => [
generateBreadcrumb({ text: 'Enterprise Search' }),
generateBreadcrumb({ text: ENTERPRISE_SEARCH_PLUGIN.NAME }),
...breadcrumbs.map(({ text, path }: IGenerateBreadcrumbProps) =>
generateBreadcrumb({ text, path, history })
),
];

export const appSearchBreadcrumbs = (history: History) => (breadcrumbs: TBreadcrumbs = []) =>
enterpriseSearchBreadcrumbs(history)([{ text: 'App Search', path: '/' }, ...breadcrumbs]);
enterpriseSearchBreadcrumbs(history)([
{ text: APP_SEARCH_PLUGIN.NAME, path: '/' },
...breadcrumbs,
]);

export const workplaceSearchBreadcrumbs = (history: History) => (breadcrumbs: TBreadcrumbs = []) =>
enterpriseSearchBreadcrumbs(history)([{ text: 'Workplace Search', path: '/' }, ...breadcrumbs]);
enterpriseSearchBreadcrumbs(history)([
{ text: WORKPLACE_SEARCH_PLUGIN.NAME, path: '/' },
...breadcrumbs,
]);
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import React from 'react';
import { EuiPage, EuiPageBody, EuiPageContent } from '@elastic/eui';
import { i18n } from '@kbn/i18n';

import { WORKPLACE_SEARCH_PLUGIN } from '../../../../../common/constants';
import { ErrorStatePrompt } from '../../../shared/error_state';
import { SetWorkplaceSearchBreadcrumbs as SetBreadcrumbs } from '../../../shared/kibana_breadcrumbs';
import { SendWorkplaceSearchTelemetry as SendTelemetry } from '../../../shared/telemetry';
Expand All @@ -20,11 +20,7 @@ export const ErrorState: React.FC = () => {
<SendTelemetry action="error" metric="cannot_connect" />

<EuiPageBody>
<ViewContentHeader
title={i18n.translate('xpack.enterpriseSearch.workplaceSearch.productName', {
defaultMessage: 'Workplace Search',
})}
/>
<ViewContentHeader title={WORKPLACE_SEARCH_PLUGIN.NAME} />
<EuiPageContent>
<ErrorStatePrompt />
</EuiPageContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { EuiSpacer, EuiTitle, EuiText, EuiButton } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';

import { WORKPLACE_SEARCH_PLUGIN } from '../../../../../common/constants';
import { SetupGuide as SetupGuideLayout } from '../../../shared/setup_guide';

import { SetWorkplaceSearchBreadcrumbs as SetBreadcrumbs } from '../../../shared/kibana_breadcrumbs';
import { SendWorkplaceSearchTelemetry as SendTelemetry } from '../../../shared/telemetry';
import GettingStarted from '../../assets/getting_started.png';
Expand All @@ -21,14 +21,16 @@ const GETTING_STARTED_LINK_URL =
export const SetupGuide: React.FC = () => {
return (
<SetupGuideLayout
productName={i18n.translate('xpack.enterpriseSearch.workplaceSearch.productName', {
defaultMessage: 'Workplace Search',
})}
productName={WORKPLACE_SEARCH_PLUGIN.NAME}
productEuiIcon="logoWorkplaceSearch"
standardAuthLink="https://www.elastic.co/guide/en/workplace-search/current/workplace-search-security.html#standard"
elasticsearchNativeAuthLink="https://www.elastic.co/guide/en/workplace-search/current/workplace-search-security.html#elasticsearch-native-realm"
>
<SetBreadcrumbs text="Setup Guide" />
<SetBreadcrumbs
text={i18n.translate('xpack.enterpriseSearch.setupGuide.title', {
defaultMessage: 'Setup Guide',
})}
/>
<SendTelemetry action="viewed" metric="setup_guide" />

<a href={GETTING_STARTED_LINK_URL} target="_blank" rel="noopener noreferrer">
Expand Down
31 changes: 15 additions & 16 deletions x-pack/plugins/enterprise_search/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/public';
import { LicensingPluginSetup } from '../../licensing/public';

import { APP_SEARCH_PLUGIN, WORKPLACE_SEARCH_PLUGIN } from '../common/constants';
import { getPublicUrl } from './applications/shared/enterprise_search_url';
import AppSearchLogo from './applications/app_search/assets/logo.svg';
import WorkplaceSearchLogo from './applications/workplace_search/assets/logo.svg';
Expand All @@ -44,9 +45,9 @@ export class EnterpriseSearchPlugin implements Plugin {
const config = { host: this.config.host };

core.application.register({
id: 'appSearch',
title: 'App Search',
appRoute: '/app/enterprise_search/app_search',
id: APP_SEARCH_PLUGIN.ID,
title: APP_SEARCH_PLUGIN.NAME,
appRoute: APP_SEARCH_PLUGIN.URL,
category: DEFAULT_APP_CATEGORIES.enterpriseSearch,
mount: async (params: AppMountParameters) => {
const [coreStart] = await core.getStartServices();
Expand All @@ -61,9 +62,9 @@ export class EnterpriseSearchPlugin implements Plugin {
});

core.application.register({
id: 'workplaceSearch',
title: 'Workplace Search',
appRoute: '/app/enterprise_search/workplace_search',
id: WORKPLACE_SEARCH_PLUGIN.ID,
title: WORKPLACE_SEARCH_PLUGIN.NAME,
appRoute: WORKPLACE_SEARCH_PLUGIN.URL,
category: DEFAULT_APP_CATEGORIES.enterpriseSearch,
mount: async (params: AppMountParameters) => {
const [coreStart] = await core.getStartServices();
Expand All @@ -76,23 +77,21 @@ export class EnterpriseSearchPlugin implements Plugin {
});

plugins.home.featureCatalogue.register({
id: 'appSearch',
title: 'App Search',
id: APP_SEARCH_PLUGIN.ID,
title: APP_SEARCH_PLUGIN.NAME,
icon: AppSearchLogo,
description:
'Leverage dashboards, analytics, and APIs for advanced application search made simple.',
path: '/app/enterprise_search/app_search',
description: APP_SEARCH_PLUGIN.DESCRIPTION,
path: APP_SEARCH_PLUGIN.URL,
category: FeatureCatalogueCategory.DATA,
showOnHomePage: true,
});

plugins.home.featureCatalogue.register({
id: 'workplaceSearch',
title: 'Workplace Search',
id: WORKPLACE_SEARCH_PLUGIN.ID,
title: WORKPLACE_SEARCH_PLUGIN.NAME,
icon: WorkplaceSearchLogo,
description:
'Search all documents, files, and sources available across your virtual workplace.',
path: '/app/enterprise_search/workplace_search',
description: WORKPLACE_SEARCH_PLUGIN.DESCRIPTION,
path: WORKPLACE_SEARCH_PLUGIN.URL,
category: FeatureCatalogueCategory.DATA,
showOnHomePage: true,
});
Expand Down
15 changes: 10 additions & 5 deletions x-pack/plugins/enterprise_search/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ import { UsageCollectionSetup } from 'src/plugins/usage_collection/server';
import { SecurityPluginSetup } from '../../security/server';
import { PluginSetupContract as FeaturesPluginSetup } from '../../features/server';

import {
ENTERPRISE_SEARCH_PLUGIN,
APP_SEARCH_PLUGIN,
WORKPLACE_SEARCH_PLUGIN,
} from '../common/constants';
import { ConfigType } from './';
import { checkAccess } from './lib/check_access';
import { registerPublicUrlRoute } from './routes/enterprise_search/public_url';
Expand Down Expand Up @@ -64,13 +69,13 @@ export class EnterpriseSearchPlugin implements Plugin {
* Register space/feature control
*/
features.registerFeature({
id: 'enterpriseSearch',
name: 'Enterprise Search',
id: ENTERPRISE_SEARCH_PLUGIN.ID,
name: ENTERPRISE_SEARCH_PLUGIN.NAME,
order: 0,
icon: 'logoEnterpriseSearch',
navLinkId: 'appSearch', // TODO - remove this once functional tests no longer rely on navLinkId
app: ['kibana', 'appSearch', 'workplaceSearch'], // TODO: 'enterpriseSearch'
catalogue: ['appSearch', 'workplaceSearch'], // TODO: 'enterpriseSearch'
navLinkId: APP_SEARCH_PLUGIN.ID, // TODO - remove this once functional tests no longer rely on navLinkId
app: ['kibana', APP_SEARCH_PLUGIN.ID, WORKPLACE_SEARCH_PLUGIN.ID],
catalogue: [APP_SEARCH_PLUGIN.ID, WORKPLACE_SEARCH_PLUGIN.ID],
privileges: null,
});

Expand Down
Loading

0 comments on commit a4c70fb

Please sign in to comment.