Skip to content

Commit

Permalink
Use doc link service in Stack Monitoring (#88920) (#89019)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl authored Jan 21, 2021
1 parent 22d85e7 commit a62c07b
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions src/core/public/doc_links/doc_links_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,12 @@ export class DocLinksService {
guide: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/maps.html`,
},
monitoring: {
alertsCluster: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/cluster-alerts.html`,
alertsKibana: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html`,
alertsKibanaCpuThreshold: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-cpu-threshold`,
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`,
monitorElasticsearch: `${ELASTICSEARCH_DOCS}configuring-metricbeat.html`,
monitorKibana: `${ELASTIC_WEBSITE_URL}guide/en/kibana/${DOC_LINK_VERSION}/monitoring-metricbeat.html`,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function createCCRReadExceptionsAlertType(): AlertTypeModel<ValidateOptio
description: ALERT_DETAILS[ALERT_CCR_READ_EXCEPTIONS].description,
iconClass: 'bell',
documentationUrl(docLinks) {
return `${docLinks.ELASTIC_WEBSITE_URL}guide/en/kibana/${docLinks.DOC_LINK_VERSION}/kibana-alerts.html`;
return `${docLinks.links.monitoring.alertsKibana}`;
},
alertParamsExpression: (props: Props) => (
<Expression {...props} paramDetails={ALERT_DETAILS[ALERT_CCR_READ_EXCEPTIONS].paramDetails} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function createCpuUsageAlertType(): AlertTypeModel<MonitoringAlertTypePar
description: ALERT_DETAILS[ALERT_CPU_USAGE].description,
iconClass: 'bell',
documentationUrl(docLinks) {
return `${docLinks.ELASTIC_WEBSITE_URL}guide/en/kibana/${docLinks.DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-cpu-threshold`;
return `${docLinks.links.monitoring.alertsKibanaCpuThreshold}`;
},
alertParamsExpression: (props: Props) => (
<Expression {...props} paramDetails={ALERT_DETAILS[ALERT_CPU_USAGE].paramDetails} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function createDiskUsageAlertType(): AlertTypeModel<MonitoringAlertTypePa
description: ALERT_DETAILS[ALERT_DISK_USAGE].description,
iconClass: 'bell',
documentationUrl(docLinks) {
return `${docLinks.ELASTIC_WEBSITE_URL}guide/en/kibana/${docLinks.DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-disk-usage-threshold`;
return `${docLinks.links.monitoring.alertsKibanaDiskThreshold}`;
},
alertParamsExpression: (props: Props) => (
<Expression {...props} paramDetails={ALERT_DETAILS[ALERT_DISK_USAGE].paramDetails} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function createLegacyAlertTypes(): AlertTypeModel[] {
description: LEGACY_ALERT_DETAILS[legacyAlert].description,
iconClass: 'bell',
documentationUrl(docLinks) {
return `${docLinks.ELASTIC_WEBSITE_URL}guide/en/kibana/${docLinks.DOC_LINK_VERSION}/cluster-alerts.html`;
return `${docLinks.links.monitoring.alertsCluster}`;
},
alertParamsExpression: () => (
<Fragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function createMemoryUsageAlertType(): AlertTypeModel<MonitoringAlertType
description: ALERT_DETAILS[ALERT_MEMORY_USAGE].description,
iconClass: 'bell',
documentationUrl(docLinks) {
return `${docLinks.ELASTIC_WEBSITE_URL}guide/en/kibana/${docLinks.DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-jvm-memory-threshold`;
return `${docLinks.links.monitoring.alertsKibanaJvmThreshold}`;
},
alertParamsExpression: (props: Props) => (
<Expression {...props} paramDetails={ALERT_DETAILS[ALERT_MEMORY_USAGE].paramDetails} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function createMissingMonitoringDataAlertType(): AlertTypeModel {
description: ALERT_DETAILS[ALERT_MISSING_MONITORING_DATA].description,
iconClass: 'bell',
documentationUrl(docLinks) {
return `${docLinks.ELASTIC_WEBSITE_URL}guide/en/kibana/${docLinks.DOC_LINK_VERSION}/kibana-alerts.html#kibana-alerts-missing-monitoring-data`;
return `${docLinks.links.monitoring.alertsKibanaMissingData}`;
},
alertParamsExpression: (props: any) => (
<Expression
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function createThreadPoolRejectionsAlertType(
description: threadPoolAlertDetails.description,
iconClass: 'bell',
documentationUrl(docLinks) {
return `${docLinks.ELASTIC_WEBSITE_URL}guide/en/kibana/${docLinks.DOC_LINK_VERSION}/kibana-alerts.html`;
return `${docLinks.links.monitoring.alertsKibana}`;
},
alertParamsExpression: (props: Props) => (
<>
Expand Down

0 comments on commit a62c07b

Please sign in to comment.