Use doc link service in more Stack Monitoring pages (#89050)
Co-authored-by: igoristic <igor.zaytsev.dev@gmail.com>
This commit is contained in:
parent
82df009fd1
commit
0ef276dce1
|
@ -21,6 +21,7 @@ readonly links: {
|
|||
readonly installation: string;
|
||||
readonly configuration: string;
|
||||
readonly elasticsearchOutput: string;
|
||||
readonly elasticsearchModule: string;
|
||||
readonly startup: string;
|
||||
readonly exportedFields: string;
|
||||
};
|
||||
|
@ -29,6 +30,10 @@ readonly links: {
|
|||
};
|
||||
readonly metricbeat: {
|
||||
readonly base: string;
|
||||
readonly configure: string;
|
||||
readonly httpEndpoint: string;
|
||||
readonly install: string;
|
||||
readonly start: string;
|
||||
};
|
||||
readonly enterpriseSearch: {
|
||||
readonly base: string;
|
||||
|
|
|
@ -39,6 +39,7 @@ export class DocLinksService {
|
|||
base: `${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}`,
|
||||
installation: `${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}/filebeat-installation-configuration.html`,
|
||||
configuration: `${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}/configuring-howto-filebeat.html`,
|
||||
elasticsearchModule: `${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}/filebeat-module-elasticsearch.html`,
|
||||
elasticsearchOutput: `${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}/elasticsearch-output.html`,
|
||||
startup: `${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}/filebeat-starting.html`,
|
||||
exportedFields: `${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}/exported-fields.html`,
|
||||
|
@ -53,6 +54,10 @@ export class DocLinksService {
|
|||
},
|
||||
metricbeat: {
|
||||
base: `${ELASTIC_WEBSITE_URL}guide/en/beats/metricbeat/${DOC_LINK_VERSION}`,
|
||||
configure: `${ELASTIC_WEBSITE_URL}guide/en/beats/metricbeat/${DOC_LINK_VERSION}/configuring-howto-metricbeat.html`,
|
||||
httpEndpoint: `${ELASTIC_WEBSITE_URL}guide/en/beats/metricbeat/${DOC_LINK_VERSION}/http-endpoint.html`,
|
||||
install: `${ELASTIC_WEBSITE_URL}guide/en/beats/metricbeat/${DOC_LINK_VERSION}/metricbeat-installation-configuration.html`,
|
||||
start: `${ELASTIC_WEBSITE_URL}guide/en/beats/metricbeat/${DOC_LINK_VERSION}/metricbeat-starting.html`,
|
||||
},
|
||||
heartbeat: {
|
||||
base: `${ELASTIC_WEBSITE_URL}guide/en/beats/heartbeat/${DOC_LINK_VERSION}`,
|
||||
|
@ -193,8 +198,11 @@ export class DocLinksService {
|
|||
alertsKibanaDiskThreshold: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-disk-usage-threshold`,
|
||||
alertsKibanaJvmThreshold: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-jvm-memory-threshold`,
|
||||
alertsKibanaMissingData: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-missing-monitoring-data`,
|
||||
metricbeatBlog: `${ELASTIC_WEBSITE_URL}blog/external-collection-for-elastic-stack-monitoring-is-now-available-via-metricbeat`,
|
||||
monitorElasticsearch: `${ELASTICSEARCH_DOCS}configuring-metricbeat.html`,
|
||||
monitorKibana: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/monitoring-metricbeat.html`,
|
||||
monitorLogstash: `${ELASTIC_WEBSITE_URL}guide/en/logstash/${DOC_LINK_VERSION}/monitoring-with-metricbeat.html`,
|
||||
troubleshootKibana: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/monitor-troubleshooting.html`,
|
||||
},
|
||||
security: {
|
||||
apiKeyServiceSettings: `${ELASTICSEARCH_DOCS}security-settings.html#api-key-service-settings`,
|
||||
|
@ -257,6 +265,7 @@ export interface DocLinksStart {
|
|||
readonly installation: string;
|
||||
readonly configuration: string;
|
||||
readonly elasticsearchOutput: string;
|
||||
readonly elasticsearchModule: string;
|
||||
readonly startup: string;
|
||||
readonly exportedFields: string;
|
||||
};
|
||||
|
@ -265,6 +274,10 @@ export interface DocLinksStart {
|
|||
};
|
||||
readonly metricbeat: {
|
||||
readonly base: string;
|
||||
readonly configure: string;
|
||||
readonly httpEndpoint: string;
|
||||
readonly install: string;
|
||||
readonly start: string;
|
||||
};
|
||||
readonly enterpriseSearch: {
|
||||
readonly base: string;
|
||||
|
|
|
@ -474,6 +474,7 @@ export interface DocLinksStart {
|
|||
readonly installation: string;
|
||||
readonly configuration: string;
|
||||
readonly elasticsearchOutput: string;
|
||||
readonly elasticsearchModule: string;
|
||||
readonly startup: string;
|
||||
readonly exportedFields: string;
|
||||
};
|
||||
|
@ -482,6 +483,10 @@ export interface DocLinksStart {
|
|||
};
|
||||
readonly metricbeat: {
|
||||
readonly base: string;
|
||||
readonly configure: string;
|
||||
readonly httpEndpoint: string;
|
||||
readonly install: string;
|
||||
readonly start: string;
|
||||
};
|
||||
readonly enterpriseSearch: {
|
||||
readonly base: string;
|
||||
|
|
|
@ -19,7 +19,7 @@ export interface EnableAlertResponse {
|
|||
}
|
||||
|
||||
const showTlsAndEncryptionError = () => {
|
||||
const { ELASTIC_WEBSITE_URL, DOC_LINK_VERSION } = Legacy.shims.docLinks;
|
||||
const settingsUrl = Legacy.shims.docLinks.links.alerting.generalSettings;
|
||||
|
||||
Legacy.shims.toastNotifications.addWarning({
|
||||
title: toMountPoint(
|
||||
|
@ -36,11 +36,7 @@ const showTlsAndEncryptionError = () => {
|
|||
})}
|
||||
</p>
|
||||
<EuiSpacer size="xs" />
|
||||
<EuiLink
|
||||
href={`${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/alert-action-settings-kb.html#general-alert-action-settings`}
|
||||
external
|
||||
target="_blank"
|
||||
>
|
||||
<EuiLink href={settingsUrl} external target="_blank">
|
||||
{i18n.translate('xpack.monitoring.healthCheck.encryptionErrorAction', {
|
||||
defaultMessage: 'Learn how.',
|
||||
})}
|
||||
|
@ -51,7 +47,7 @@ const showTlsAndEncryptionError = () => {
|
|||
};
|
||||
|
||||
const showUnableToDisableWatcherClusterAlertsError = () => {
|
||||
const { ELASTIC_WEBSITE_URL, DOC_LINK_VERSION } = Legacy.shims.docLinks;
|
||||
const settingsUrl = Legacy.shims.docLinks.links.alerting.generalSettings;
|
||||
|
||||
Legacy.shims.toastNotifications.addWarning({
|
||||
title: toMountPoint(
|
||||
|
@ -68,11 +64,7 @@ const showUnableToDisableWatcherClusterAlertsError = () => {
|
|||
})}
|
||||
</p>
|
||||
<EuiSpacer size="xs" />
|
||||
<EuiLink
|
||||
href={`${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/alert-action-settings-kb.html#general-alert-action-settings`}
|
||||
external
|
||||
target="_blank"
|
||||
>
|
||||
<EuiLink href={settingsUrl} external target="_blank">
|
||||
{i18n.translate('xpack.monitoring.healthCheck.unableToDisableWatches.action', {
|
||||
defaultMessage: 'Learn more.',
|
||||
})}
|
||||
|
|
|
@ -13,7 +13,7 @@ exports[`Logs should render a default message 1`] = `
|
|||
values={
|
||||
Object {
|
||||
"link": <EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-installation-configuration.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -42,7 +42,7 @@ exports[`Logs should render with a bad indices reason 1`] = `
|
|||
values={
|
||||
Object {
|
||||
"link": <EuiLink
|
||||
href="https://www.elastic.co/guide/en/kibana/current/monitor-troubleshooting.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
Click here for more information
|
||||
|
@ -67,7 +67,7 @@ exports[`Logs should render with a no cluster found reason 1`] = `
|
|||
values={
|
||||
Object {
|
||||
"link": <EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-elasticsearch.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
setup
|
||||
|
@ -92,7 +92,7 @@ exports[`Logs should render with a no index found reason 1`] = `
|
|||
values={
|
||||
Object {
|
||||
"link": <EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-elasticsearch.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
setup
|
||||
|
@ -117,7 +117,7 @@ exports[`Logs should render with a no index pattern found reason 1`] = `
|
|||
values={
|
||||
Object {
|
||||
"link": <EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-installation-configuration.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
Filebeat
|
||||
|
@ -142,7 +142,7 @@ exports[`Logs should render with a no node found reason 1`] = `
|
|||
values={
|
||||
Object {
|
||||
"link": <EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-elasticsearch.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
setup
|
||||
|
@ -167,7 +167,7 @@ exports[`Logs should render with a no structured logs reason 1`] = `
|
|||
values={
|
||||
Object {
|
||||
"link": <EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-elasticsearch.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
points to JSON logs
|
||||
|
@ -195,7 +195,7 @@ exports[`Logs should render with a no type found reason 1`] = `
|
|||
values={
|
||||
Object {
|
||||
"link": <EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-elasticsearch.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
these directions
|
||||
|
|
|
@ -13,7 +13,9 @@ import { Legacy } from '../../legacy_shims';
|
|||
import { Monospace } from '../metricbeat_migration/instruction_steps/components/monospace/monospace';
|
||||
|
||||
export const Reason = ({ reason }) => {
|
||||
const { ELASTIC_WEBSITE_URL, DOC_LINK_VERSION } = Legacy.shims.docLinks;
|
||||
const filebeatUrl = Legacy.shims.docLinks.links.filebeat.installation;
|
||||
const elasticsearchUrl = Legacy.shims.docLinks.links.filebeat.elasticsearchModule;
|
||||
const troubleshootUrl = Legacy.shims.docLinks.links.monitoring.troubleshootKibana;
|
||||
let title = i18n.translate('xpack.monitoring.logs.reason.defaultTitle', {
|
||||
defaultMessage: 'No log data found',
|
||||
});
|
||||
|
@ -23,10 +25,7 @@ export const Reason = ({ reason }) => {
|
|||
defaultMessage="We did not find any log data and we are unable to diagnose why. {link}"
|
||||
values={{
|
||||
link: (
|
||||
<EuiLink
|
||||
target="_blank"
|
||||
href={`${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}/filebeat-installation-configuration.html`}
|
||||
>
|
||||
<EuiLink target="_blank" href={filebeatUrl}>
|
||||
<FormattedMessage
|
||||
id="xpack.monitoring.logs.reason.defaultMessageLink"
|
||||
defaultMessage="Please verify your setup is correct."
|
||||
|
@ -47,10 +46,7 @@ export const Reason = ({ reason }) => {
|
|||
defaultMessage="Set up {link}, then configure your Elasticsearch output to your monitoring cluster."
|
||||
values={{
|
||||
link: (
|
||||
<EuiLink
|
||||
target="_blank"
|
||||
href={`${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}/filebeat-installation-configuration.html`}
|
||||
>
|
||||
<EuiLink target="_blank" href={filebeatUrl}>
|
||||
{i18n.translate('xpack.monitoring.logs.reason.noIndexPatternLink', {
|
||||
defaultMessage: 'Filebeat',
|
||||
})}
|
||||
|
@ -82,10 +78,7 @@ export const Reason = ({ reason }) => {
|
|||
defaultMessage="Follow {link} to set up Elasticsearch."
|
||||
values={{
|
||||
link: (
|
||||
<EuiLink
|
||||
target="_blank"
|
||||
href={`${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}/filebeat-module-elasticsearch.html`}
|
||||
>
|
||||
<EuiLink target="_blank" href={elasticsearchUrl}>
|
||||
{i18n.translate('xpack.monitoring.logs.reason.noTypeLink', {
|
||||
defaultMessage: 'these directions',
|
||||
})}
|
||||
|
@ -105,10 +98,7 @@ export const Reason = ({ reason }) => {
|
|||
values={{
|
||||
varPaths: <Monospace>var.paths</Monospace>,
|
||||
link: (
|
||||
<EuiLink
|
||||
target="_blank"
|
||||
href={`${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}/filebeat-module-elasticsearch.html`}
|
||||
>
|
||||
<EuiLink target="_blank" href={elasticsearchUrl}>
|
||||
{i18n.translate('xpack.monitoring.logs.reason.notUsingStructuredLogsLink', {
|
||||
defaultMessage: 'points to JSON logs',
|
||||
})}
|
||||
|
@ -127,10 +117,7 @@ export const Reason = ({ reason }) => {
|
|||
defaultMessage="Check that your {link} is correct."
|
||||
values={{
|
||||
link: (
|
||||
<EuiLink
|
||||
target="_blank"
|
||||
href={`${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}/filebeat-module-elasticsearch.html`}
|
||||
>
|
||||
<EuiLink target="_blank" href={elasticsearchUrl}>
|
||||
{i18n.translate('xpack.monitoring.logs.reason.noClusterLink', {
|
||||
defaultMessage: 'setup',
|
||||
})}
|
||||
|
@ -149,10 +136,7 @@ export const Reason = ({ reason }) => {
|
|||
defaultMessage="Check that your {link} is correct."
|
||||
values={{
|
||||
link: (
|
||||
<EuiLink
|
||||
target="_blank"
|
||||
href={`${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}/filebeat-module-elasticsearch.html`}
|
||||
>
|
||||
<EuiLink target="_blank" href={elasticsearchUrl}>
|
||||
{i18n.translate('xpack.monitoring.logs.reason.noNodeLink', {
|
||||
defaultMessage: 'setup',
|
||||
})}
|
||||
|
@ -171,10 +155,7 @@ export const Reason = ({ reason }) => {
|
|||
defaultMessage="We found logs, but none for this index. If this problem continues, check that your {link} is correct."
|
||||
values={{
|
||||
link: (
|
||||
<EuiLink
|
||||
target="_blank"
|
||||
href={`${ELASTIC_WEBSITE_URL}guide/en/beats/filebeat/${DOC_LINK_VERSION}/filebeat-module-elasticsearch.html`}
|
||||
>
|
||||
<EuiLink target="_blank" href={elasticsearchUrl}>
|
||||
{i18n.translate('xpack.monitoring.logs.reason.noIndexLink', {
|
||||
defaultMessage: 'setup',
|
||||
})}
|
||||
|
@ -193,10 +174,7 @@ export const Reason = ({ reason }) => {
|
|||
defaultMessage="There is an issue reading from your filebeat indices. {link}."
|
||||
values={{
|
||||
link: (
|
||||
<EuiLink
|
||||
target="_blank"
|
||||
href={`${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/monitor-troubleshooting.html`}
|
||||
>
|
||||
<EuiLink target="_blank" href={troubleshootUrl}>
|
||||
{i18n.translate('xpack.monitoring.logs.reason.correctIndexNameLink', {
|
||||
defaultMessage: 'Click here for more information',
|
||||
})}
|
||||
|
|
|
@ -15,6 +15,15 @@ jest.mock('../../legacy_shims', () => ({
|
|||
docLinks: {
|
||||
ELASTIC_WEBSITE_URL: 'https://www.elastic.co/',
|
||||
DOC_LINK_VERSION: 'current',
|
||||
links: {
|
||||
filebeat: {
|
||||
elasticsearchModule: 'jest-metadata-mock-url',
|
||||
installation: 'jest-metadata-mock-url',
|
||||
},
|
||||
monitoring: {
|
||||
troubleshootKibana: 'jest-metadata-mock-url',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -156,7 +156,7 @@ exports[`Flyout apm part two should show instructions to migrate to metricbeat 1
|
|||
"children": <EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-installation-configuration.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -215,7 +215,7 @@ exports[`Flyout apm part two should show instructions to migrate to metricbeat 1
|
|||
"link": <React.Fragment>
|
||||
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/metricbeat/current/configuring-howto-metricbeat.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -282,7 +282,7 @@ exports[`Flyout apm part two should show instructions to migrate to metricbeat 1
|
|||
"link": <React.Fragment>
|
||||
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/metricbeat/current/configuring-howto-metricbeat.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -306,7 +306,6 @@ exports[`Flyout apm part two should show instructions to migrate to metricbeat 1
|
|||
"children": <EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-starting.html"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -495,7 +494,7 @@ exports[`Flyout beats part two should show instructions to migrate to metricbeat
|
|||
"children": <EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-installation-configuration.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -554,7 +553,6 @@ exports[`Flyout beats part two should show instructions to migrate to metricbeat
|
|||
Object {
|
||||
"beatType": "beat",
|
||||
"link": <EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/metricbeat/current/http-endpoint.html"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -591,7 +589,7 @@ exports[`Flyout beats part two should show instructions to migrate to metricbeat
|
|||
"link": <React.Fragment>
|
||||
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/metricbeat/current/configuring-howto-metricbeat.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -658,7 +656,7 @@ exports[`Flyout beats part two should show instructions to migrate to metricbeat
|
|||
"link": <React.Fragment>
|
||||
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/metricbeat/current/configuring-howto-metricbeat.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -682,7 +680,6 @@ exports[`Flyout beats part two should show instructions to migrate to metricbeat
|
|||
"children": <EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-starting.html"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -860,7 +857,7 @@ exports[`Flyout elasticsearch part two should show instructions to migrate to me
|
|||
"children": <EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-installation-configuration.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -927,7 +924,7 @@ exports[`Flyout elasticsearch part two should show instructions to migrate to me
|
|||
"link": <React.Fragment>
|
||||
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-metricbeat.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -994,7 +991,7 @@ exports[`Flyout elasticsearch part two should show instructions to migrate to me
|
|||
"link": <React.Fragment>
|
||||
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-metricbeat.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -1018,7 +1015,6 @@ exports[`Flyout elasticsearch part two should show instructions to migrate to me
|
|||
"children": <EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-starting.html"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -1211,7 +1207,7 @@ exports[`Flyout kibana part two should show instructions to migrate to metricbea
|
|||
"children": <EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-installation-configuration.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -1270,7 +1266,7 @@ exports[`Flyout kibana part two should show instructions to migrate to metricbea
|
|||
"link": <React.Fragment>
|
||||
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/kibana/current/monitoring-metricbeat.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -1337,7 +1333,7 @@ exports[`Flyout kibana part two should show instructions to migrate to metricbea
|
|||
"link": <React.Fragment>
|
||||
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/kibana/current/monitoring-metricbeat.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -1361,7 +1357,6 @@ exports[`Flyout kibana part two should show instructions to migrate to metricbea
|
|||
"children": <EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-starting.html"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -1545,7 +1540,7 @@ exports[`Flyout logstash part two should show instructions to migrate to metricb
|
|||
"children": <EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-installation-configuration.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -1604,7 +1599,6 @@ exports[`Flyout logstash part two should show instructions to migrate to metricb
|
|||
"link": <React.Fragment>
|
||||
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/logstash/current/monitoring-with-metricbeat.html"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -1671,7 +1665,6 @@ exports[`Flyout logstash part two should show instructions to migrate to metricb
|
|||
"link": <React.Fragment>
|
||||
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/logstash/current/monitoring-with-metricbeat.html"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -1695,7 +1688,6 @@ exports[`Flyout logstash part two should show instructions to migrate to metricb
|
|||
"children": <EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-starting.html"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -1822,7 +1814,7 @@ exports[`Flyout should render the beat type for beats for the enabling metricbea
|
|||
"children": <EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-installation-configuration.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -1881,7 +1873,6 @@ exports[`Flyout should render the beat type for beats for the enabling metricbea
|
|||
Object {
|
||||
"beatType": "filebeat",
|
||||
"link": <EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/filebeat/current/http-endpoint.html"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -1918,7 +1909,7 @@ exports[`Flyout should render the beat type for beats for the enabling metricbea
|
|||
"link": <React.Fragment>
|
||||
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/metricbeat/current/configuring-howto-metricbeat.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -1985,7 +1976,7 @@ exports[`Flyout should render the beat type for beats for the enabling metricbea
|
|||
"link": <React.Fragment>
|
||||
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/metricbeat/current/configuring-howto-metricbeat.html"
|
||||
href="jest-metadata-mock-url"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
@ -2009,7 +2000,6 @@ exports[`Flyout should render the beat type for beats for the enabling metricbea
|
|||
"children": <EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href="https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-starting.html"
|
||||
target="_blank"
|
||||
>
|
||||
<FormattedMessage
|
||||
|
|
|
@ -225,13 +225,12 @@ export class Flyout extends Component {
|
|||
|
||||
getDocumentationTitle() {
|
||||
const { productName } = this.props;
|
||||
const { ELASTIC_WEBSITE_URL, DOC_LINK_VERSION } = Legacy.shims.docLinks;
|
||||
|
||||
let documentationUrl = null;
|
||||
if (productName === KIBANA_SYSTEM_ID) {
|
||||
documentationUrl = `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/monitoring-metricbeat.html`;
|
||||
documentationUrl = Legacy.shims.docLinks.links.monitoring.monitorKibana;
|
||||
} else if (productName === ELASTICSEARCH_SYSTEM_ID) {
|
||||
documentationUrl = `${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/reference/${DOC_LINK_VERSION}/configuring-metricbeat.html`;
|
||||
documentationUrl = Legacy.shims.docLinks.links.monitoring.monitorElasticsearch;
|
||||
}
|
||||
|
||||
if (!documentationUrl) {
|
||||
|
|
|
@ -22,8 +22,16 @@ jest.mock('../../../legacy_shims', () => ({
|
|||
shims: {
|
||||
kfetch: jest.fn(),
|
||||
docLinks: {
|
||||
ELASTIC_WEBSITE_URL: 'https://www.elastic.co/',
|
||||
DOC_LINK_VERSION: 'current',
|
||||
links: {
|
||||
monitoring: {
|
||||
monitorKibana: 'jest-metadata-mock-url',
|
||||
monitorElasticsearch: 'jest-metadata-mock-url',
|
||||
},
|
||||
metricbeat: {
|
||||
install: 'jest-metadata-mock-url',
|
||||
configure: 'jest-metadata-mock-url',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -14,10 +14,10 @@ import { Legacy } from '../../../../legacy_shims';
|
|||
import { getMigrationStatusStep, getSecurityStep } from '../common_instructions';
|
||||
|
||||
export function getApmInstructionsForEnablingMetricbeat(product, _meta, { esMonitoringUrl }) {
|
||||
const { ELASTIC_WEBSITE_URL, DOC_LINK_VERSION } = Legacy.shims.docLinks;
|
||||
const securitySetup = getSecurityStep(
|
||||
`${ELASTIC_WEBSITE_URL}guide/en/beats/metricbeat/${DOC_LINK_VERSION}/configuring-howto-metricbeat.html`
|
||||
);
|
||||
const metricbeatConfigUrl = Legacy.shims.docLinks.links.metricbeat.configure;
|
||||
const metricbeatInstallUrl = Legacy.shims.docLinks.links.metricbeat.install;
|
||||
const metricbeatStartUrl = Legacy.shims.docLinks.links.metricbeat.start;
|
||||
const securitySetup = getSecurityStep(metricbeatConfigUrl);
|
||||
|
||||
const installMetricbeatStep = {
|
||||
title: i18n.translate(
|
||||
|
@ -29,10 +29,7 @@ export function getApmInstructionsForEnablingMetricbeat(product, _meta, { esMoni
|
|||
children: (
|
||||
<EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href={`${ELASTIC_WEBSITE_URL}guide/en/beats/metricbeat/${DOC_LINK_VERSION}/metricbeat-installation-configuration.html`}
|
||||
target="_blank"
|
||||
>
|
||||
<EuiLink href={metricbeatInstallUrl} target="_blank">
|
||||
<FormattedMessage
|
||||
id="xpack.monitoring.metricbeatMigration.apmInstructions.installMetricbeatLinkText"
|
||||
defaultMessage="Follow the instructions here."
|
||||
|
@ -117,10 +114,7 @@ export function getApmInstructionsForEnablingMetricbeat(product, _meta, { esMoni
|
|||
children: (
|
||||
<EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href={`${ELASTIC_WEBSITE_URL}guide/en/beats/metricbeat/${DOC_LINK_VERSION}/metricbeat-starting.html`}
|
||||
target="_blank"
|
||||
>
|
||||
<EuiLink href={metricbeatStartUrl} target="_blank">
|
||||
<FormattedMessage
|
||||
id="xpack.monitoring.metricbeatMigration.apmInstructions.startMetricbeatLinkText"
|
||||
defaultMessage="Follow the instructions here."
|
||||
|
|
|
@ -6,4 +6,3 @@
|
|||
*/
|
||||
|
||||
export const UNDETECTED_BEAT_TYPE = 'beat';
|
||||
export const DEFAULT_BEAT_FOR_URLS = 'metricbeat';
|
||||
|
|
|
@ -10,16 +10,17 @@ import React, { Fragment } from 'react';
|
|||
import { EuiSpacer, EuiCodeBlock, EuiLink, EuiCallOut, EuiText } from '@elastic/eui';
|
||||
import { Monospace } from '../components/monospace';
|
||||
import { FormattedMessage } from '@kbn/i18n/react';
|
||||
import { UNDETECTED_BEAT_TYPE, DEFAULT_BEAT_FOR_URLS } from './common_beats_instructions';
|
||||
import { UNDETECTED_BEAT_TYPE } from './common_beats_instructions';
|
||||
import { Legacy } from '../../../../legacy_shims';
|
||||
import { getMigrationStatusStep, getSecurityStep } from '../common_instructions';
|
||||
|
||||
export function getBeatsInstructionsForEnablingMetricbeat(product, _meta, { esMonitoringUrl }) {
|
||||
const { ELASTIC_WEBSITE_URL, DOC_LINK_VERSION } = Legacy.shims.docLinks;
|
||||
const metricbeatConfigUrl = Legacy.shims.docLinks.links.metricbeat.configure;
|
||||
const metricbeatInstallUrl = Legacy.shims.docLinks.links.metricbeat.install;
|
||||
const metricbeatStartUrl = Legacy.shims.docLinks.links.metricbeat.start;
|
||||
const httpEndpointUrl = Legacy.shims.docLinks.links.metricbeat.httpEndpoint;
|
||||
const beatType = product.beatType;
|
||||
const securitySetup = getSecurityStep(
|
||||
`${ELASTIC_WEBSITE_URL}guide/en/beats/metricbeat/${DOC_LINK_VERSION}/configuring-howto-metricbeat.html`
|
||||
);
|
||||
const securitySetup = getSecurityStep(metricbeatConfigUrl);
|
||||
|
||||
const installMetricbeatStep = {
|
||||
title: i18n.translate(
|
||||
|
@ -34,10 +35,7 @@ export function getBeatsInstructionsForEnablingMetricbeat(product, _meta, { esMo
|
|||
children: (
|
||||
<EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href={`${ELASTIC_WEBSITE_URL}guide/en/beats/metricbeat/${DOC_LINK_VERSION}/metricbeat-installation-configuration.html`}
|
||||
target="_blank"
|
||||
>
|
||||
<EuiLink href={metricbeatInstallUrl} target="_blank">
|
||||
<FormattedMessage
|
||||
id="xpack.monitoring.metricbeatMigration.beatsInstructions.installMetricbeatLinkText"
|
||||
defaultMessage="Follow the instructions here."
|
||||
|
@ -48,10 +46,6 @@ export function getBeatsInstructionsForEnablingMetricbeat(product, _meta, { esMo
|
|||
),
|
||||
};
|
||||
|
||||
const httpEndpointUrl =
|
||||
`${ELASTIC_WEBSITE_URL}guide/en/beats/${beatType || DEFAULT_BEAT_FOR_URLS}` +
|
||||
`/${DOC_LINK_VERSION}/http-endpoint.html`;
|
||||
|
||||
const enableMetricbeatModuleStep = {
|
||||
title: i18n.translate(
|
||||
'xpack.monitoring.metricbeatMigration.beatsInstructions.enableMetricbeatModuleTitle',
|
||||
|
@ -156,10 +150,7 @@ export function getBeatsInstructionsForEnablingMetricbeat(product, _meta, { esMo
|
|||
children: (
|
||||
<EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href={`${ELASTIC_WEBSITE_URL}guide/en/beats/metricbeat/${DOC_LINK_VERSION}/metricbeat-starting.html`}
|
||||
target="_blank"
|
||||
>
|
||||
<EuiLink href={metricbeatStartUrl} target="_blank">
|
||||
<FormattedMessage
|
||||
id="xpack.monitoring.metricbeatMigration.beatsInstructions.startMetricbeatLinkText"
|
||||
defaultMessage="Follow the instructions here."
|
||||
|
|
|
@ -18,10 +18,10 @@ export function getElasticsearchInstructionsForEnablingMetricbeat(
|
|||
_meta,
|
||||
{ esMonitoringUrl }
|
||||
) {
|
||||
const { ELASTIC_WEBSITE_URL, DOC_LINK_VERSION } = Legacy.shims.docLinks;
|
||||
const securitySetup = getSecurityStep(
|
||||
`${ELASTIC_WEBSITE_URL}guide/en/elasticsearch/reference/${DOC_LINK_VERSION}/configuring-metricbeat.html`
|
||||
);
|
||||
const elasticsearchUrl = Legacy.shims.docLinks.links.monitoring.monitorElasticsearch;
|
||||
const metricbeatInstallUrl = Legacy.shims.docLinks.links.metricbeat.install;
|
||||
const metricbeatStartUrl = Legacy.shims.docLinks.links.metricbeat.start;
|
||||
const securitySetup = getSecurityStep(elasticsearchUrl);
|
||||
|
||||
const installMetricbeatStep = {
|
||||
title: i18n.translate(
|
||||
|
@ -33,10 +33,7 @@ export function getElasticsearchInstructionsForEnablingMetricbeat(
|
|||
children: (
|
||||
<EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href={`${ELASTIC_WEBSITE_URL}guide/en/beats/metricbeat/${DOC_LINK_VERSION}/metricbeat-installation-configuration.html`}
|
||||
target="_blank"
|
||||
>
|
||||
<EuiLink href={metricbeatInstallUrl} target="_blank">
|
||||
<FormattedMessage
|
||||
id="xpack.monitoring.metricbeatMigration.elasticsearchInstructions.installMetricbeatLinkText"
|
||||
defaultMessage="Follow these instructions."
|
||||
|
@ -133,10 +130,7 @@ export function getElasticsearchInstructionsForEnablingMetricbeat(
|
|||
children: (
|
||||
<EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href={`${ELASTIC_WEBSITE_URL}guide/en/beats/metricbeat/${DOC_LINK_VERSION}/metricbeat-starting.html`}
|
||||
target="_blank"
|
||||
>
|
||||
<EuiLink href={metricbeatStartUrl} target="_blank">
|
||||
<FormattedMessage
|
||||
id="xpack.monitoring.metricbeatMigration.elasticsearchInstructions.startMetricbeatLinkText"
|
||||
defaultMessage="Follow these instructions."
|
||||
|
|
|
@ -14,10 +14,10 @@ import { Legacy } from '../../../../legacy_shims';
|
|||
import { getMigrationStatusStep, getSecurityStep } from '../common_instructions';
|
||||
|
||||
export function getKibanaInstructionsForEnablingMetricbeat(product, _meta, { esMonitoringUrl }) {
|
||||
const { ELASTIC_WEBSITE_URL, DOC_LINK_VERSION } = Legacy.shims.docLinks;
|
||||
const securitySetup = getSecurityStep(
|
||||
`${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/monitoring-metricbeat.html`
|
||||
);
|
||||
const kibanaUrl = Legacy.shims.docLinks.links.monitoring.monitorKibana;
|
||||
const metricbeatInstallUrl = Legacy.shims.docLinks.links.metricbeat.install;
|
||||
const metricbeatStartUrl = Legacy.shims.docLinks.links.metricbeat.start;
|
||||
const securitySetup = getSecurityStep(kibanaUrl);
|
||||
|
||||
const installMetricbeatStep = {
|
||||
title: i18n.translate(
|
||||
|
@ -29,10 +29,7 @@ export function getKibanaInstructionsForEnablingMetricbeat(product, _meta, { esM
|
|||
children: (
|
||||
<EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href={`${ELASTIC_WEBSITE_URL}guide/en/beats/metricbeat/${DOC_LINK_VERSION}/metricbeat-installation-configuration.html`}
|
||||
target="_blank"
|
||||
>
|
||||
<EuiLink href={metricbeatInstallUrl} target="_blank">
|
||||
<FormattedMessage
|
||||
id="xpack.monitoring.metricbeatMigration.kibanaInstructions.installMetricbeatLinkText"
|
||||
defaultMessage="Follow the instructions here."
|
||||
|
@ -117,10 +114,7 @@ export function getKibanaInstructionsForEnablingMetricbeat(product, _meta, { esM
|
|||
children: (
|
||||
<EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href={`${ELASTIC_WEBSITE_URL}guide/en/beats/metricbeat/${DOC_LINK_VERSION}/metricbeat-starting.html`}
|
||||
target="_blank"
|
||||
>
|
||||
<EuiLink href={metricbeatStartUrl} target="_blank">
|
||||
<FormattedMessage
|
||||
id="xpack.monitoring.metricbeatMigration.kibanaInstructions.startMetricbeatLinkText"
|
||||
defaultMessage="Follow the instructions here."
|
||||
|
|
|
@ -14,10 +14,10 @@ import { Legacy } from '../../../../legacy_shims';
|
|||
import { getMigrationStatusStep, getSecurityStep } from '../common_instructions';
|
||||
|
||||
export function getLogstashInstructionsForEnablingMetricbeat(product, _meta, { esMonitoringUrl }) {
|
||||
const { ELASTIC_WEBSITE_URL, DOC_LINK_VERSION } = Legacy.shims.docLinks;
|
||||
const securitySetup = getSecurityStep(
|
||||
`${ELASTIC_WEBSITE_URL}guide/en/logstash/${DOC_LINK_VERSION}/monitoring-with-metricbeat.html`
|
||||
);
|
||||
const logstashUrl = Legacy.shims.docLinks.links.monitoring.monitorLogstash;
|
||||
const metricbeatInstallUrl = Legacy.shims.docLinks.links.metricbeat.install;
|
||||
const metricbeatStartUrl = Legacy.shims.docLinks.links.metricbeat.start;
|
||||
const securitySetup = getSecurityStep(logstashUrl);
|
||||
|
||||
const installMetricbeatStep = {
|
||||
title: i18n.translate(
|
||||
|
@ -29,10 +29,7 @@ export function getLogstashInstructionsForEnablingMetricbeat(product, _meta, { e
|
|||
children: (
|
||||
<EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href={`${ELASTIC_WEBSITE_URL}guide/en/beats/metricbeat/${DOC_LINK_VERSION}/metricbeat-installation-configuration.html`}
|
||||
target="_blank"
|
||||
>
|
||||
<EuiLink href={metricbeatInstallUrl} target="_blank">
|
||||
<FormattedMessage
|
||||
id="xpack.monitoring.metricbeatMigration.logstashInstructions.installMetricbeatLinkText"
|
||||
defaultMessage="Follow the instructions here."
|
||||
|
@ -117,10 +114,7 @@ export function getLogstashInstructionsForEnablingMetricbeat(product, _meta, { e
|
|||
children: (
|
||||
<EuiText>
|
||||
<p>
|
||||
<EuiLink
|
||||
href={`${ELASTIC_WEBSITE_URL}guide/en/beats/metricbeat/${DOC_LINK_VERSION}/metricbeat-starting.html`}
|
||||
target="_blank"
|
||||
>
|
||||
<EuiLink href={metricbeatStartUrl} target="_blank">
|
||||
<FormattedMessage
|
||||
id="xpack.monitoring.metricbeatMigration.logstashInstructions.startMetricbeatLinkText"
|
||||
defaultMessage="Follow the instructions here."
|
||||
|
|
|
@ -29,7 +29,7 @@ const learnMoreLabel = () =>
|
|||
});
|
||||
|
||||
const showIfLegacyOnlyIndices = () => {
|
||||
const { ELASTIC_WEBSITE_URL } = Legacy.shims.docLinks;
|
||||
const blogUrl = Legacy.shims.docLinks.links.monitoring.metricbeatBlog;
|
||||
const toast = Legacy.shims.toastNotifications.addWarning({
|
||||
title: toMountPoint(
|
||||
<FormattedMessage
|
||||
|
@ -56,11 +56,7 @@ const showIfLegacyOnlyIndices = () => {
|
|||
</EuiLink>
|
||||
|
||||
<EuiSpacer />
|
||||
<EuiLink
|
||||
href={`${ELASTIC_WEBSITE_URL}blog/external-collection-for-elastic-stack-monitoring-is-now-available-via-metricbeat`}
|
||||
external
|
||||
target="_blank"
|
||||
>
|
||||
<EuiLink href={blogUrl} external target="_blank">
|
||||
{learnMoreLabel()}
|
||||
</EuiLink>
|
||||
</div>
|
||||
|
@ -69,7 +65,7 @@ const showIfLegacyOnlyIndices = () => {
|
|||
};
|
||||
|
||||
const showIfLegacyAndMetricbeatIndices = () => {
|
||||
const { ELASTIC_WEBSITE_URL } = Legacy.shims.docLinks;
|
||||
const blogUrl = Legacy.shims.docLinks.links.monitoring.metricbeatBlog;
|
||||
const toast = Legacy.shims.toastNotifications.addWarning({
|
||||
title: toMountPoint(
|
||||
<FormattedMessage
|
||||
|
@ -96,11 +92,7 @@ const showIfLegacyAndMetricbeatIndices = () => {
|
|||
</EuiLink>
|
||||
|
||||
<EuiSpacer />
|
||||
<EuiLink
|
||||
href={`${ELASTIC_WEBSITE_URL}blog/external-collection-for-elastic-stack-monitoring-is-now-available-via-metricbeat`}
|
||||
external
|
||||
target="_blank"
|
||||
>
|
||||
<EuiLink href={blogUrl} external target="_blank">
|
||||
{learnMoreLabel()}
|
||||
</EuiLink>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue