diff --git a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md index 79c603165cae46..0a13a6d60e02f4 100644 --- a/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md +++ b/docs/development/core/public/kibana-plugin-core-public.doclinksstart.links.md @@ -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; diff --git a/src/core/public/doc_links/doc_links_service.ts b/src/core/public/doc_links/doc_links_service.ts index c732fc7823b628..96a031d6c8006d 100644 --- a/src/core/public/doc_links/doc_links_service.ts +++ b/src/core/public/doc_links/doc_links_service.ts @@ -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`, @@ -256,6 +264,7 @@ export interface DocLinksStart { readonly installation: string; readonly configuration: string; readonly elasticsearchOutput: string; + readonly elasticsearchModule: string; readonly startup: string; readonly exportedFields: string; }; @@ -264,6 +273,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; diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md index 0097127924a5cd..db865dcb206dbe 100644 --- a/src/core/public/public.api.md +++ b/src/core/public/public.api.md @@ -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; diff --git a/x-pack/plugins/monitoring/public/alerts/lib/alerts_toast.tsx b/x-pack/plugins/monitoring/public/alerts/lib/alerts_toast.tsx index 302a7f2fe469f3..434e452c8ddb8e 100644 --- a/x-pack/plugins/monitoring/public/alerts/lib/alerts_toast.tsx +++ b/x-pack/plugins/monitoring/public/alerts/lib/alerts_toast.tsx @@ -18,7 +18,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( @@ -35,11 +35,7 @@ const showTlsAndEncryptionError = () => { })}

- + {i18n.translate('xpack.monitoring.healthCheck.encryptionErrorAction', { defaultMessage: 'Learn how.', })} @@ -50,7 +46,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( @@ -67,11 +63,7 @@ const showUnableToDisableWatcherClusterAlertsError = () => { })}

- + {i18n.translate('xpack.monitoring.healthCheck.unableToDisableWatches.action', { defaultMessage: 'Learn more.', })} diff --git a/x-pack/plugins/monitoring/public/components/logs/__snapshots__/reason.test.js.snap b/x-pack/plugins/monitoring/public/components/logs/__snapshots__/reason.test.js.snap index c925ecd1c98ff8..40541aeaad4c10 100644 --- a/x-pack/plugins/monitoring/public/components/logs/__snapshots__/reason.test.js.snap +++ b/x-pack/plugins/monitoring/public/components/logs/__snapshots__/reason.test.js.snap @@ -13,7 +13,7 @@ exports[`Logs should render a default message 1`] = ` values={ Object { "link": Click here for more information @@ -67,7 +67,7 @@ exports[`Logs should render with a no cluster found reason 1`] = ` values={ Object { "link": setup @@ -92,7 +92,7 @@ exports[`Logs should render with a no index found reason 1`] = ` values={ Object { "link": setup @@ -117,7 +117,7 @@ exports[`Logs should render with a no index pattern found reason 1`] = ` values={ Object { "link": Filebeat @@ -142,7 +142,7 @@ exports[`Logs should render with a no node found reason 1`] = ` values={ Object { "link": setup @@ -167,7 +167,7 @@ exports[`Logs should render with a no structured logs reason 1`] = ` values={ Object { "link": points to JSON logs @@ -195,7 +195,7 @@ exports[`Logs should render with a no type found reason 1`] = ` values={ Object { "link": these directions diff --git a/x-pack/plugins/monitoring/public/components/logs/reason.js b/x-pack/plugins/monitoring/public/components/logs/reason.js index 55dca72bf645d3..f690574b8e6721 100644 --- a/x-pack/plugins/monitoring/public/components/logs/reason.js +++ b/x-pack/plugins/monitoring/public/components/logs/reason.js @@ -12,7 +12,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', }); @@ -22,10 +24,7 @@ export const Reason = ({ reason }) => { defaultMessage="We did not find any log data and we are unable to diagnose why. {link}" values={{ link: ( - + { defaultMessage="Set up {link}, then configure your Elasticsearch output to your monitoring cluster." values={{ link: ( - + {i18n.translate('xpack.monitoring.logs.reason.noIndexPatternLink', { defaultMessage: 'Filebeat', })} @@ -81,10 +77,7 @@ export const Reason = ({ reason }) => { defaultMessage="Follow {link} to set up Elasticsearch." values={{ link: ( - + {i18n.translate('xpack.monitoring.logs.reason.noTypeLink', { defaultMessage: 'these directions', })} @@ -104,10 +97,7 @@ export const Reason = ({ reason }) => { values={{ varPaths: var.paths, link: ( - + {i18n.translate('xpack.monitoring.logs.reason.notUsingStructuredLogsLink', { defaultMessage: 'points to JSON logs', })} @@ -126,10 +116,7 @@ export const Reason = ({ reason }) => { defaultMessage="Check that your {link} is correct." values={{ link: ( - + {i18n.translate('xpack.monitoring.logs.reason.noClusterLink', { defaultMessage: 'setup', })} @@ -148,10 +135,7 @@ export const Reason = ({ reason }) => { defaultMessage="Check that your {link} is correct." values={{ link: ( - + {i18n.translate('xpack.monitoring.logs.reason.noNodeLink', { defaultMessage: 'setup', })} @@ -170,10 +154,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: ( - + {i18n.translate('xpack.monitoring.logs.reason.noIndexLink', { defaultMessage: 'setup', })} @@ -192,10 +173,7 @@ export const Reason = ({ reason }) => { defaultMessage="There is an issue reading from your filebeat indices. {link}." values={{ link: ( - + {i18n.translate('xpack.monitoring.logs.reason.correctIndexNameLink', { defaultMessage: 'Click here for more information', })} diff --git a/x-pack/plugins/monitoring/public/components/logs/reason.test.js b/x-pack/plugins/monitoring/public/components/logs/reason.test.js index bd56c733268b73..d9e5abdf69568f 100644 --- a/x-pack/plugins/monitoring/public/components/logs/reason.test.js +++ b/x-pack/plugins/monitoring/public/components/logs/reason.test.js @@ -14,6 +14,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', + }, + }, }, }, }, diff --git a/x-pack/plugins/monitoring/public/components/metricbeat_migration/flyout/__snapshots__/flyout.test.js.snap b/x-pack/plugins/monitoring/public/components/metricbeat_migration/flyout/__snapshots__/flyout.test.js.snap index 2f29cd9122a610..6fcdfcd044ea2f 100644 --- a/x-pack/plugins/monitoring/public/components/metricbeat_migration/flyout/__snapshots__/flyout.test.js.snap +++ b/x-pack/plugins/monitoring/public/components/metricbeat_migration/flyout/__snapshots__/flyout.test.js.snap @@ -156,7 +156,7 @@ exports[`Flyout apm part two should show instructions to migrate to metricbeat 1 "children":

({ 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', + }, + }, }, }, }, diff --git a/x-pack/plugins/monitoring/public/components/metricbeat_migration/instruction_steps/apm/enable_metricbeat_instructions.js b/x-pack/plugins/monitoring/public/components/metricbeat_migration/instruction_steps/apm/enable_metricbeat_instructions.js index c176a84bc8db3d..dbccddf979209d 100644 --- a/x-pack/plugins/monitoring/public/components/metricbeat_migration/instruction_steps/apm/enable_metricbeat_instructions.js +++ b/x-pack/plugins/monitoring/public/components/metricbeat_migration/instruction_steps/apm/enable_metricbeat_instructions.js @@ -12,10 +12,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( @@ -27,10 +27,7 @@ export function getApmInstructionsForEnablingMetricbeat(product, _meta, { esMoni children: (

- +

- +

- +

- +

- +

- +

- +

- +

- +

- + }); 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( { - + {learnMoreLabel()} @@ -68,7 +64,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( { - + {learnMoreLabel()}