Tutorial migration (#54910)

This commit is contained in:
Joe Reuter 2020-01-22 15:31:11 +01:00 committed by GitHub
parent 7b145bffa0
commit 7c40a24fcc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
119 changed files with 3346 additions and 3672 deletions

View file

@ -1,50 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import expect from '@kbn/expect';
import { patternToIngest, ingestToPattern } from '../convert_pattern_and_ingest_name';
describe('convertPatternAndTemplateName', function() {
describe('ingestToPattern', function() {
it("should convert an index template's name to its matching index pattern's title", function() {
expect(ingestToPattern('kibana-logstash-*')).to.be('logstash-*');
});
it("should throw an error if the template name isn't a valid kibana namespaced name", function() {
expect(ingestToPattern)
.withArgs('logstash-*')
.to.throwException('not a valid kibana namespaced template name');
expect(ingestToPattern)
.withArgs('')
.to.throwException(/not a valid kibana namespaced template name/);
});
});
describe('patternToIngest', function() {
it("should convert an index pattern's title to its matching index template's name", function() {
expect(patternToIngest('logstash-*')).to.be('kibana-logstash-*');
});
it('should throw an error if the pattern is empty', function() {
expect(patternToIngest)
.withArgs('')
.to.throwException(/pattern must not be empty/);
});
});
});

View file

@ -1,39 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// To avoid index template naming collisions the index pattern creation API
// namespaces template names by prepending 'kibana-' to the matching pattern's title.
// e.g. a pattern with title `logstash-*` will have a matching template named `kibana-logstash-*`.
// This module provides utility functions for easily converting between template and pattern names.
export function ingestToPattern(templateName) {
if (templateName.indexOf('kibana-') === -1) {
throw new Error('not a valid kibana namespaced template name');
}
return templateName.slice(templateName.indexOf('-') + 1);
}
export function patternToIngest(patternName) {
if (patternName === '') {
throw new Error('pattern must not be empty');
}
return `kibana-${patternName.toLowerCase()}`;
}

View file

@ -1,25 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
export const TUTORIAL_CATEGORY = {
LOGGING: 'logging',
SIEM: 'siem',
METRICS: 'metrics',
OTHER: 'other',
};

View file

@ -1,139 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import Joi from 'joi';
import { PARAM_TYPES } from './param_types';
import { TUTORIAL_CATEGORY } from './tutorial_category';
const dashboardSchema = Joi.object({
id: Joi.string().required(), // Dashboard saved object id
linkLabel: Joi.string().when('isOverview', {
is: true,
then: Joi.required(),
}),
// Is this an Overview / Entry Point dashboard?
isOverview: Joi.boolean().required(),
});
const artifactsSchema = Joi.object({
// Fields present in Elasticsearch documents created by this product.
exportedFields: Joi.object({
documentationUrl: Joi.string().required(),
}),
// Kibana dashboards created by this product.
dashboards: Joi.array()
.items(dashboardSchema)
.required(),
application: Joi.object({
path: Joi.string().required(),
label: Joi.string().required(),
}),
});
const statusCheckSchema = Joi.object({
title: Joi.string(),
text: Joi.string(),
btnLabel: Joi.string(),
success: Joi.string(),
error: Joi.string(),
esHitsCheck: Joi.object({
index: Joi.alternatives()
.try(Joi.string(), Joi.array().items(Joi.string()))
.required(),
query: Joi.object().required(),
}).required(),
});
const instructionSchema = Joi.object({
title: Joi.string(),
textPre: Joi.string(),
commands: Joi.array().items(Joi.string().allow('')),
textPost: Joi.string(),
});
const instructionVariantSchema = Joi.object({
id: Joi.string().required(),
instructions: Joi.array()
.items(instructionSchema)
.required(),
});
const instructionSetSchema = Joi.object({
title: Joi.string(),
callOut: Joi.object({
title: Joi.string().required(),
message: Joi.string(),
iconType: Joi.string(),
}),
// Variants (OSes, languages, etc.) for which tutorial instructions are specified.
instructionVariants: Joi.array()
.items(instructionVariantSchema)
.required(),
statusCheck: statusCheckSchema,
});
const paramSchema = Joi.object({
defaultValue: Joi.required(),
id: Joi.string()
.regex(/^[a-zA-Z_]+$/)
.required(),
label: Joi.string().required(),
type: Joi.string()
.valid(Object.values(PARAM_TYPES))
.required(),
});
const instructionsSchema = Joi.object({
instructionSets: Joi.array()
.items(instructionSetSchema)
.required(),
params: Joi.array().items(paramSchema),
});
export const tutorialSchema = {
id: Joi.string()
.regex(/^[a-zA-Z0-9-]+$/)
.required(),
category: Joi.string()
.valid(Object.values(TUTORIAL_CATEGORY))
.required(),
name: Joi.string().required(),
isBeta: Joi.boolean().default(false),
shortDescription: Joi.string().required(),
euiIconType: Joi.string(), //EUI icon type string, one of https://elastic.github.io/eui/#/icons
longDescription: Joi.string().required(),
completionTimeMinutes: Joi.number().integer(),
previewImagePath: Joi.string(),
// kibana and elastic cluster running on prem
onPrem: instructionsSchema.required(),
// kibana and elastic cluster running in elastic's cloud
elasticCloud: instructionsSchema,
// kibana running on prem and elastic cluster running in elastic's cloud
onPremElasticCloud: instructionsSchema,
// Elastic stack artifacts produced by product when it is setup and run.
artifacts: artifactsSchema,
// saved objects used by data module.
savedObjects: Joi.array().items(),
savedObjectsInstallMsg: Joi.string(),
};

View file

@ -24,10 +24,8 @@ import { promisify } from 'util';
import { migrations } from './migrations';
import { importApi } from './server/routes/api/import';
import { exportApi } from './server/routes/api/export';
import { homeApi } from './server/routes/api/home';
import { managementApi } from './server/routes/api/management';
import { registerFieldFormats } from './server/field_formats/register';
import { registerTutorials } from './server/tutorials/register';
import * as systemApi from './server/lib/system_api';
import mappings from './mappings.json';
import { getUiSettingDefaults } from './ui_setting_defaults';
@ -332,10 +330,8 @@ export default function(kibana) {
// routes
importApi(server);
exportApi(server);
homeApi(server);
managementApi(server);
registerFieldFormats(server);
registerTutorials(server);
registerCspCollector(usageCollection, server);
server.expose('systemApi', systemApi);
server.injectUiAppVars('kibana', () => injectVars(server));

View file

@ -22,7 +22,7 @@ import PropTypes from 'prop-types';
import { Instruction } from './instruction';
import { ParameterForm } from './parameter_form';
import { Content } from './content';
import { getDisplayText } from '../../../../../common/tutorials/instruction_variant';
import { getDisplayText } from '../../../../../../../../plugins/home/server/tutorials/instructions/instruction_variant';
import {
EuiTabs,
EuiTab,

View file

@ -21,7 +21,6 @@ import _ from 'lodash';
import { getServices } from '../kibana_services';
import { i18n } from '@kbn/i18n';
const baseUrlLP = getServices().addBasePath('/api/kibana/home/tutorials_LP');
const baseUrl = getServices().addBasePath('/api/kibana/home/tutorials');
const headers = new Headers();
headers.append('Accept', 'application/json');
@ -29,42 +28,25 @@ headers.append('Content-Type', 'application/json');
headers.append('kbn-xsrf', 'kibana');
let tutorials = [];
let tutorialsLegacyPlatform = [];
let tutorialsNewPlatform = [];
let tutorialsLoaded = false;
async function loadTutorials() {
try {
const responseLegacyPlatform = await fetch(baseUrlLP, {
const response = await fetch(baseUrl, {
method: 'get',
credentials: 'include',
headers: headers,
});
if (responseLegacyPlatform.status >= 300) {
if (response.status >= 300) {
throw new Error(
i18n.translate('kbn.home.loadTutorials.requestFailedErrorMessage', {
defaultMessage: 'Request failed with status code: {status}',
values: { status: responseLegacyPlatform.status },
})
);
}
const responseNewPlatform = await fetch(baseUrl, {
method: 'get',
credentials: 'include',
headers: headers,
});
if (responseNewPlatform.status >= 300) {
throw new Error(
i18n.translate('kbn.home.loadTutorials.requestFailedErrorMessage', {
defaultMessage: 'Request failed with status code: {status}',
values: { status: responseNewPlatform.status },
values: { status: response.status },
})
);
}
tutorialsLegacyPlatform = await responseLegacyPlatform.json();
tutorialsNewPlatform = await responseNewPlatform.json();
tutorials = tutorialsLegacyPlatform.concat(tutorialsNewPlatform);
tutorials = await response.json();
tutorialsLoaded = true;
} catch (err) {
getServices().toastNotifications.addDanger({

View file

@ -1,24 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { registerTutorials } from './register_tutorials';
export function homeApi(server) {
registerTutorials(server);
}

View file

@ -1,28 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
export function registerTutorials(server) {
server.route({
path: '/api/kibana/home/tutorials_LP',
method: ['GET'],
handler: function(req) {
return server.getTutorials(req);
},
});
}

View file

@ -1,109 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { onPremInstructions } from './envs/on_prem';
import { createElasticCloudInstructions } from './envs/elastic_cloud';
import apmIndexPattern from './index_pattern.json';
const apmIntro = i18n.translate('kbn.server.tutorials.apm.introduction', {
defaultMessage: 'Collect in-depth performance metrics and errors from inside your applications.',
});
function isEnabled(config) {
const ENABLED_KEY = 'xpack.apm.ui.enabled';
if (config.has(ENABLED_KEY)) {
return config.get(ENABLED_KEY);
}
return false;
}
export function apmSpecProvider(server) {
const config = server.config();
const apmIndexPatternTitle = config.get('apm_oss.indexPattern');
const { cloud } = server.newPlatform.setup;
const savedObjects = [
{
...apmIndexPattern,
attributes: {
...apmIndexPattern.attributes,
title: apmIndexPatternTitle,
},
},
];
const artifacts = {
dashboards: [
{
id: '8d3ed660-7828-11e7-8c47-65b845b5cfb3',
linkLabel: i18n.translate(
'kbn.server.tutorials.apm.specProvider.artifacts.dashboards.linkLabel',
{
defaultMessage: 'APM dashboard',
}
),
isOverview: true,
},
],
};
if (isEnabled(config)) {
artifacts.application = {
path: '/app/apm',
label: i18n.translate('kbn.server.tutorials.apm.specProvider.artifacts.application.label', {
defaultMessage: 'Launch APM',
}),
};
}
return {
id: 'apm',
name: i18n.translate('kbn.server.tutorials.apm.specProvider.name', {
defaultMessage: 'APM',
}),
category: TUTORIAL_CATEGORY.OTHER,
shortDescription: apmIntro,
longDescription: i18n.translate('kbn.server.tutorials.apm.specProvider.longDescription', {
defaultMessage:
'Application Performance Monitoring (APM) collects in-depth \
performance metrics and errors from inside your application. \
It allows you to monitor the performance of thousands of applications in real time. \
[Learn more]({learnMoreLink}).',
values: {
learnMoreLink:
'{config.docs.base_url}guide/en/apm/get-started/{config.docs.version}/index.html',
},
}),
euiIconType: 'logoAPM',
artifacts,
onPrem: onPremInstructions(config),
elasticCloud: createElasticCloudInstructions(cloud),
previewImagePath: '/plugins/kibana/home/tutorial_resources/apm/apm.png',
savedObjects,
savedObjectsInstallMsg: i18n.translate(
'kbn.server.tutorials.apm.specProvider.savedObjectsInstallMsg',
{
defaultMessage: 'An APM index pattern is required for some features in the APM UI.',
}
),
};
}

View file

@ -1,165 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { systemLogsSpecProvider } from './system_logs';
import { systemMetricsSpecProvider } from './system_metrics';
import { apacheLogsSpecProvider } from './apache_logs';
import { apacheMetricsSpecProvider } from './apache_metrics';
import { elasticsearchLogsSpecProvider } from './elasticsearch_logs';
import { iisLogsSpecProvider } from './iis_logs';
import { kafkaLogsSpecProvider } from './kafka_logs';
import { logstashLogsSpecProvider } from './logstash_logs';
import { nginxLogsSpecProvider } from './nginx_logs';
import { nginxMetricsSpecProvider } from './nginx_metrics';
import { mysqlLogsSpecProvider } from './mysql_logs';
import { mysqlMetricsSpecProvider } from './mysql_metrics';
import { mongodbMetricsSpecProvider } from './mongodb_metrics';
import { osqueryLogsSpecProvider } from './osquery_logs';
import { phpfpmMetricsSpecProvider } from './php_fpm_metrics';
import { postgresqlMetricsSpecProvider } from './postgresql_metrics';
import { postgresqlLogsSpecProvider } from './postgresql_logs';
import { rabbitmqMetricsSpecProvider } from './rabbitmq_metrics';
import { redisLogsSpecProvider } from './redis_logs';
import { redisMetricsSpecProvider } from './redis_metrics';
import { suricataLogsSpecProvider } from './suricata_logs';
import { dockerMetricsSpecProvider } from './docker_metrics';
import { kubernetesMetricsSpecProvider } from './kubernetes_metrics';
import { uwsgiMetricsSpecProvider } from './uwsgi_metrics';
import { netflowSpecProvider } from './netflow';
import { traefikLogsSpecProvider } from './traefik_logs';
import { apmSpecProvider } from './apm';
import { cephMetricsSpecProvider } from './ceph_metrics';
import { aerospikeMetricsSpecProvider } from './aerospike_metrics';
import { couchbaseMetricsSpecProvider } from './couchbase_metrics';
import { dropwizardMetricsSpecProvider } from './dropwizard_metrics';
import { elasticsearchMetricsSpecProvider } from './elasticsearch_metrics';
import { etcdMetricsSpecProvider } from './etcd_metrics';
import { haproxyMetricsSpecProvider } from './haproxy_metrics';
import { kafkaMetricsSpecProvider } from './kafka_metrics';
import { kibanaMetricsSpecProvider } from './kibana_metrics';
import { memcachedMetricsSpecProvider } from './memcached_metrics';
import { muninMetricsSpecProvider } from './munin_metrics';
import { vSphereMetricsSpecProvider } from './vsphere_metrics';
import { windowsMetricsSpecProvider } from './windows_metrics';
import { windowsEventLogsSpecProvider } from './windows_event_logs';
import { golangMetricsSpecProvider } from './golang_metrics';
import { logstashMetricsSpecProvider } from './logstash_metrics';
import { prometheusMetricsSpecProvider } from './prometheus_metrics';
import { zookeeperMetricsSpecProvider } from './zookeeper_metrics';
import { uptimeMonitorsSpecProvider } from './uptime_monitors';
import { cloudwatchLogsSpecProvider } from './cloudwatch_logs';
import { awsMetricsSpecProvider } from './aws_metrics';
import { mssqlMetricsSpecProvider } from './mssql_metrics';
import { natsMetricsSpecProvider } from './nats_metrics';
import { natsLogsSpecProvider } from './nats_logs';
import { zeekLogsSpecProvider } from './zeek_logs';
import { corednsMetricsSpecProvider } from './coredns_metrics';
import { corednsLogsSpecProvider } from './coredns_logs';
import { auditbeatSpecProvider } from './auditbeat';
import { iptablesLogsSpecProvider } from './iptables_logs';
import { ciscoLogsSpecProvider } from './cisco_logs';
import { envoyproxyLogsSpecProvider } from './envoyproxy_logs';
import { couchdbMetricsSpecProvider } from './couchdb_metrics';
import { emsBoundariesSpecProvider } from './ems';
import { consulMetricsSpecProvider } from './consul_metrics';
import { cockroachdbMetricsSpecProvider } from './cockroachdb_metrics';
import { traefikMetricsSpecProvider } from './traefik_metrics';
import { awsLogsSpecProvider } from './aws_logs';
import { activemqLogsSpecProvider } from './activemq_logs';
import { activemqMetricsSpecProvider } from './activemq_metrics';
import { azureMetricsSpecProvider } from './azure_metrics';
import { ibmmqLogsSpecProvider } from './ibmmq_logs';
import { ibmmqMetricsSpecProvider } from './ibmmq_metrics';
import { stanMetricsSpecProvider } from './stan_metrics';
import { envoyproxyMetricsSpecProvider } from './envoyproxy_metrics';
export function registerTutorials(server) {
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(systemLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(systemMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(apacheLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(apacheMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(elasticsearchLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(iisLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(kafkaLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(logstashLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(nginxLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(nginxMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(mysqlLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(mysqlMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(mongodbMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(osqueryLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(phpfpmMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(postgresqlMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(postgresqlLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(rabbitmqMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(redisLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(redisMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(suricataLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(dockerMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(kubernetesMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(uwsgiMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(netflowSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(traefikLogsSpecProvider);
server.registerTutorial(apmSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(cephMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(aerospikeMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(couchbaseMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(dropwizardMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(
elasticsearchMetricsSpecProvider
);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(etcdMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(haproxyMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(kafkaMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(kibanaMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(memcachedMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(muninMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(vSphereMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(windowsMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(windowsEventLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(golangMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(logstashMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(prometheusMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(zookeeperMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(uptimeMonitorsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(cloudwatchLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(awsMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(mssqlMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(natsMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(natsLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(zeekLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(corednsMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(corednsLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(auditbeatSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(iptablesLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(ciscoLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(envoyproxyLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(couchdbMetricsSpecProvider);
server.registerTutorial(emsBoundariesSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(consulMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(cockroachdbMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(traefikMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(awsLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(activemqLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(activemqMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(azureMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(ibmmqLogsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(ibmmqMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(stanMetricsSpecProvider);
server.newPlatform.setup.plugins.home.tutorials.registerTutorial(envoyproxyMetricsSpecProvider);
}

View file

@ -1,63 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import Joi from 'joi';
import { tutorialSchema } from '../core_plugins/kibana/common/tutorials/tutorial_schema';
export function tutorialsMixin(kbnServer, server) {
const tutorialProviders = [];
const scopedTutorialContextFactories = [];
server.decorate('server', 'getTutorials', request => {
const initialContext = {};
const scopedContext = scopedTutorialContextFactories.reduce(
(accumulatedContext, contextFactory) => {
return { ...accumulatedContext, ...contextFactory(request) };
},
initialContext
);
return tutorialProviders.map(tutorialProvider => {
return tutorialProvider(server, scopedContext);
});
});
server.decorate('server', 'registerTutorial', specProvider => {
// registration during setup
const emptyContext = {};
const { error } = Joi.validate(specProvider(server, emptyContext), tutorialSchema);
if (error) {
throw new Error(`Unable to register tutorial spec because its invalid. ${error}`);
}
tutorialProviders.push(specProvider);
});
server.decorate('server', 'addScopedTutorialContextFactory', scopedTutorialContextFactory => {
// returned by the setup method of the new plugin, they will do the same thing as now
if (typeof scopedTutorialContextFactory !== 'function') {
throw new Error(
`Unable to add scoped(request) context factory because you did not provide a function`
);
}
scopedTutorialContextFactories.push(scopedTutorialContextFactory);
});
}

View file

@ -1,89 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { tutorialsMixin } from './tutorials_mixin';
const validTutorial = {
id: 'spec1',
category: 'other',
name: 'spec1',
shortDescription: 'short description',
longDescription: 'long description',
onPrem: {
instructionSets: [
{
instructionVariants: [
{
id: 'instructionVariant1',
instructions: [{}],
},
],
},
],
},
};
describe('tutorial mixins', () => {
let getTutorials;
let registerTutorial;
let addScopedTutorialContextFactory;
const serverMock = { decorate: jest.fn() };
beforeEach(async () => {
await tutorialsMixin({}, serverMock);
[
[, , getTutorials],
[, , registerTutorial],
[, , addScopedTutorialContextFactory],
] = serverMock.decorate.mock.calls;
});
afterEach(() => {
jest.clearAllMocks();
});
describe('scoped context', () => {
const mockRequest = {};
const spacesContextFactory = request => {
if (request !== mockRequest) {
throw new Error('context factory not called with request object');
}
return {
spaceId: 'my-space',
};
};
const specProvider = (server, context) => {
const tutorial = { ...validTutorial };
tutorial.shortDescription = `I have been provided with scoped context, spaceId: ${context.spaceId}`;
return tutorial;
};
beforeEach(async () => {
addScopedTutorialContextFactory(spacesContextFactory);
registerTutorial(specProvider);
});
test('passes scoped context to specProviders', () => {
const tutorials = getTutorials(mockRequest);
expect(tutorials.length).toBe(1);
expect(tutorials[0].shortDescription).toBe(
'I have been provided with scoped context, spaceId: my-space'
);
});
});
});

View file

@ -18,7 +18,6 @@
*/
import { fieldFormatsMixin } from './field_formats';
import { tutorialsMixin } from './tutorials_mixin';
import { uiAppsMixin } from './ui_apps';
import { uiBundlesMixin } from './ui_bundles';
import { uiRenderMixin } from './ui_render';
@ -29,6 +28,5 @@ export async function uiMixin(kbnServer) {
await kbnServer.mixin(uiBundlesMixin);
await kbnServer.mixin(uiSettingsMixin);
await kbnServer.mixin(fieldFormatsMixin);
await kbnServer.mixin(tutorialsMixin);
await kbnServer.mixin(uiRenderMixin);
}

View file

@ -24,3 +24,6 @@ import { PluginInitializerContext } from 'src/core/server';
import { HomeServerPlugin } from './plugin';
export const plugin = (initContext: PluginInitializerContext) => new HomeServerPlugin(initContext);
export { INSTRUCTION_VARIANT } from './tutorials/instructions/instruction_variant';
export { ArtifactsSchema, TutorialsCategory } from './services/tutorials';

View file

@ -26,17 +26,30 @@ export enum TutorialsCategory {
METRICS = 'metrics',
OTHER = 'other',
}
export type Platform = 'WINDOWS' | 'OSX' | 'DEB' | 'RPM';
export interface ParamTypes {
NUMBER: string;
STRING: string;
}
export interface Instruction {
title?: string;
textPre?: string;
commands?: string[];
textPost?: string;
}
export interface InstructionVariant {
id: string;
instructions: Instruction[];
}
export interface InstructionSetSchema {
readonly title: string;
readonly callOut: {
readonly title?: string;
readonly callOut?: {
title: string;
message: string;
iconType: IconType;
message?: string;
iconType?: IconType;
};
instructionVariants: InstructionVariant[];
}
export interface ParamsSchema {
defaultValue: any;
@ -46,22 +59,19 @@ export interface ParamsSchema {
}
export interface InstructionsSchema {
readonly instructionSets: InstructionSetSchema[];
readonly params: ParamsSchema[];
readonly params?: ParamsSchema[];
}
export interface DashboardSchema {
id: string;
linkLabel?: {
is: boolean;
then: any;
};
linkLabel?: string;
isOverview: boolean;
}
export interface ArtifactsSchema {
readonly exportedFields: {
exportedFields?: {
documentationUrl: string;
};
readonly dashboards: DashboardSchema[];
readonly application: {
dashboards: DashboardSchema[];
application?: {
path: string;
label: string;
};
@ -70,29 +80,32 @@ export interface TutorialSchema {
id: string;
category: TutorialsCategory;
name: string;
isBeta: boolean;
isBeta?: boolean;
shortDescription: string;
euiIconType: IconType; // EUI icon type string, one of https://elastic.github.io/eui/#/icon;
euiIconType?: IconType; // EUI icon type string, one of https://elastic.github.io/eui/#/icon;
longDescription: string;
completionTimeMinutes: number;
previewImagePath: string;
completionTimeMinutes?: number;
previewImagePath?: string;
// kibana and elastic cluster running on prem
onPrem: InstructionsSchema;
// kibana and elastic cluster running in elastic's cloud
elasticCloud: InstructionsSchema;
elasticCloud?: InstructionsSchema;
// kibana running on prem and elastic cluster running in elastic's cloud
onPremElasticCloud: InstructionsSchema;
onPremElasticCloud?: InstructionsSchema;
// Elastic stack artifacts produced by product when it is setup and run.
artifacts: ArtifactsSchema;
artifacts?: ArtifactsSchema;
// saved objects used by data module.
savedObjects: any[];
savedObjectsInstallMsg: string;
savedObjects?: any[];
savedObjectsInstallMsg?: string;
}
export type TutorialProvider = (context: { [key: string]: unknown }) => TutorialSchema;
export interface TutorialContext {
[key: string]: unknown;
}
export type TutorialProvider = (context: TutorialContext) => TutorialSchema;
export type TutorialContextFactory = (req: KibanaRequest) => { [key: string]: unknown };
export type ScopedTutorialContextFactory = (...args: any[]) => any;

View file

@ -25,6 +25,7 @@ import {
ScopedTutorialContextFactory,
} from './lib/tutorials_registry_types';
import { tutorialSchema } from './lib/tutorial_schema';
import { builtInTutorials } from '../../tutorials/register';
export class TutorialsRegistry {
private readonly tutorialProviders: TutorialProvider[] = []; // pre-register all the tutorials we know we want in here
@ -77,6 +78,8 @@ export class TutorialsRegistry {
}
public start() {
// pre-populate with built in tutorials
this.tutorialProviders.push(...builtInTutorials);
return {};
}
}

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function activemqLogsSpecProvider(server, context) {
export function activemqLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'activemq';
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'];
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const;
return {
id: 'activemqLogs',
name: i18n.translate('kbn.server.tutorials.activemqLogs.nameTitle', {
name: i18n.translate('home.tutorials.activemqLogs.nameTitle', {
defaultMessage: 'ActiveMQ logs',
}),
category: TUTORIAL_CATEGORY.LOGGING,
shortDescription: i18n.translate('kbn.server.tutorials.activemqLogs.shortDescription', {
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.tutorials.activemqLogs.shortDescription', {
defaultMessage: 'Collect ActiveMQ logs with Filebeat.',
}),
longDescription: i18n.translate('kbn.server.tutorials.activemqLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.activemqLogs.longDescription', {
defaultMessage: 'Collect ActiveMQ logs with Filebeat. \
[Learn more]({learnMoreLink}).',
values: {
@ -49,12 +53,9 @@ export function activemqLogsSpecProvider(server, context) {
dashboards: [
{
id: '26434790-1464-11ea-8fd8-030a13064883',
linkLabel: i18n.translate(
'kbn.server.tutorials.activemqLogs.artifacts.dashboards.linkLabel',
{
defaultMessage: 'ActiveMQ Application Events',
}
),
linkLabel: i18n.translate('home.tutorials.activemqLogs.artifacts.dashboards.linkLabel', {
defaultMessage: 'ActiveMQ Application Events',
}),
isOverview: true,
},
],

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialsCategory,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function activemqMetricsSpecProvider(context) {
export function activemqMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'activemq';
return {
id: 'activemqMetrics',
name: i18n.translate('kbn.server.tutorials.activemqMetrics.nameTitle', {
name: i18n.translate('home.tutorials.activemqMetrics.nameTitle', {
defaultMessage: 'ActiveMQ metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.activemqMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.activemqMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from ActiveMQ instances.',
}),
longDescription: i18n.translate('kbn.server.tutorials.activemqMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.activemqMetrics.longDescription', {
defaultMessage:
'The `activemq` Metricbeat module fetches monitoring metrics from ActiveMQ instances \
[Learn more]({learnMoreLink}).',
@ -48,7 +52,7 @@ export function activemqMetricsSpecProvider(context) {
isBeta: true,
artifacts: {
application: {
label: i18n.translate('kbn.server.tutorials.activemqMetrics.artifacts.application.label', {
label: i18n.translate('home.tutorials.activemqMetrics.artifacts.application.label', {
defaultMessage: 'Discover',
}),
path: '/app/kibana#/discover',
@ -59,7 +63,7 @@ export function activemqMetricsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialsCategory,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function aerospikeMetricsSpecProvider(context) {
export function aerospikeMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'aerospike';
return {
id: 'aerospikeMetrics',
name: i18n.translate('kbn.server.tutorials.aerospikeMetrics.nameTitle', {
name: i18n.translate('home.tutorials.aerospikeMetrics.nameTitle', {
defaultMessage: 'Aerospike metrics',
}),
isBeta: false,
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.aerospikeMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.aerospikeMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from the Aerospike server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.aerospikeMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.aerospikeMetrics.longDescription', {
defaultMessage:
'The `aerospike` Metricbeat module fetches internal metrics from Aerospike. \
[Learn more]({learnMoreLink}).',
@ -48,7 +52,7 @@ export function aerospikeMetricsSpecProvider(context) {
euiIconType: 'logoAerospike',
artifacts: {
application: {
label: i18n.translate('kbn.server.tutorials.aerospikeMetrics.artifacts.application.label', {
label: i18n.translate('home.tutorials.aerospikeMetrics.artifacts.application.label', {
defaultMessage: 'Discover',
}),
path: '/app/kibana#/discover',
@ -59,7 +63,7 @@ export function aerospikeMetricsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function apacheLogsSpecProvider(context) {
export function apacheLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'apache';
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'];
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const;
return {
id: 'apacheLogs',
name: i18n.translate('kbn.server.tutorials.apacheLogs.nameTitle', {
name: i18n.translate('home.tutorials.apacheLogs.nameTitle', {
defaultMessage: 'Apache logs',
}),
category: TUTORIAL_CATEGORY.LOGGING,
shortDescription: i18n.translate('kbn.server.tutorials.apacheLogs.shortDescription', {
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.tutorials.apacheLogs.shortDescription', {
defaultMessage: 'Collect and parse access and error logs created by the Apache HTTP server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.apacheLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.apacheLogs.longDescription', {
defaultMessage:
'The apache Filebeat module parses access and error logs created by the Apache HTTP server. \
[Learn more]({learnMoreLink}).',
@ -50,12 +54,9 @@ export function apacheLogsSpecProvider(context) {
dashboards: [
{
id: 'Filebeat-Apache-Dashboard-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.apacheLogs.artifacts.dashboards.linkLabel',
{
defaultMessage: 'Apache logs dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.apacheLogs.artifacts.dashboards.linkLabel', {
defaultMessage: 'Apache logs dashboard',
}),
isOverview: true,
},
],

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function apacheMetricsSpecProvider(context) {
export function apacheMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'apache';
return {
id: 'apacheMetrics',
name: i18n.translate('kbn.server.tutorials.apacheMetrics.nameTitle', {
name: i18n.translate('home.tutorials.apacheMetrics.nameTitle', {
defaultMessage: 'Apache metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.apacheMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.apacheMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from the Apache 2 HTTP server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.apacheMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.apacheMetrics.longDescription', {
defaultMessage:
'The `apache` Metricbeat module fetches internal metrics from the Apache 2 HTTP server. \
[Learn more]({learnMoreLink}).',
@ -49,12 +53,9 @@ export function apacheMetricsSpecProvider(context) {
dashboards: [
{
id: 'Metricbeat-Apache-HTTPD-server-status-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.apacheMetrics.artifacts.dashboards.linkLabel',
{
defaultMessage: 'Apache metrics dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.apacheMetrics.artifacts.dashboards.linkLabel', {
defaultMessage: 'Apache metrics dashboard',
}),
isOverview: true,
},
],
@ -64,7 +65,7 @@ export function apacheMetricsSpecProvider(context) {
},
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/apache_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/auditbeat_instructions';
} from '../instructions/auditbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function auditbeatSpecProvider(context) {
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'];
export function auditbeatSpecProvider(context: TutorialContext): TutorialSchema {
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const;
return {
id: 'auditbeat',
name: i18n.translate('kbn.server.tutorials.auditbeat.nameTitle', {
name: i18n.translate('home.tutorials.auditbeat.nameTitle', {
defaultMessage: 'Auditbeat',
}),
category: TUTORIAL_CATEGORY.SIEM,
shortDescription: i18n.translate('kbn.server.tutorials.auditbeat.shortDescription', {
category: TutorialsCategory.SIEM,
shortDescription: i18n.translate('home.tutorials.auditbeat.shortDescription', {
defaultMessage: 'Collect audit data from your hosts.',
}),
longDescription: i18n.translate('kbn.server.tutorials.auditbeat.longDescription', {
longDescription: i18n.translate('home.tutorials.auditbeat.longDescription', {
defaultMessage:
'Use Auditbeat to collect auditing data from your hosts. These include \
processes, users, logins, sockets information, file accesses, and more. \
@ -50,7 +54,7 @@ processes, users, logins, sockets information, file accesses, and more. \
dashboards: [],
application: {
path: '/app/siem',
label: i18n.translate('kbn.server.tutorials.auditbeat.artifacts.dashboards.linkLabel', {
label: i18n.translate('home.tutorials.auditbeat.artifacts.dashboards.linkLabel', {
defaultMessage: 'SIEM App',
}),
},

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function awsLogsSpecProvider(server, context) {
export function awsLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'aws';
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'];
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const;
return {
id: 'awsLogs',
name: i18n.translate('kbn.server.tutorials.awsLogs.nameTitle', {
name: i18n.translate('home.tutorials.awsLogs.nameTitle', {
defaultMessage: 'AWS S3 based logs',
}),
category: TUTORIAL_CATEGORY.LOGGING,
shortDescription: i18n.translate('kbn.server.tutorials.awsLogs.shortDescription', {
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.tutorials.awsLogs.shortDescription', {
defaultMessage: 'Collect AWS logs from S3 bucket with Filebeat.',
}),
longDescription: i18n.translate('kbn.server.tutorials.awsLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.awsLogs.longDescription', {
defaultMessage:
'Collect AWS logs by exporting them to an S3 bucket which is configured with SQS notification. \
[Learn more]({learnMoreLink}).',
@ -50,7 +54,7 @@ export function awsLogsSpecProvider(server, context) {
dashboards: [
{
id: '4746e000-bacd-11e9-9f70-1f7bda85a5eb',
linkLabel: i18n.translate('kbn.server.tutorials.awsLogs.artifacts.dashboards.linkLabel', {
linkLabel: i18n.translate('home.tutorials.awsLogs.artifacts.dashboards.linkLabel', {
defaultMessage: 'AWS S3 server access log dashboard',
}),
isOverview: true,

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function awsMetricsSpecProvider(context) {
export function awsMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'aws';
return {
id: 'awsMetrics',
name: i18n.translate('kbn.server.tutorials.awsMetrics.nameTitle', {
name: i18n.translate('home.tutorials.awsMetrics.nameTitle', {
defaultMessage: 'AWS metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.awsMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.awsMetrics.shortDescription', {
defaultMessage:
'Fetch monitoring metrics for EC2 instances from the AWS APIs and Cloudwatch.',
}),
longDescription: i18n.translate('kbn.server.tutorials.awsMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.awsMetrics.longDescription', {
defaultMessage:
'The `aws` Metricbeat module fetches monitoring metrics from the AWS APIs and Cloudwatch. \
[Learn more]({learnMoreLink}).',
@ -51,12 +55,9 @@ export function awsMetricsSpecProvider(context) {
dashboards: [
{
id: 'c5846400-f7fb-11e8-af03-c999c9dea608-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.awsMetrics.artifacts.dashboards.linkLabel',
{
defaultMessage: 'AWS metrics dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.awsMetrics.artifacts.dashboards.linkLabel', {
defaultMessage: 'AWS metrics dashboard',
}),
isOverview: true,
},
],
@ -66,7 +67,7 @@ export function awsMetricsSpecProvider(context) {
},
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/aws_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function azureMetricsSpecProvider(context) {
export function azureMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'azure';
return {
id: 'azureMetrics',
name: i18n.translate('kbn.server.tutorials.azureMetrics.nameTitle', {
name: i18n.translate('home.tutorials.azureMetrics.nameTitle', {
defaultMessage: 'Azure metrics',
}),
isBeta: true,
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.azureMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.azureMetrics.shortDescription', {
defaultMessage: 'Fetch Azure Monitor metrics.',
}),
longDescription: i18n.translate('kbn.server.tutorials.azureMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.azureMetrics.longDescription', {
defaultMessage:
'The `azure` Metricbeat module fetches Azure Monitor metrics. \
[Learn more]({learnMoreLink}).',
@ -48,7 +52,7 @@ export function azureMetricsSpecProvider(context) {
euiIconType: 'logoAzure',
artifacts: {
application: {
label: i18n.translate('kbn.server.tutorials.azureMetrics.artifacts.application.label', {
label: i18n.translate('home.tutorials.azureMetrics.artifacts.application.label', {
defaultMessage: 'Discover',
}),
path: '/app/kibana#/discover',
@ -59,7 +63,7 @@ export function azureMetricsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function cephMetricsSpecProvider(context) {
export function cephMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'ceph';
return {
id: 'cephMetrics',
name: i18n.translate('kbn.server.tutorials.cephMetrics.nameTitle', {
name: i18n.translate('home.tutorials.cephMetrics.nameTitle', {
defaultMessage: 'Ceph metrics',
}),
isBeta: false,
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.cephMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.cephMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from the Ceph server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.cephMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.cephMetrics.longDescription', {
defaultMessage:
'The `ceph` Metricbeat module fetches internal metrics from Ceph. \
[Learn more]({learnMoreLink}).',
@ -48,7 +52,7 @@ export function cephMetricsSpecProvider(context) {
euiIconType: 'logoCeph',
artifacts: {
application: {
label: i18n.translate('kbn.server.tutorials.cephMetrics.artifacts.application.label', {
label: i18n.translate('home.tutorials.cephMetrics.artifacts.application.label', {
defaultMessage: 'Discover',
}),
path: '/app/kibana#/discover',
@ -59,7 +63,7 @@ export function cephMetricsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function ciscoLogsSpecProvider(context) {
export function ciscoLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'cisco';
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'];
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const;
return {
id: 'ciscoLogs',
name: i18n.translate('kbn.server.tutorials.ciscoLogs.nameTitle', {
name: i18n.translate('home.tutorials.ciscoLogs.nameTitle', {
defaultMessage: 'Cisco',
}),
category: TUTORIAL_CATEGORY.SIEM,
shortDescription: i18n.translate('kbn.server.tutorials.ciscoLogs.shortDescription', {
category: TutorialsCategory.SIEM,
shortDescription: i18n.translate('home.tutorials.ciscoLogs.shortDescription', {
defaultMessage: 'Collect and parse logs received from Cisco ASA firewalls.',
}),
longDescription: i18n.translate('kbn.server.tutorials.ciscoLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.ciscoLogs.longDescription', {
defaultMessage:
'This is a module for Cisco network devices logs. Currently \
supports the "asa" fileset for Cisco ASA firewall logs received over syslog or read from a file. \
@ -46,12 +50,12 @@ supports the "asa" fileset for Cisco ASA firewall logs received over syslog or r
learnMoreLink: '{config.docs.beats.filebeat}/filebeat-module-cisco.html',
},
}),
//euiIconType: 'logoCisco',
// euiIconType: 'logoCisco',
artifacts: {
dashboards: [],
application: {
path: '/app/siem',
label: i18n.translate('kbn.server.tutorials.ciscoLogs.artifacts.dashboards.linkLabel', {
label: i18n.translate('home.tutorials.ciscoLogs.artifacts.dashboards.linkLabel', {
defaultMessage: 'SIEM App',
}),
},

View file

@ -18,24 +18,28 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/functionbeat_instructions';
} from '../instructions/functionbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function cloudwatchLogsSpecProvider(context) {
export function cloudwatchLogsSpecProvider(context: TutorialContext): TutorialSchema {
return {
id: 'cloudwatchLogs',
name: i18n.translate('kbn.server.tutorials.cloudwatchLogs.nameTitle', {
name: i18n.translate('home.tutorials.cloudwatchLogs.nameTitle', {
defaultMessage: 'AWS Cloudwatch logs',
}),
category: TUTORIAL_CATEGORY.LOGGING,
shortDescription: i18n.translate('kbn.server.tutorials.cloudwatchLogs.shortDescription', {
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.tutorials.cloudwatchLogs.shortDescription', {
defaultMessage: 'Collect Cloudwatch logs with Functionbeat.',
}),
longDescription: i18n.translate('kbn.server.tutorials.cloudwatchLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.cloudwatchLogs.longDescription', {
defaultMessage:
'Collect Cloudwatch logs by deploying Functionbeat to run as \
an AWS Lambda function. \
@ -54,8 +58,8 @@ export function cloudwatchLogsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
//previewImagePath: '/plugins/kibana/home/tutorial_resources/uptime_monitors/screenshot.png',
onPrem: onPremInstructions(null, null, null, context),
// previewImagePath: '/plugins/kibana/home/tutorial_resources/uptime_monitors/screenshot.png',
onPrem: onPremInstructions([], context),
elasticCloud: cloudInstructions(),
onPremElasticCloud: onPremCloudInstructions(),
};

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function cockroachdbMetricsSpecProvider(context) {
export function cockroachdbMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'cockroachdb';
return {
id: 'cockroachdbMetrics',
name: i18n.translate('kbn.server.tutorials.cockroachdbMetrics.nameTitle', {
name: i18n.translate('home.tutorials.cockroachdbMetrics.nameTitle', {
defaultMessage: 'CockroachDB metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.cockroachdbMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.cockroachdbMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from the CockroachDB server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.cockroachdbMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.cockroachdbMetrics.longDescription', {
defaultMessage:
'The `cockroachdb` Metricbeat module fetches monitoring metrics from CockroachDB. \
[Learn more]({learnMoreLink}).',
@ -50,7 +54,7 @@ export function cockroachdbMetricsSpecProvider(context) {
{
id: 'e3ba0c30-9766-11e9-9eea-6f554992ec1f',
linkLabel: i18n.translate(
'kbn.server.tutorials.cockroachdbMetrics.artifacts.dashboards.linkLabel',
'home.tutorials.cockroachdbMetrics.artifacts.dashboards.linkLabel',
{
defaultMessage: 'CockroachDB metrics dashboard',
}
@ -64,7 +68,7 @@ export function cockroachdbMetricsSpecProvider(context) {
},
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/cockroachdb_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function consulMetricsSpecProvider(context) {
export function consulMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'consul';
return {
id: 'consulMetrics',
name: i18n.translate('kbn.server.tutorials.consulMetrics.nameTitle', {
name: i18n.translate('home.tutorials.consulMetrics.nameTitle', {
defaultMessage: 'Consul metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.consulMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.consulMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from the Consul server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.consulMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.consulMetrics.longDescription', {
defaultMessage:
'The `consul` Metricbeat module fetches monitoring metrics from Consul. \
[Learn more]({learnMoreLink}).',
@ -49,12 +53,9 @@ export function consulMetricsSpecProvider(context) {
dashboards: [
{
id: '496910f0-b952-11e9-a579-f5c0a5d81340',
linkLabel: i18n.translate(
'kbn.server.tutorials.consulMetrics.artifacts.dashboards.linkLabel',
{
defaultMessage: 'Consul metrics dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.consulMetrics.artifacts.dashboards.linkLabel', {
defaultMessage: 'Consul metrics dashboard',
}),
isOverview: true,
},
],
@ -64,7 +65,7 @@ export function consulMetricsSpecProvider(context) {
},
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/consul_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function corednsLogsSpecProvider(server, context) {
export function corednsLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'coredns';
const platforms = ['OSX', 'DEB', 'RPM'];
const platforms = ['OSX', 'DEB', 'RPM'] as const;
return {
id: 'corednsLogs',
name: i18n.translate('kbn.server.tutorials.corednsLogs.nameTitle', {
name: i18n.translate('home.tutorials.corednsLogs.nameTitle', {
defaultMessage: 'CoreDNS logs',
}),
category: TUTORIAL_CATEGORY.SIEM,
shortDescription: i18n.translate('kbn.server.tutorials.corednsLogs.shortDescription', {
category: TutorialsCategory.SIEM,
shortDescription: i18n.translate('home.tutorials.corednsLogs.shortDescription', {
defaultMessage: 'Collect the logs created by Coredns.',
}),
longDescription: i18n.translate('kbn.server.tutorials.corednsLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.corednsLogs.longDescription', {
defaultMessage:
'The `coredns` Filebeat module collects the logs from \
[CoreDNS](https://coredns.io/manual/toc/). \
@ -51,12 +55,9 @@ export function corednsLogsSpecProvider(server, context) {
dashboards: [
{
id: '53aa1f70-443e-11e9-8548-ab7fbe04f038',
linkLabel: i18n.translate(
'kbn.server.tutorials.corednsLogs.artifacts.dashboards.linkLabel',
{
defaultMessage: 'CoreDNS logs dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.corednsLogs.artifacts.dashboards.linkLabel', {
defaultMessage: 'CoreDNS logs dashboard',
}),
isOverview: true,
},
],

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function corednsMetricsSpecProvider(context) {
export function corednsMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'coredns';
return {
id: 'corednsMetrics',
name: i18n.translate('kbn.server.tutorials.corednsMetrics.nameTitle', {
name: i18n.translate('home.tutorials.corednsMetrics.nameTitle', {
defaultMessage: 'CoreDNS metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.corednsMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.corednsMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from the CoreDNS server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.corednsMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.corednsMetrics.longDescription', {
defaultMessage:
'The `coredns` Metricbeat module fetches monitoring metrics from CoreDNS. \
[Learn more]({learnMoreLink}).',
@ -47,7 +51,7 @@ export function corednsMetricsSpecProvider(context) {
euiIconType: '/plugins/kibana/home/tutorial_resources/logos/coredns.svg',
artifacts: {
application: {
label: i18n.translate('kbn.server.tutorials.corednsMetrics.artifacts.application.label', {
label: i18n.translate('home.tutorials.corednsMetrics.artifacts.application.label', {
defaultMessage: 'Discover',
}),
path: '/app/kibana#/discover',
@ -59,7 +63,7 @@ export function corednsMetricsSpecProvider(context) {
},
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/coredns_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function couchbaseMetricsSpecProvider(context) {
export function couchbaseMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'couchbase';
return {
id: 'couchbaseMetrics',
name: i18n.translate('kbn.server.tutorials.couchbaseMetrics.nameTitle', {
name: i18n.translate('home.tutorials.couchbaseMetrics.nameTitle', {
defaultMessage: 'Couchbase metrics',
}),
isBeta: false,
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.couchbaseMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.couchbaseMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from Couchbase.',
}),
longDescription: i18n.translate('kbn.server.tutorials.couchbaseMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.couchbaseMetrics.longDescription', {
defaultMessage:
'The `couchbase` Metricbeat module fetches internal metrics from Couchbase. \
[Learn more]({learnMoreLink}).',
@ -48,7 +52,7 @@ export function couchbaseMetricsSpecProvider(context) {
euiIconType: 'logoCouchbase',
artifacts: {
application: {
label: i18n.translate('kbn.server.tutorials.couchbaseMetrics.artifacts.application.label', {
label: i18n.translate('home.tutorials.couchbaseMetrics.artifacts.application.label', {
defaultMessage: 'Discover',
}),
path: '/app/kibana#/discover',
@ -59,7 +63,7 @@ export function couchbaseMetricsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function couchdbMetricsSpecProvider(context) {
export function couchdbMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'couchdb';
return {
id: 'couchdbMetrics',
name: i18n.translate('kbn.server.tutorials.couchdbMetrics.nameTitle', {
name: i18n.translate('home.tutorials.couchdbMetrics.nameTitle', {
defaultMessage: 'CouchDB metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.couchdbMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.couchdbMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from the CouchdB server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.couchdbMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.couchdbMetrics.longDescription', {
defaultMessage:
'The `couchdb` Metricbeat module fetches monitoring metrics from CouchDB. \
[Learn more]({learnMoreLink}).',
@ -50,7 +54,7 @@ export function couchdbMetricsSpecProvider(context) {
{
id: '496910f0-b952-11e9-a579-f5c0a5d81340',
linkLabel: i18n.translate(
'kbn.server.tutorials.couchdbMetrics.artifacts.dashboards.linkLabel',
'home.tutorials.couchdbMetrics.artifacts.dashboards.linkLabel',
{
defaultMessage: 'CouchDB metrics dashboard',
}
@ -64,7 +68,7 @@ export function couchdbMetricsSpecProvider(context) {
},
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/couchdb_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function dockerMetricsSpecProvider(context) {
export function dockerMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'docker';
return {
id: 'dockerMetrics',
name: i18n.translate('kbn.server.tutorials.dockerMetrics.nameTitle', {
name: i18n.translate('home.tutorials.dockerMetrics.nameTitle', {
defaultMessage: 'Docker metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.dockerMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.dockerMetrics.shortDescription', {
defaultMessage: 'Fetch metrics about your Docker containers.',
}),
longDescription: i18n.translate('kbn.server.tutorials.dockerMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.dockerMetrics.longDescription', {
defaultMessage:
'The `docker` Metricbeat module fetches metrics from the Docker server. \
[Learn more]({learnMoreLink}).',
@ -49,12 +53,9 @@ export function dockerMetricsSpecProvider(context) {
dashboards: [
{
id: 'AV4REOpp5NkDleZmzKkE-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.dockerMetrics.artifacts.dashboards.linkLabel',
{
defaultMessage: 'Docker metrics dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.dockerMetrics.artifacts.dashboards.linkLabel', {
defaultMessage: 'Docker metrics dashboard',
}),
isOverview: true,
},
],
@ -64,7 +65,7 @@ export function dockerMetricsSpecProvider(context) {
},
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/docker_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function dropwizardMetricsSpecProvider(context) {
export function dropwizardMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'dropwizard';
return {
id: 'dropwizardMetrics',
name: i18n.translate('kbn.server.tutorials.dropwizardMetrics.nameTitle', {
name: i18n.translate('home.tutorials.dropwizardMetrics.nameTitle', {
defaultMessage: 'Dropwizard metrics',
}),
isBeta: false,
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.dropwizardMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.dropwizardMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from Dropwizard Java application.',
}),
longDescription: i18n.translate('kbn.server.tutorials.dropwizardMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.dropwizardMetrics.longDescription', {
defaultMessage:
'The `dropwizard` Metricbeat module fetches internal metrics from Dropwizard Java Application. \
[Learn more]({learnMoreLink}).',
@ -48,12 +52,9 @@ export function dropwizardMetricsSpecProvider(context) {
euiIconType: 'logoDropwizard',
artifacts: {
application: {
label: i18n.translate(
'kbn.server.tutorials.dropwizardMetrics.artifacts.application.label',
{
defaultMessage: 'Discover',
}
),
label: i18n.translate('home.tutorials.dropwizardMetrics.artifacts.application.label', {
defaultMessage: 'Discover',
}),
path: '/app/kibana#/discover',
},
dashboards: [],
@ -62,7 +63,7 @@ export function dropwizardMetricsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,27 +18,31 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function elasticsearchLogsSpecProvider(context) {
export function elasticsearchLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'elasticsearch';
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'];
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const;
return {
id: 'elasticsearchLogs',
name: i18n.translate('kbn.server.tutorials.elasticsearchLogs.nameTitle', {
name: i18n.translate('home.tutorials.elasticsearchLogs.nameTitle', {
defaultMessage: 'Elasticsearch logs',
}),
category: TUTORIAL_CATEGORY.LOGGING,
category: TutorialsCategory.LOGGING,
isBeta: true,
shortDescription: i18n.translate('kbn.server.tutorials.elasticsearchLogs.shortDescription', {
shortDescription: i18n.translate('home.tutorials.elasticsearchLogs.shortDescription', {
defaultMessage: 'Collect and parse logs created by Elasticsearch.',
}),
longDescription: i18n.translate('kbn.server.tutorials.elasticsearchLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.elasticsearchLogs.longDescription', {
defaultMessage:
'The `elasticsearch` Filebeat module parses logs created by Elasticsearch. \
[Learn more]({learnMoreLink}).',
@ -49,12 +53,9 @@ export function elasticsearchLogsSpecProvider(context) {
euiIconType: 'logoElasticsearch',
artifacts: {
application: {
label: i18n.translate(
'kbn.server.tutorials.elasticsearchLogs.artifacts.application.label',
{
defaultMessage: 'Discover',
}
),
label: i18n.translate('home.tutorials.elasticsearchLogs.artifacts.application.label', {
defaultMessage: 'Discover',
}),
path: '/app/kibana#/discover',
},
dashboards: [],

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function elasticsearchMetricsSpecProvider(context) {
export function elasticsearchMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'elasticsearch';
return {
id: 'elasticsearchMetrics',
name: i18n.translate('kbn.server.tutorials.elasticsearchMetrics.nameTitle', {
name: i18n.translate('home.tutorials.elasticsearchMetrics.nameTitle', {
defaultMessage: 'Elasticsearch metrics',
}),
isBeta: false,
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.elasticsearchMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.elasticsearchMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from Elasticsearch.',
}),
longDescription: i18n.translate('kbn.server.tutorials.elasticsearchMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.elasticsearchMetrics.longDescription', {
defaultMessage:
'The `elasticsearch` Metricbeat module fetches internal metrics from Elasticsearch. \
[Learn more]({learnMoreLink}).',
@ -48,12 +52,9 @@ export function elasticsearchMetricsSpecProvider(context) {
euiIconType: 'logoElasticsearch',
artifacts: {
application: {
label: i18n.translate(
'kbn.server.tutorials.elasticsearchMetrics.artifacts.application.label',
{
defaultMessage: 'Discover',
}
),
label: i18n.translate('home.tutorials.elasticsearchMetrics.artifacts.application.label', {
defaultMessage: 'Discover',
}),
path: '/app/kibana#/discover',
},
dashboards: [],
@ -62,7 +63,7 @@ export function elasticsearchMetricsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function envoyproxyLogsSpecProvider(context) {
export function envoyproxyLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'envoyproxy';
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'];
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const;
return {
id: 'envoyproxyLogs',
name: i18n.translate('kbn.server.tutorials.envoyproxyLogs.nameTitle', {
name: i18n.translate('home.tutorials.envoyproxyLogs.nameTitle', {
defaultMessage: 'Envoyproxy',
}),
category: TUTORIAL_CATEGORY.SIEM,
shortDescription: i18n.translate('kbn.server.tutorials.envoyproxyLogs.shortDescription', {
category: TutorialsCategory.SIEM,
shortDescription: i18n.translate('home.tutorials.envoyproxyLogs.shortDescription', {
defaultMessage: 'Collect and parse logs received from the Envoy proxy.',
}),
longDescription: i18n.translate('kbn.server.tutorials.envoyproxyLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.envoyproxyLogs.longDescription', {
defaultMessage:
'This is a filebeat module for [Envoy proxy access log](https://www.envoyproxy.io/docs/envoy/v1.10.0/configuration/access_log). \
It supports both standalone deployment and Envoy proxy deployment in Kubernetes. \
@ -46,17 +50,14 @@ It supports both standalone deployment and Envoy proxy deployment in Kubernetes.
learnMoreLink: '{config.docs.beats.filebeat}/filebeat-module-envoyproxy.html',
},
}),
//euiIconType: 'logoCisco',
// euiIconType: 'logoCisco',
artifacts: {
dashboards: [],
application: {
path: '/app/siem',
label: i18n.translate(
'kbn.server.tutorials.envoyproxyLogs.artifacts.dashboards.linkLabel',
{
defaultMessage: 'SIEM App',
}
),
label: i18n.translate('home.tutorials.envoyproxyLogs.artifacts.dashboards.linkLabel', {
defaultMessage: 'SIEM App',
}),
},
exportedFields: {
documentationUrl: '{config.docs.beats.filebeat}/exported-fields-envoyproxy.html',

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function envoyproxyMetricsSpecProvider(server, context) {
export function envoyproxyMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'envoyproxy';
return {
id: 'envoyproxyMetrics',
name: i18n.translate('kbn.server.tutorials.envoyproxyMetrics.nameTitle', {
name: i18n.translate('home.tutorials.envoyproxyMetrics.nameTitle', {
defaultMessage: 'Envoy Proxy metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.envoyproxyMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.envoyproxyMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from Envoy Proxy.',
}),
longDescription: i18n.translate('kbn.server.tutorials.envoyproxyMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.envoyproxyMetrics.longDescription', {
defaultMessage:
'The `envoyproxy` Metricbeat module fetches monitoring metrics from Envoy Proxy. \
[Learn more]({learnMoreLink}).',
@ -53,7 +57,7 @@ export function envoyproxyMetricsSpecProvider(server, context) {
},
completionTimeMinutes: 10,
// previewImagePath: '/plugins/kibana/home/tutorial_resources/envoyproxy_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function etcdMetricsSpecProvider(context) {
export function etcdMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'etcd';
return {
id: 'etcdMetrics',
name: i18n.translate('kbn.server.tutorials.etcdMetrics.nameTitle', {
name: i18n.translate('home.tutorials.etcdMetrics.nameTitle', {
defaultMessage: 'Etcd metrics',
}),
isBeta: false,
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.etcdMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.etcdMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from the Etcd server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.etcdMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.etcdMetrics.longDescription', {
defaultMessage:
'The `etcd` Metricbeat module fetches internal metrics from Etcd. \
[Learn more]({learnMoreLink}).',
@ -48,7 +52,7 @@ export function etcdMetricsSpecProvider(context) {
euiIconType: 'logoEtcd',
artifacts: {
application: {
label: i18n.translate('kbn.server.tutorials.etcdMetrics.artifacts.application.label', {
label: i18n.translate('home.tutorials.etcdMetrics.artifacts.application.label', {
defaultMessage: 'Discover',
}),
path: '/app/kibana#/discover',
@ -59,7 +63,7 @@ export function etcdMetricsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function golangMetricsSpecProvider(context) {
export function golangMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'golang';
return {
id: moduleName + 'Metrics',
name: i18n.translate('kbn.server.tutorials.golangMetrics.nameTitle', {
name: i18n.translate('home.tutorials.golangMetrics.nameTitle', {
defaultMessage: 'Golang metrics',
}),
isBeta: true,
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.golangMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.golangMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from a Golang app.',
}),
longDescription: i18n.translate('kbn.server.tutorials.golangMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.golangMetrics.longDescription', {
defaultMessage:
'The `{moduleName}` Metricbeat module fetches internal metrics from a Golang app. \
[Learn more]({learnMoreLink}).',
@ -51,12 +55,9 @@ export function golangMetricsSpecProvider(context) {
dashboards: [
{
id: 'f2dc7320-f519-11e6-a3c9-9d1f7c42b045-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.golangMetrics.artifacts.dashboards.linkLabel',
{
defaultMessage: 'Golang metrics dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.golangMetrics.artifacts.dashboards.linkLabel', {
defaultMessage: 'Golang metrics dashboard',
}),
isOverview: true,
},
],
@ -65,7 +66,7 @@ export function golangMetricsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function haproxyMetricsSpecProvider(context) {
export function haproxyMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'haproxy';
return {
id: 'haproxyMetrics',
name: i18n.translate('kbn.server.tutorials.haproxyMetrics.nameTitle', {
name: i18n.translate('home.tutorials.haproxyMetrics.nameTitle', {
defaultMessage: 'HAProxy metrics',
}),
isBeta: false,
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.haproxyMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.haproxyMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from the HAProxy server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.haproxyMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.haproxyMetrics.longDescription', {
defaultMessage:
'The `haproxy` Metricbeat module fetches internal metrics from HAProxy. \
[Learn more]({learnMoreLink}).',
@ -48,7 +52,7 @@ export function haproxyMetricsSpecProvider(context) {
euiIconType: 'logoHAproxy',
artifacts: {
application: {
label: i18n.translate('kbn.server.tutorials.haproxyMetrics.artifacts.application.label', {
label: i18n.translate('home.tutorials.haproxyMetrics.artifacts.application.label', {
defaultMessage: 'Discover',
}),
path: '/app/kibana#/discover',
@ -59,7 +63,7 @@ export function haproxyMetricsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function ibmmqLogsSpecProvider(server, context) {
export function ibmmqLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'ibmmq';
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'];
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const;
return {
id: 'ibmmqLogs',
name: i18n.translate('kbn.server.tutorials.ibmmqLogs.nameTitle', {
name: i18n.translate('home.tutorials.ibmmqLogs.nameTitle', {
defaultMessage: 'IBM MQ logs',
}),
category: TUTORIAL_CATEGORY.LOGGING,
shortDescription: i18n.translate('kbn.server.tutorials.ibmmqLogs.shortDescription', {
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.tutorials.ibmmqLogs.shortDescription', {
defaultMessage: 'Collect IBM MQ logs with Filebeat.',
}),
longDescription: i18n.translate('kbn.server.tutorials.ibmmqLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.ibmmqLogs.longDescription', {
defaultMessage: 'Collect IBM MQ logs with Filebeat. \
[Learn more]({learnMoreLink}).',
values: {
@ -49,12 +53,9 @@ export function ibmmqLogsSpecProvider(server, context) {
dashboards: [
{
id: 'ba1d8830-7c7b-11e9-9645-e37efaf5baff',
linkLabel: i18n.translate(
'kbn.server.tutorials.ibmmqLogs.artifacts.dashboards.linkLabel',
{
defaultMessage: 'IBM MQ Events',
}
),
linkLabel: i18n.translate('home.tutorials.ibmmqLogs.artifacts.dashboards.linkLabel', {
defaultMessage: 'IBM MQ Events',
}),
isOverview: true,
},
],

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function ibmmqMetricsSpecProvider(context) {
export function ibmmqMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'ibmmq';
return {
id: 'ibmmqMetrics',
name: i18n.translate('kbn.server.tutorials.ibmmqMetrics.nameTitle', {
name: i18n.translate('home.tutorials.ibmmqMetrics.nameTitle', {
defaultMessage: 'IBM MQ metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.ibmmqMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.ibmmqMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from IBM MQ instances.',
}),
longDescription: i18n.translate('kbn.server.tutorials.ibmmqMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.ibmmqMetrics.longDescription', {
defaultMessage:
'The `ibmmq` Metricbeat module fetches monitoring metrics from IBM MQ instances \
[Learn more]({learnMoreLink}).',
@ -48,7 +52,7 @@ export function ibmmqMetricsSpecProvider(context) {
isBeta: true,
artifacts: {
application: {
label: i18n.translate('kbn.server.tutorials.ibmmqMetrics.artifacts.application.label', {
label: i18n.translate('home.tutorials.ibmmqMetrics.artifacts.application.label', {
defaultMessage: 'Discover',
}),
path: '/app/kibana#/discover',
@ -60,7 +64,7 @@ export function ibmmqMetricsSpecProvider(context) {
},
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/ibmmq_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function iisLogsSpecProvider(context) {
export function iisLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'iis';
const platforms = ['WINDOWS'];
const platforms = ['WINDOWS'] as const;
return {
id: 'iisLogs',
name: i18n.translate('kbn.server.tutorials.iisLogs.nameTitle', {
name: i18n.translate('home.tutorials.iisLogs.nameTitle', {
defaultMessage: 'IIS logs',
}),
category: TUTORIAL_CATEGORY.LOGGING,
shortDescription: i18n.translate('kbn.server.tutorials.iisLogs.shortDescription', {
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.tutorials.iisLogs.shortDescription', {
defaultMessage: 'Collect and parse access and error logs created by the IIS HTTP server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.iisLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.iisLogs.longDescription', {
defaultMessage:
'The `iis` Filebeat module parses access and error logs created by the IIS HTTP server. \
[Learn more]({learnMoreLink}).',
@ -50,7 +54,7 @@ export function iisLogsSpecProvider(context) {
dashboards: [
{
id: '4278ad30-fe16-11e7-a3b0-d13028918f9f-ecs',
linkLabel: i18n.translate('kbn.server.tutorials.iisLogs.artifacts.dashboards.linkLabel', {
linkLabel: i18n.translate('home.tutorials.iisLogs.artifacts.dashboards.linkLabel', {
defaultMessage: 'IIS logs dashboard',
}),
isOverview: true,

View file

@ -20,15 +20,16 @@
import { i18n } from '@kbn/i18n';
import { INSTRUCTION_VARIANT } from './instruction_variant';
import { createTrycloudOption1, createTrycloudOption2 } from './onprem_cloud_instructions';
import { getSpaceIdForBeatsTutorial } from '../lib/get_space_id_for_beats_tutorial';
import { getSpaceIdForBeatsTutorial } from './get_space_id_for_beats_tutorial';
import { Platform, TutorialContext } from '../../services/tutorials/lib/tutorials_registry_types';
export const createAuditbeatInstructions = context => ({
export const createAuditbeatInstructions = (context?: TutorialContext) => ({
INSTALL: {
OSX: {
title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.osxTitle', {
title: i18n.translate('home.tutorials.common.auditbeatInstructions.install.osxTitle', {
defaultMessage: 'Download and install Auditbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.osxTextPre', {
textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.install.osxTextPre', {
defaultMessage: 'First time using Auditbeat? See the [Getting Started Guide]({linkUrl}).',
values: {
linkUrl: '{config.docs.beats.auditbeat}/auditbeat-getting-started.html',
@ -41,10 +42,10 @@ export const createAuditbeatInstructions = context => ({
],
},
DEB: {
title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.debTitle', {
title: i18n.translate('home.tutorials.common.auditbeatInstructions.install.debTitle', {
defaultMessage: 'Download and install Auditbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.debTextPre', {
textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.install.debTextPre', {
defaultMessage: 'First time using Auditbeat? See the [Getting Started Guide]({linkUrl}).',
values: {
linkUrl: '{config.docs.beats.auditbeat}/auditbeat-getting-started.html',
@ -54,7 +55,7 @@ export const createAuditbeatInstructions = context => ({
'curl -L -O https://artifacts.elastic.co/downloads/beats/auditbeat/auditbeat-{config.kibana.version}-amd64.deb',
'sudo dpkg -i auditbeat-{config.kibana.version}-amd64.deb',
],
textPost: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.debTextPost', {
textPost: i18n.translate('home.tutorials.common.auditbeatInstructions.install.debTextPost', {
defaultMessage: 'Looking for the 32-bit packages? See the [Download page]({linkUrl}).',
values: {
linkUrl: 'https://www.elastic.co/downloads/beats/auditbeat',
@ -62,10 +63,10 @@ export const createAuditbeatInstructions = context => ({
}),
},
RPM: {
title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.rpmTitle', {
title: i18n.translate('home.tutorials.common.auditbeatInstructions.install.rpmTitle', {
defaultMessage: 'Download and install Auditbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.rpmTextPre', {
textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.install.rpmTextPre', {
defaultMessage: 'First time using Auditbeat? See the [Getting Started Guide]({linkUrl}).',
values: {
linkUrl: '{config.docs.beats.auditbeat}/auditbeat-getting-started.html',
@ -75,7 +76,7 @@ export const createAuditbeatInstructions = context => ({
'curl -L -O https://artifacts.elastic.co/downloads/beats/auditbeat/auditbeat-{config.kibana.version}-x86_64.rpm',
'sudo rpm -vi auditbeat-{config.kibana.version}-x86_64.rpm',
],
textPost: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.rpmTextPost', {
textPost: i18n.translate('home.tutorials.common.auditbeatInstructions.install.rpmTextPost', {
defaultMessage: 'Looking for the 32-bit packages? See the [Download page]({linkUrl}).',
values: {
linkUrl: 'https://www.elastic.co/downloads/beats/auditbeat',
@ -83,28 +84,31 @@ export const createAuditbeatInstructions = context => ({
}),
},
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.windowsTitle', {
title: i18n.translate('home.tutorials.common.auditbeatInstructions.install.windowsTitle', {
defaultMessage: 'Download and install Auditbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.install.windowsTextPre', {
defaultMessage:
'First time using Auditbeat? See the [Getting Started Guide]({guideLinkUrl}).\n\
textPre: i18n.translate(
'home.tutorials.common.auditbeatInstructions.install.windowsTextPre',
{
defaultMessage:
'First time using Auditbeat? See the [Getting Started Guide]({guideLinkUrl}).\n\
1. Download the Auditbeat Windows zip file from the [Download]({auditbeatLinkUrl}) page.\n\
2. Extract the contents of the zip file into {folderPath}.\n\
3. Rename the `{directoryName}` directory to `Auditbeat`.\n\
4. Open a PowerShell prompt as an Administrator (right-click the PowerShell icon and select \
**Run As Administrator**). If you are running Windows XP, you might need to download and install PowerShell.\n\
5. From the PowerShell prompt, run the following commands to install Auditbeat as a Windows service.',
values: {
folderPath: '`C:\\Program Files`',
guideLinkUrl: '{config.docs.beats.auditbeat}/auditbeat-getting-started.html',
auditbeatLinkUrl: 'https://www.elastic.co/downloads/beats/auditbeat',
directoryName: 'auditbeat-{config.kibana.version}-windows',
},
}),
values: {
folderPath: '`C:\\Program Files`',
guideLinkUrl: '{config.docs.beats.auditbeat}/auditbeat-getting-started.html',
auditbeatLinkUrl: 'https://www.elastic.co/downloads/beats/auditbeat',
directoryName: 'auditbeat-{config.kibana.version}-windows',
},
}
),
commands: ['cd "C:\\Program Files\\Auditbeat"', '.\\install-service-auditbeat.ps1'],
textPost: i18n.translate(
'kbn.common.tutorials.auditbeatInstructions.install.windowsTextPost',
'home.tutorials.common.auditbeatInstructions.install.windowsTextPost',
{
defaultMessage:
'Modify the settings under {propertyName} in the {auditbeatPath} file to point to your Elasticsearch installation.',
@ -118,40 +122,40 @@ export const createAuditbeatInstructions = context => ({
},
START: {
OSX: {
title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.start.osxTitle', {
title: i18n.translate('home.tutorials.common.auditbeatInstructions.start.osxTitle', {
defaultMessage: 'Start Auditbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.start.osxTextPre', {
textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.start.osxTextPre', {
defaultMessage:
'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.',
}),
commands: ['./auditbeat setup', './auditbeat -e'],
},
DEB: {
title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.start.debTitle', {
title: i18n.translate('home.tutorials.common.auditbeatInstructions.start.debTitle', {
defaultMessage: 'Start Auditbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.start.debTextPre', {
textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.start.debTextPre', {
defaultMessage:
'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.',
}),
commands: ['sudo auditbeat setup', 'sudo service auditbeat start'],
},
RPM: {
title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.start.rpmTitle', {
title: i18n.translate('home.tutorials.common.auditbeatInstructions.start.rpmTitle', {
defaultMessage: 'Start Auditbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.start.rpmTextPre', {
textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.start.rpmTextPre', {
defaultMessage:
'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.',
}),
commands: ['sudo auditbeat setup', 'sudo service auditbeat start'],
},
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.start.windowsTitle', {
title: i18n.translate('home.tutorials.common.auditbeatInstructions.start.windowsTitle', {
defaultMessage: 'Start Auditbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.start.windowsTextPre', {
textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.start.windowsTextPre', {
defaultMessage:
'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.',
}),
@ -160,10 +164,10 @@ export const createAuditbeatInstructions = context => ({
},
CONFIG: {
OSX: {
title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.osxTitle', {
title: i18n.translate('home.tutorials.common.auditbeatInstructions.config.osxTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.osxTextPre', {
textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.config.osxTextPre', {
defaultMessage: 'Modify {path} to set the connection information:',
values: {
path: '`auditbeat.yml`',
@ -178,7 +182,7 @@ export const createAuditbeatInstructions = context => ({
' host: "<kibana_url>"',
getSpaceIdForBeatsTutorial(context),
],
textPost: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.osxTextPost', {
textPost: i18n.translate('home.tutorials.common.auditbeatInstructions.config.osxTextPost', {
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
and {kibanaUrlTemplate} is the URL of Kibana.',
@ -190,10 +194,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
}),
},
DEB: {
title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.debTitle', {
title: i18n.translate('home.tutorials.common.auditbeatInstructions.config.debTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.debTextPre', {
textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.config.debTextPre', {
defaultMessage: 'Modify {path} to set the connection information:',
values: {
path: '`/etc/auditbeat/auditbeat.yml`',
@ -208,7 +212,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
' host: "<kibana_url>"',
getSpaceIdForBeatsTutorial(context),
],
textPost: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.debTextPost', {
textPost: i18n.translate('home.tutorials.common.auditbeatInstructions.config.debTextPost', {
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
and {kibanaUrlTemplate} is the URL of Kibana.',
@ -220,10 +224,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
}),
},
RPM: {
title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.rpmTitle', {
title: i18n.translate('home.tutorials.common.auditbeatInstructions.config.rpmTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.rpmTextPre', {
textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.config.rpmTextPre', {
defaultMessage: 'Modify {path} to set the connection information:',
values: {
path: '`/etc/auditbeat/auditbeat.yml`',
@ -238,7 +242,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
' host: "<kibana_url>"',
getSpaceIdForBeatsTutorial(context),
],
textPost: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.rpmTextPost', {
textPost: i18n.translate('home.tutorials.common.auditbeatInstructions.config.rpmTextPost', {
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
and {kibanaUrlTemplate} is the URL of Kibana.',
@ -250,10 +254,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
}),
},
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.windowsTitle', {
title: i18n.translate('home.tutorials.common.auditbeatInstructions.config.windowsTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.auditbeatInstructions.config.windowsTextPre', {
textPre: i18n.translate('home.tutorials.common.auditbeatInstructions.config.windowsTextPre', {
defaultMessage: 'Modify {path} to set the connection information:',
values: {
path: '`C:\\Program Files\\Auditbeat\\auditbeat.yml`',
@ -269,7 +273,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
getSpaceIdForBeatsTutorial(context),
],
textPost: i18n.translate(
'kbn.common.tutorials.auditbeatInstructions.config.windowsTextPost',
'home.tutorials.common.auditbeatInstructions.config.windowsTextPost',
{
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
@ -288,18 +292,21 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
export const createAuditbeatCloudInstructions = () => ({
CONFIG: {
OSX: {
title: i18n.translate('kbn.common.tutorials.auditbeatCloudInstructions.config.osxTitle', {
title: i18n.translate('home.tutorials.common.auditbeatCloudInstructions.config.osxTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.auditbeatCloudInstructions.config.osxTextPre', {
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
path: '`auditbeat.yml`',
},
}),
textPre: i18n.translate(
'home.tutorials.common.auditbeatCloudInstructions.config.osxTextPre',
{
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
path: '`auditbeat.yml`',
},
}
),
commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:<password>"'],
textPost: i18n.translate(
'kbn.common.tutorials.auditbeatCloudInstructions.config.osxTextPost',
'home.tutorials.common.auditbeatCloudInstructions.config.osxTextPost',
{
defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.',
values: { passwordTemplate: '`<password>`' },
@ -307,18 +314,21 @@ export const createAuditbeatCloudInstructions = () => ({
),
},
DEB: {
title: i18n.translate('kbn.common.tutorials.auditbeatCloudInstructions.config.debTitle', {
title: i18n.translate('home.tutorials.common.auditbeatCloudInstructions.config.debTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.auditbeatCloudInstructions.config.debTextPre', {
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
path: '`/etc/auditbeat/auditbeat.yml`',
},
}),
textPre: i18n.translate(
'home.tutorials.common.auditbeatCloudInstructions.config.debTextPre',
{
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
path: '`/etc/auditbeat/auditbeat.yml`',
},
}
),
commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:<password>"'],
textPost: i18n.translate(
'kbn.common.tutorials.auditbeatCloudInstructions.config.debTextPost',
'home.tutorials.common.auditbeatCloudInstructions.config.debTextPost',
{
defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.',
values: { passwordTemplate: '`<password>`' },
@ -326,18 +336,21 @@ export const createAuditbeatCloudInstructions = () => ({
),
},
RPM: {
title: i18n.translate('kbn.common.tutorials.auditbeatCloudInstructions.config.rpmTitle', {
title: i18n.translate('home.tutorials.common.auditbeatCloudInstructions.config.rpmTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.auditbeatCloudInstructions.config.rpmTextPre', {
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
path: '`/etc/auditbeat/auditbeat.yml`',
},
}),
textPre: i18n.translate(
'home.tutorials.common.auditbeatCloudInstructions.config.rpmTextPre',
{
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
path: '`/etc/auditbeat/auditbeat.yml`',
},
}
),
commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:<password>"'],
textPost: i18n.translate(
'kbn.common.tutorials.auditbeatCloudInstructions.config.rpmTextPost',
'home.tutorials.common.auditbeatCloudInstructions.config.rpmTextPost',
{
defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.',
values: { passwordTemplate: '`<password>`' },
@ -345,11 +358,14 @@ export const createAuditbeatCloudInstructions = () => ({
),
},
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.auditbeatCloudInstructions.config.windowsTitle', {
defaultMessage: 'Edit the configuration',
}),
title: i18n.translate(
'home.tutorials.common.auditbeatCloudInstructions.config.windowsTitle',
{
defaultMessage: 'Edit the configuration',
}
),
textPre: i18n.translate(
'kbn.common.tutorials.auditbeatCloudInstructions.config.windowsTextPre',
'home.tutorials.common.auditbeatCloudInstructions.config.windowsTextPre',
{
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
@ -359,7 +375,7 @@ export const createAuditbeatCloudInstructions = () => ({
),
commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:<password>"'],
textPost: i18n.translate(
'kbn.common.tutorials.auditbeatCloudInstructions.config.windowsTextPost',
'home.tutorials.common.auditbeatCloudInstructions.config.windowsTextPost',
{
defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.',
values: { passwordTemplate: '`<password>`' },
@ -371,19 +387,19 @@ export const createAuditbeatCloudInstructions = () => ({
export function auditbeatStatusCheck() {
return {
title: i18n.translate('kbn.common.tutorials.auditbeatStatusCheck.title', {
title: i18n.translate('home.tutorials.common.auditbeatStatusCheck.title', {
defaultMessage: 'Status',
}),
text: i18n.translate('kbn.common.tutorials.auditbeatStatusCheck.text', {
text: i18n.translate('home.tutorials.common.auditbeatStatusCheck.text', {
defaultMessage: 'Check that data is received from Auditbeat',
}),
btnLabel: i18n.translate('kbn.common.tutorials.auditbeatStatusCheck.buttonLabel', {
btnLabel: i18n.translate('home.tutorials.common.auditbeatStatusCheck.buttonLabel', {
defaultMessage: 'Check data',
}),
success: i18n.translate('kbn.common.tutorials.auditbeatStatusCheck.successText', {
success: i18n.translate('home.tutorials.common.auditbeatStatusCheck.successText', {
defaultMessage: 'Data successfully received',
}),
error: i18n.translate('kbn.common.tutorials.auditbeatStatusCheck.errorText', {
error: i18n.translate('home.tutorials.common.auditbeatStatusCheck.errorText', {
defaultMessage: 'No data has been received yet',
}),
esHitsCheck: {
@ -401,7 +417,7 @@ export function auditbeatStatusCheck() {
};
}
export function onPremInstructions(platforms, context) {
export function onPremInstructions(platforms: readonly Platform[], context?: TutorialContext) {
const AUDITBEAT_INSTRUCTIONS = createAuditbeatInstructions(context);
const variants = [];
@ -413,14 +429,14 @@ export function onPremInstructions(platforms, context) {
instructions.push(AUDITBEAT_INSTRUCTIONS.START[platform]);
variants.push({
id: INSTRUCTION_VARIANT[platform],
instructions: instructions,
instructions,
});
}
return {
instructionSets: [
{
title: i18n.translate(
'kbn.common.tutorials.auditbeat.premInstructions.gettingStarted.title',
'home.tutorials.common.auditbeat.premInstructions.gettingStarted.title',
{
defaultMessage: 'Getting Started',
}
@ -432,7 +448,7 @@ export function onPremInstructions(platforms, context) {
};
}
export function onPremCloudInstructions(platforms) {
export function onPremCloudInstructions(platforms: readonly Platform[]) {
const AUDITBEAT_INSTRUCTIONS = createAuditbeatInstructions();
const TRYCLOUD_OPTION1 = createTrycloudOption1();
const TRYCLOUD_OPTION2 = createTrycloudOption2();
@ -456,7 +472,7 @@ export function onPremCloudInstructions(platforms) {
instructionSets: [
{
title: i18n.translate(
'kbn.common.tutorials.auditbeat.premCloudInstructions.gettingStarted.title',
'home.tutorials.common.auditbeat.premCloudInstructions.gettingStarted.title',
{
defaultMessage: 'Getting Started',
}
@ -468,7 +484,7 @@ export function onPremCloudInstructions(platforms) {
};
}
export function cloudInstructions(platforms) {
export function cloudInstructions(platforms: readonly Platform[]) {
const AUDITBEAT_INSTRUCTIONS = createAuditbeatInstructions();
const AUDITBEAT_CLOUD_INSTRUCTIONS = createAuditbeatCloudInstructions();
@ -489,7 +505,7 @@ export function cloudInstructions(platforms) {
instructionSets: [
{
title: i18n.translate(
'kbn.common.tutorials.auditbeat.cloudInstructions.gettingStarted.title',
'home.tutorials.common.auditbeat.cloudInstructions.gettingStarted.title',
{
defaultMessage: 'Getting Started',
}

View file

@ -20,15 +20,16 @@
import { i18n } from '@kbn/i18n';
import { INSTRUCTION_VARIANT } from './instruction_variant';
import { createTrycloudOption1, createTrycloudOption2 } from './onprem_cloud_instructions';
import { getSpaceIdForBeatsTutorial } from '../lib/get_space_id_for_beats_tutorial';
import { getSpaceIdForBeatsTutorial } from './get_space_id_for_beats_tutorial';
import { Platform, TutorialContext } from '../../services/tutorials/lib/tutorials_registry_types';
export const createFilebeatInstructions = context => ({
export const createFilebeatInstructions = (context?: TutorialContext) => ({
INSTALL: {
OSX: {
title: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.osxTitle', {
title: i18n.translate('home.tutorials.common.filebeatInstructions.install.osxTitle', {
defaultMessage: 'Download and install Filebeat',
}),
textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.osxTextPre', {
textPre: i18n.translate('home.tutorials.common.filebeatInstructions.install.osxTextPre', {
defaultMessage: 'First time using Filebeat? See the [Getting Started Guide]({linkUrl}).',
values: {
linkUrl: '{config.docs.beats.filebeat}/filebeat-getting-started.html',
@ -41,10 +42,10 @@ export const createFilebeatInstructions = context => ({
],
},
DEB: {
title: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.debTitle', {
title: i18n.translate('home.tutorials.common.filebeatInstructions.install.debTitle', {
defaultMessage: 'Download and install Filebeat',
}),
textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.debTextPre', {
textPre: i18n.translate('home.tutorials.common.filebeatInstructions.install.debTextPre', {
defaultMessage: 'First time using Filebeat? See the [Getting Started Guide]({linkUrl}).',
values: {
linkUrl: '{config.docs.beats.filebeat}/filebeat-getting-started.html',
@ -54,7 +55,7 @@ export const createFilebeatInstructions = context => ({
'curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-{config.kibana.version}-amd64.deb',
'sudo dpkg -i filebeat-{config.kibana.version}-amd64.deb',
],
textPost: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.debTextPost', {
textPost: i18n.translate('home.tutorials.common.filebeatInstructions.install.debTextPost', {
defaultMessage: 'Looking for the 32-bit packages? See the [Download page]({linkUrl}).',
values: {
linkUrl: 'https://www.elastic.co/downloads/beats/filebeat',
@ -62,10 +63,10 @@ export const createFilebeatInstructions = context => ({
}),
},
RPM: {
title: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.rpmTitle', {
title: i18n.translate('home.tutorials.common.filebeatInstructions.install.rpmTitle', {
defaultMessage: 'Download and install Filebeat',
}),
textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.rpmTextPre', {
textPre: i18n.translate('home.tutorials.common.filebeatInstructions.install.rpmTextPre', {
defaultMessage: 'First time using Filebeat? See the [Getting Started Guide]({linkUrl}).',
values: {
linkUrl: '{config.docs.beats.filebeat}/filebeat-getting-started.html',
@ -75,7 +76,7 @@ export const createFilebeatInstructions = context => ({
'curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-{config.kibana.version}-x86_64.rpm',
'sudo rpm -vi filebeat-{config.kibana.version}-x86_64.rpm',
],
textPost: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.rpmTextPost', {
textPost: i18n.translate('home.tutorials.common.filebeatInstructions.install.rpmTextPost', {
defaultMessage: 'Looking for the 32-bit packages? See the [Download page]({linkUrl}).',
values: {
linkUrl: 'https://www.elastic.co/downloads/beats/filebeat',
@ -83,10 +84,10 @@ export const createFilebeatInstructions = context => ({
}),
},
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.windowsTitle', {
title: i18n.translate('home.tutorials.common.filebeatInstructions.install.windowsTitle', {
defaultMessage: 'Download and install Filebeat',
}),
textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.install.windowsTextPre', {
textPre: i18n.translate('home.tutorials.common.filebeatInstructions.install.windowsTextPre', {
defaultMessage:
'First time using Filebeat? See the [Getting Started Guide]({guideLinkUrl}).\n\
1. Download the Filebeat Windows zip file from the [Download]({filebeatLinkUrl}) page.\n\
@ -104,7 +105,7 @@ export const createFilebeatInstructions = context => ({
}),
commands: ['cd "C:\\Program Files\\Filebeat"', '.\\install-service-filebeat.ps1'],
textPost: i18n.translate(
'kbn.common.tutorials.filebeatInstructions.install.windowsTextPost',
'home.tutorials.common.filebeatInstructions.install.windowsTextPost',
{
defaultMessage:
'Modify the settings under {propertyName} in the {filebeatPath} file to point to your Elasticsearch installation.',
@ -118,40 +119,40 @@ export const createFilebeatInstructions = context => ({
},
START: {
OSX: {
title: i18n.translate('kbn.common.tutorials.filebeatInstructions.start.osxTitle', {
title: i18n.translate('home.tutorials.common.filebeatInstructions.start.osxTitle', {
defaultMessage: 'Start Filebeat',
}),
textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.start.osxTextPre', {
textPre: i18n.translate('home.tutorials.common.filebeatInstructions.start.osxTextPre', {
defaultMessage:
'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.',
}),
commands: ['./filebeat setup', './filebeat -e'],
},
DEB: {
title: i18n.translate('kbn.common.tutorials.filebeatInstructions.start.debTitle', {
title: i18n.translate('home.tutorials.common.filebeatInstructions.start.debTitle', {
defaultMessage: 'Start Filebeat',
}),
textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.start.debTextPre', {
textPre: i18n.translate('home.tutorials.common.filebeatInstructions.start.debTextPre', {
defaultMessage:
'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.',
}),
commands: ['sudo filebeat setup', 'sudo service filebeat start'],
},
RPM: {
title: i18n.translate('kbn.common.tutorials.filebeatInstructions.start.rpmTitle', {
title: i18n.translate('home.tutorials.common.filebeatInstructions.start.rpmTitle', {
defaultMessage: 'Start Filebeat',
}),
textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.start.rpmTextPre', {
textPre: i18n.translate('home.tutorials.common.filebeatInstructions.start.rpmTextPre', {
defaultMessage:
'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.',
}),
commands: ['sudo filebeat setup', 'sudo service filebeat start'],
},
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.filebeatInstructions.start.windowsTitle', {
title: i18n.translate('home.tutorials.common.filebeatInstructions.start.windowsTitle', {
defaultMessage: 'Start Filebeat',
}),
textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.start.windowsTextPre', {
textPre: i18n.translate('home.tutorials.common.filebeatInstructions.start.windowsTextPre', {
defaultMessage:
'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.',
}),
@ -160,10 +161,10 @@ export const createFilebeatInstructions = context => ({
},
CONFIG: {
OSX: {
title: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.osxTitle', {
title: i18n.translate('home.tutorials.common.filebeatInstructions.config.osxTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.osxTextPre', {
textPre: i18n.translate('home.tutorials.common.filebeatInstructions.config.osxTextPre', {
defaultMessage: 'Modify {path} to set the connection information:',
values: {
path: '`filebeat.yml`',
@ -178,7 +179,7 @@ export const createFilebeatInstructions = context => ({
' host: "<kibana_url>"',
getSpaceIdForBeatsTutorial(context),
],
textPost: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.osxTextPost', {
textPost: i18n.translate('home.tutorials.common.filebeatInstructions.config.osxTextPost', {
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
and {kibanaUrlTemplate} is the URL of Kibana.',
@ -190,10 +191,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
}),
},
DEB: {
title: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.debTitle', {
title: i18n.translate('home.tutorials.common.filebeatInstructions.config.debTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.debTextPre', {
textPre: i18n.translate('home.tutorials.common.filebeatInstructions.config.debTextPre', {
defaultMessage: 'Modify {path} to set the connection information:',
values: {
path: '`/etc/filebeat/filebeat.yml`',
@ -208,7 +209,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
' host: "<kibana_url>"',
getSpaceIdForBeatsTutorial(context),
],
textPost: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.debTextPost', {
textPost: i18n.translate('home.tutorials.common.filebeatInstructions.config.debTextPost', {
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
and {kibanaUrlTemplate} is the URL of Kibana.',
@ -220,10 +221,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
}),
},
RPM: {
title: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.rpmTitle', {
title: i18n.translate('home.tutorials.common.filebeatInstructions.config.rpmTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.rpmTextPre', {
textPre: i18n.translate('home.tutorials.common.filebeatInstructions.config.rpmTextPre', {
defaultMessage: 'Modify {path} to set the connection information:',
values: {
path: '`/etc/filebeat/filebeat.yml`',
@ -238,7 +239,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
' host: "<kibana_url>"',
getSpaceIdForBeatsTutorial(context),
],
textPost: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.rpmTextPost', {
textPost: i18n.translate('home.tutorials.common.filebeatInstructions.config.rpmTextPost', {
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
and {kibanaUrlTemplate} is the URL of Kibana.',
@ -250,10 +251,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
}),
},
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.windowsTitle', {
title: i18n.translate('home.tutorials.common.filebeatInstructions.config.windowsTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.windowsTextPre', {
textPre: i18n.translate('home.tutorials.common.filebeatInstructions.config.windowsTextPre', {
defaultMessage: 'Modify {path} to set the connection information:',
values: {
path: '`C:\\Program Files\\Filebeat\\filebeat.yml`',
@ -268,16 +269,19 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
' host: "<kibana_url>"',
getSpaceIdForBeatsTutorial(context),
],
textPost: i18n.translate('kbn.common.tutorials.filebeatInstructions.config.windowsTextPost', {
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
textPost: i18n.translate(
'home.tutorials.common.filebeatInstructions.config.windowsTextPost',
{
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
and {kibanaUrlTemplate} is the URL of Kibana.',
values: {
passwordTemplate: '`<password>`',
esUrlTemplate: '`<es_url>`',
kibanaUrlTemplate: '`<kibana_url>`',
},
}),
values: {
passwordTemplate: '`<password>`',
esUrlTemplate: '`<es_url>`',
kibanaUrlTemplate: '`<kibana_url>`',
},
}
),
},
},
});
@ -285,10 +289,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
export const createFilebeatCloudInstructions = () => ({
CONFIG: {
OSX: {
title: i18n.translate('kbn.common.tutorials.filebeatCloudInstructions.config.osxTitle', {
title: i18n.translate('home.tutorials.common.filebeatCloudInstructions.config.osxTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.filebeatCloudInstructions.config.osxTextPre', {
textPre: i18n.translate('home.tutorials.common.filebeatCloudInstructions.config.osxTextPre', {
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
path: '`filebeat.yml`',
@ -296,7 +300,7 @@ export const createFilebeatCloudInstructions = () => ({
}),
commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:<password>"'],
textPost: i18n.translate(
'kbn.common.tutorials.filebeatCloudInstructions.config.osxTextPost',
'home.tutorials.common.filebeatCloudInstructions.config.osxTextPost',
{
defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.',
values: { passwordTemplate: '`<password>`' },
@ -304,10 +308,10 @@ export const createFilebeatCloudInstructions = () => ({
),
},
DEB: {
title: i18n.translate('kbn.common.tutorials.filebeatCloudInstructions.config.debTitle', {
title: i18n.translate('home.tutorials.common.filebeatCloudInstructions.config.debTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.filebeatCloudInstructions.config.debTextPre', {
textPre: i18n.translate('home.tutorials.common.filebeatCloudInstructions.config.debTextPre', {
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
path: '`/etc/filebeat/filebeat.yml`',
@ -315,7 +319,7 @@ export const createFilebeatCloudInstructions = () => ({
}),
commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:<password>"'],
textPost: i18n.translate(
'kbn.common.tutorials.filebeatCloudInstructions.config.debTextPost',
'home.tutorials.common.filebeatCloudInstructions.config.debTextPost',
{
defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.',
values: { passwordTemplate: '`<password>`' },
@ -323,10 +327,10 @@ export const createFilebeatCloudInstructions = () => ({
),
},
RPM: {
title: i18n.translate('kbn.common.tutorials.filebeatCloudInstructions.config.rpmTitle', {
title: i18n.translate('home.tutorials.common.filebeatCloudInstructions.config.rpmTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.filebeatCloudInstructions.config.rpmTextPre', {
textPre: i18n.translate('home.tutorials.common.filebeatCloudInstructions.config.rpmTextPre', {
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
path: '`/etc/filebeat/filebeat.yml`',
@ -334,7 +338,7 @@ export const createFilebeatCloudInstructions = () => ({
}),
commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:<password>"'],
textPost: i18n.translate(
'kbn.common.tutorials.filebeatCloudInstructions.config.rpmTextPost',
'home.tutorials.common.filebeatCloudInstructions.config.rpmTextPost',
{
defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.',
values: { passwordTemplate: '`<password>`' },
@ -342,11 +346,11 @@ export const createFilebeatCloudInstructions = () => ({
),
},
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.filebeatCloudInstructions.config.windowsTitle', {
title: i18n.translate('home.tutorials.common.filebeatCloudInstructions.config.windowsTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate(
'kbn.common.tutorials.filebeatCloudInstructions.config.windowsTextPre',
'home.tutorials.common.filebeatCloudInstructions.config.windowsTextPre',
{
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
@ -356,7 +360,7 @@ export const createFilebeatCloudInstructions = () => ({
),
commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:<password>"'],
textPost: i18n.translate(
'kbn.common.tutorials.filebeatCloudInstructions.config.windowsTextPost',
'home.tutorials.common.filebeatCloudInstructions.config.windowsTextPost',
{
defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.',
values: { passwordTemplate: '`<password>`' },
@ -366,57 +370,57 @@ export const createFilebeatCloudInstructions = () => ({
},
});
export function filebeatEnableInstructions(moduleName) {
export function filebeatEnableInstructions(moduleName: string) {
return {
OSX: {
title: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.osxTitle', {
title: i18n.translate('home.tutorials.common.filebeatEnableInstructions.osxTitle', {
defaultMessage: 'Enable and configure the {moduleName} module',
values: { moduleName },
}),
textPre: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.osxTextPre', {
textPre: i18n.translate('home.tutorials.common.filebeatEnableInstructions.osxTextPre', {
defaultMessage: 'From the installation directory, run:',
}),
commands: ['./filebeat modules enable ' + moduleName],
textPost: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.osxTextPost', {
textPost: i18n.translate('home.tutorials.common.filebeatEnableInstructions.osxTextPost', {
defaultMessage: 'Modify the settings in the `modules.d/{moduleName}.yml` file.',
values: { moduleName },
}),
},
DEB: {
title: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.debTitle', {
title: i18n.translate('home.tutorials.common.filebeatEnableInstructions.debTitle', {
defaultMessage: 'Enable and configure the {moduleName} module',
values: { moduleName },
}),
commands: ['sudo filebeat modules enable ' + moduleName],
textPost: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.debTextPost', {
textPost: i18n.translate('home.tutorials.common.filebeatEnableInstructions.debTextPost', {
defaultMessage:
'Modify the settings in the `/etc/filebeat/modules.d/{moduleName}.yml` file.',
values: { moduleName },
}),
},
RPM: {
title: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.rpmTitle', {
title: i18n.translate('home.tutorials.common.filebeatEnableInstructions.rpmTitle', {
defaultMessage: 'Enable and configure the {moduleName} module',
values: { moduleName },
}),
commands: ['sudo filebeat modules enable ' + moduleName],
textPost: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.rpmTextPost', {
textPost: i18n.translate('home.tutorials.common.filebeatEnableInstructions.rpmTextPost', {
defaultMessage:
'Modify the settings in the `/etc/filebeat/modules.d/{moduleName}.yml` file.',
values: { moduleName },
}),
},
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.windowsTitle', {
title: i18n.translate('home.tutorials.common.filebeatEnableInstructions.windowsTitle', {
defaultMessage: 'Enable and configure the {moduleName} module',
values: { moduleName },
}),
textPre: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.windowsTextPre', {
textPre: i18n.translate('home.tutorials.common.filebeatEnableInstructions.windowsTextPre', {
defaultMessage: 'From the {path} folder, run:',
values: { path: `C:\\Program Files\\Filebeat` },
}),
commands: ['filebeat.exe modules enable ' + moduleName],
textPost: i18n.translate('kbn.common.tutorials.filebeatEnableInstructions.windowsTextPost', {
textPost: i18n.translate('home.tutorials.common.filebeatEnableInstructions.windowsTextPost', {
defaultMessage: 'Modify the settings in the `modules.d/{moduleName}.yml` file.',
values: { moduleName },
}),
@ -424,22 +428,22 @@ export function filebeatEnableInstructions(moduleName) {
};
}
export function filebeatStatusCheck(moduleName) {
export function filebeatStatusCheck(moduleName: string) {
return {
title: i18n.translate('kbn.common.tutorials.filebeatStatusCheck.title', {
title: i18n.translate('home.tutorials.common.filebeatStatusCheck.title', {
defaultMessage: 'Module status',
}),
text: i18n.translate('kbn.common.tutorials.filebeatStatusCheck.text', {
text: i18n.translate('home.tutorials.common.filebeatStatusCheck.text', {
defaultMessage: 'Check that data is received from the Filebeat `{moduleName}` module',
values: { moduleName },
}),
btnLabel: i18n.translate('kbn.common.tutorials.filebeatStatusCheck.buttonLabel', {
btnLabel: i18n.translate('home.tutorials.common.filebeatStatusCheck.buttonLabel', {
defaultMessage: 'Check data',
}),
success: i18n.translate('kbn.common.tutorials.filebeatStatusCheck.successText', {
success: i18n.translate('home.tutorials.common.filebeatStatusCheck.successText', {
defaultMessage: 'Data successfully received from this module',
}),
error: i18n.translate('kbn.common.tutorials.filebeatStatusCheck.errorText', {
error: i18n.translate('home.tutorials.common.filebeatStatusCheck.errorText', {
defaultMessage: 'No data has been received from this module yet',
}),
esHitsCheck: {
@ -457,7 +461,11 @@ export function filebeatStatusCheck(moduleName) {
};
}
export function onPremInstructions(moduleName, platforms, context) {
export function onPremInstructions(
moduleName: string,
platforms: readonly Platform[] = [],
context?: TutorialContext
) {
const FILEBEAT_INSTRUCTIONS = createFilebeatInstructions(context);
const variants = [];
@ -470,14 +478,14 @@ export function onPremInstructions(moduleName, platforms, context) {
instructions.push(FILEBEAT_INSTRUCTIONS.START[platform]);
variants.push({
id: INSTRUCTION_VARIANT[platform],
instructions: instructions,
instructions,
});
}
return {
instructionSets: [
{
title: i18n.translate(
'kbn.common.tutorials.filebeat.premInstructions.gettingStarted.title',
'home.tutorials.common.filebeat.premInstructions.gettingStarted.title',
{
defaultMessage: 'Getting Started',
}
@ -489,7 +497,7 @@ export function onPremInstructions(moduleName, platforms, context) {
};
}
export function onPremCloudInstructions(moduleName, platforms) {
export function onPremCloudInstructions(moduleName: string, platforms: readonly Platform[] = []) {
const FILEBEAT_INSTRUCTIONS = createFilebeatInstructions();
const TRYCLOUD_OPTION1 = createTrycloudOption1();
const TRYCLOUD_OPTION2 = createTrycloudOption2();
@ -514,7 +522,7 @@ export function onPremCloudInstructions(moduleName, platforms) {
instructionSets: [
{
title: i18n.translate(
'kbn.common.tutorials.filebeat.premCloudInstructions.gettingStarted.title',
'home.tutorials.common.filebeat.premCloudInstructions.gettingStarted.title',
{
defaultMessage: 'Getting Started',
}
@ -526,7 +534,7 @@ export function onPremCloudInstructions(moduleName, platforms) {
};
}
export function cloudInstructions(moduleName, platforms) {
export function cloudInstructions(moduleName: string, platforms: readonly Platform[] = []) {
const FILEBEAT_INSTRUCTIONS = createFilebeatInstructions();
const FILEBEAT_CLOUD_INSTRUCTIONS = createFilebeatCloudInstructions();
@ -548,7 +556,7 @@ export function cloudInstructions(moduleName, platforms) {
instructionSets: [
{
title: i18n.translate(
'kbn.common.tutorials.filebeat.cloudInstructions.gettingStarted.title',
'home.tutorials.common.filebeat.cloudInstructions.gettingStarted.title',
{
defaultMessage: 'Getting Started',
}

View file

@ -20,15 +20,16 @@
import { i18n } from '@kbn/i18n';
import { INSTRUCTION_VARIANT } from './instruction_variant';
import { createTrycloudOption1, createTrycloudOption2 } from './onprem_cloud_instructions';
import { getSpaceIdForBeatsTutorial } from '../lib/get_space_id_for_beats_tutorial';
import { getSpaceIdForBeatsTutorial } from './get_space_id_for_beats_tutorial';
import { Platform, TutorialContext } from '../../services/tutorials/lib/tutorials_registry_types';
export const createFunctionbeatInstructions = context => ({
export const createFunctionbeatInstructions = (context?: TutorialContext) => ({
INSTALL: {
OSX: {
title: i18n.translate('kbn.common.tutorials.functionbeatInstructions.install.osxTitle', {
title: i18n.translate('home.tutorials.common.functionbeatInstructions.install.osxTitle', {
defaultMessage: 'Download and install Functionbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.functionbeatInstructions.install.osxTextPre', {
textPre: i18n.translate('home.tutorials.common.functionbeatInstructions.install.osxTextPre', {
defaultMessage: 'First time using Functionbeat? See the [Getting Started Guide]({link}).',
values: { link: '{config.docs.beats.functionbeat}/functionbeat-getting-started.html' },
}),
@ -39,11 +40,11 @@ export const createFunctionbeatInstructions = context => ({
],
},
LINUX: {
title: i18n.translate('kbn.common.tutorials.functionbeatInstructions.install.linuxTitle', {
title: i18n.translate('home.tutorials.common.functionbeatInstructions.install.linuxTitle', {
defaultMessage: 'Download and install Functionbeat',
}),
textPre: i18n.translate(
'kbn.common.tutorials.functionbeatInstructions.install.linuxTextPre',
'home.tutorials.common.functionbeatInstructions.install.linuxTextPre',
{
defaultMessage: 'First time using Functionbeat? See the [Getting Started Guide]({link}).',
values: { link: '{config.docs.beats.functionbeat}/functionbeat-getting-started.html' },
@ -56,11 +57,11 @@ export const createFunctionbeatInstructions = context => ({
],
},
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.functionbeatInstructions.install.windowsTitle', {
title: i18n.translate('home.tutorials.common.functionbeatInstructions.install.windowsTitle', {
defaultMessage: 'Download and install Functionbeat',
}),
textPre: i18n.translate(
'kbn.common.tutorials.functionbeatInstructions.install.windowsTextPre',
'home.tutorials.common.functionbeatInstructions.install.windowsTextPre',
{
defaultMessage:
'First time using Functionbeat? See the [Getting Started Guide]({functionbeatLink}).\n\
@ -83,10 +84,10 @@ export const createFunctionbeatInstructions = context => ({
},
DEPLOY: {
OSX_LINUX: {
title: i18n.translate('kbn.common.tutorials.functionbeatInstructions.deploy.osxTitle', {
title: i18n.translate('home.tutorials.common.functionbeatInstructions.deploy.osxTitle', {
defaultMessage: 'Deploy Functionbeat to AWS Lambda',
}),
textPre: i18n.translate('kbn.common.tutorials.functionbeatInstructions.deploy.osxTextPre', {
textPre: i18n.translate('home.tutorials.common.functionbeatInstructions.deploy.osxTextPre', {
defaultMessage:
'This installs Functionbeat as a Lambda function.\
The `setup` command checks the Elasticsearch configuration and loads the \
@ -95,11 +96,11 @@ Kibana index pattern. It is normally safe to omit this command.',
commands: ['./functionbeat setup', './functionbeat deploy fn-cloudwatch-logs'],
},
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.functionbeatInstructions.deploy.windowsTitle', {
title: i18n.translate('home.tutorials.common.functionbeatInstructions.deploy.windowsTitle', {
defaultMessage: 'Deploy Functionbeat to AWS Lambda',
}),
textPre: i18n.translate(
'kbn.common.tutorials.functionbeatInstructions.deploy.windowsTextPre',
'home.tutorials.common.functionbeatInstructions.deploy.windowsTextPre',
{
defaultMessage:
'This installs Functionbeat as a Lambda function.\
@ -112,10 +113,10 @@ Kibana index pattern. It is normally safe to omit this command.',
},
CONFIG: {
OSX_LINUX: {
title: i18n.translate('kbn.common.tutorials.functionbeatInstructions.config.osxTitle', {
title: i18n.translate('home.tutorials.common.functionbeatInstructions.config.osxTitle', {
defaultMessage: 'Configure the Elastic cluster',
}),
textPre: i18n.translate('kbn.common.tutorials.functionbeatInstructions.config.osxTextPre', {
textPre: i18n.translate('home.tutorials.common.functionbeatInstructions.config.osxTextPre', {
defaultMessage: 'Modify {path} to set the connection information:',
values: {
path: '`functionbeat.yml`',
@ -130,23 +131,26 @@ Kibana index pattern. It is normally safe to omit this command.',
' host: "<kibana_url>"',
getSpaceIdForBeatsTutorial(context),
],
textPost: i18n.translate('kbn.common.tutorials.functionbeatInstructions.config.osxTextPost', {
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
textPost: i18n.translate(
'home.tutorials.common.functionbeatInstructions.config.osxTextPost',
{
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
and {kibanaUrlTemplate} is the URL of Kibana.',
values: {
passwordTemplate: '`<password>`',
esUrlTemplate: '`<es_url>`',
kibanaUrlTemplate: '`<kibana_url>`',
},
}),
values: {
passwordTemplate: '`<password>`',
esUrlTemplate: '`<es_url>`',
kibanaUrlTemplate: '`<kibana_url>`',
},
}
),
},
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.functionbeatInstructions.config.windowsTitle', {
title: i18n.translate('home.tutorials.common.functionbeatInstructions.config.windowsTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate(
'kbn.common.tutorials.functionbeatInstructions.config.windowsTextPre',
'home.tutorials.common.functionbeatInstructions.config.windowsTextPre',
{
defaultMessage: 'Modify {path} to set the connection information:',
values: {
@ -164,7 +168,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
getSpaceIdForBeatsTutorial(context),
],
textPost: i18n.translate(
'kbn.common.tutorials.functionbeatInstructions.config.windowsTextPost',
'home.tutorials.common.functionbeatInstructions.config.windowsTextPost',
{
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
@ -183,11 +187,11 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
export const createFunctionbeatCloudInstructions = () => ({
CONFIG: {
OSX_LINUX: {
title: i18n.translate('kbn.common.tutorials.functionbeatCloudInstructions.config.osxTitle', {
title: i18n.translate('home.tutorials.common.functionbeatCloudInstructions.config.osxTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate(
'kbn.common.tutorials.functionbeatCloudInstructions.config.osxTextPre',
'home.tutorials.common.functionbeatCloudInstructions.config.osxTextPre',
{
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
@ -197,7 +201,7 @@ export const createFunctionbeatCloudInstructions = () => ({
),
commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:<password>"'],
textPost: i18n.translate(
'kbn.common.tutorials.functionbeatCloudInstructions.config.osxTextPost',
'home.tutorials.common.functionbeatCloudInstructions.config.osxTextPost',
{
defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.',
values: { passwordTemplate: '`<password>`' },
@ -206,13 +210,13 @@ export const createFunctionbeatCloudInstructions = () => ({
},
WINDOWS: {
title: i18n.translate(
'kbn.common.tutorials.functionbeatCloudInstructions.config.windowsTitle',
'home.tutorials.common.functionbeatCloudInstructions.config.windowsTitle',
{
defaultMessage: 'Edit the configuration',
}
),
textPre: i18n.translate(
'kbn.common.tutorials.functionbeatCloudInstructions.config.windowsTextPre',
'home.tutorials.common.functionbeatCloudInstructions.config.windowsTextPre',
{
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
@ -222,7 +226,7 @@ export const createFunctionbeatCloudInstructions = () => ({
),
commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:<password>"'],
textPost: i18n.translate(
'kbn.common.tutorials.functionbeatCloudInstructions.config.windowsTextPost',
'home.tutorials.common.functionbeatCloudInstructions.config.windowsTextPost',
{
defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.',
values: { passwordTemplate: '`<password>`' },
@ -234,7 +238,7 @@ export const createFunctionbeatCloudInstructions = () => ({
export function functionbeatEnableInstructions() {
const defaultTitle = i18n.translate(
'kbn.common.tutorials.functionbeatEnableOnPremInstructions.defaultTitle',
'home.tutorials.common.functionbeatEnableOnPremInstructions.defaultTitle',
{
defaultMessage: 'Configure the Cloudwatch log group',
}
@ -249,7 +253,7 @@ export function functionbeatEnableInstructions() {
'functionbeat.provider.aws.deploy_bucket: <unique-bucket-name>',
];
const defaultTextPost = i18n.translate(
'kbn.common.tutorials.functionbeatEnableOnPremInstructions.defaultTextPost',
'home.tutorials.common.functionbeatEnableOnPremInstructions.defaultTextPost',
{
defaultMessage:
'Where `<cloudwatch-log-group>` is the name of the log group you want to ingest, \
@ -261,7 +265,7 @@ Functionbeat deploy.',
OSX_LINUX: {
title: defaultTitle,
textPre: i18n.translate(
'kbn.common.tutorials.functionbeatEnableOnPremInstructionsOSXLinux.textPre',
'home.tutorials.common.functionbeatEnableOnPremInstructionsOSXLinux.textPre',
{
defaultMessage: 'Modify the settings in the `functionbeat.yml` file.',
}
@ -272,7 +276,7 @@ Functionbeat deploy.',
WINDOWS: {
title: defaultTitle,
textPre: i18n.translate(
'kbn.common.tutorials.functionbeatEnableOnPremInstructionsWindows.textPre',
'home.tutorials.common.functionbeatEnableOnPremInstructionsWindows.textPre',
{
defaultMessage: 'Modify the settings in the {path} file.',
values: {
@ -287,13 +291,13 @@ Functionbeat deploy.',
}
export function functionbeatAWSInstructions() {
const defaultTitle = i18n.translate('kbn.common.tutorials.functionbeatAWSInstructions.title', {
const defaultTitle = i18n.translate('home.tutorials.common.functionbeatAWSInstructions.title', {
defaultMessage: 'Set AWS credentials',
});
const defaultPre = i18n.translate('kbn.common.tutorials.functionbeatAWSInstructions.textPre', {
const defaultPre = i18n.translate('home.tutorials.common.functionbeatAWSInstructions.textPre', {
defaultMessage: 'Set your AWS account credentials in the environment:',
});
const defaultPost = i18n.translate('kbn.common.tutorials.functionbeatAWSInstructions.textPost', {
const defaultPost = i18n.translate('home.tutorials.common.functionbeatAWSInstructions.textPost', {
defaultMessage:
'Where `<your-access-key>` and `<your-secret-access-key>` are your account credentials and \
`us-east-1` is the desired region.',
@ -325,19 +329,19 @@ export function functionbeatAWSInstructions() {
export function functionbeatStatusCheck() {
return {
title: i18n.translate('kbn.common.tutorials.functionbeatStatusCheck.title', {
title: i18n.translate('home.tutorials.common.functionbeatStatusCheck.title', {
defaultMessage: 'Functionbeat status',
}),
text: i18n.translate('kbn.common.tutorials.functionbeatStatusCheck.text', {
text: i18n.translate('home.tutorials.common.functionbeatStatusCheck.text', {
defaultMessage: 'Check that data is received from Functionbeat',
}),
btnLabel: i18n.translate('kbn.common.tutorials.functionbeatStatusCheck.buttonLabel', {
btnLabel: i18n.translate('home.tutorials.common.functionbeatStatusCheck.buttonLabel', {
defaultMessage: 'Check data',
}),
success: i18n.translate('kbn.common.tutorials.functionbeatStatusCheck.successText', {
success: i18n.translate('home.tutorials.common.functionbeatStatusCheck.successText', {
defaultMessage: 'Data successfully received from Functionbeat',
}),
error: i18n.translate('kbn.common.tutorials.functionbeatStatusCheck.errorText', {
error: i18n.translate('home.tutorials.common.functionbeatStatusCheck.errorText', {
defaultMessage: 'No data has been received from Functionbeat yet',
}),
esHitsCheck: {
@ -349,14 +353,14 @@ export function functionbeatStatusCheck() {
};
}
export function onPremInstructions(platforms, context) {
export function onPremInstructions(platforms: Platform[], context?: TutorialContext) {
const FUNCTIONBEAT_INSTRUCTIONS = createFunctionbeatInstructions(context);
return {
instructionSets: [
{
title: i18n.translate(
'kbn.common.tutorials.functionbeat.premInstructions.gettingStarted.title',
'home.tutorials.common.functionbeat.premInstructions.gettingStarted.title',
{
defaultMessage: 'Getting Started',
}
@ -408,7 +412,7 @@ export function onPremCloudInstructions() {
instructionSets: [
{
title: i18n.translate(
'kbn.common.tutorials.functionbeat.premCloudInstructions.gettingStarted.title',
'home.tutorials.common.functionbeat.premCloudInstructions.gettingStarted.title',
{
defaultMessage: 'Getting Started',
}
@ -465,7 +469,7 @@ export function cloudInstructions() {
instructionSets: [
{
title: i18n.translate(
'kbn.common.tutorials.functionbeat.cloudInstructions.gettingStarted.title',
'home.tutorials.common.functionbeat.cloudInstructions.gettingStarted.title',
{
defaultMessage: 'Getting Started',
}

View file

@ -17,13 +17,15 @@
* under the License.
*/
import { TutorialContext } from '../../services/tutorials/lib/tutorials_registry_types';
/**
* Returns valid configuration for a beat.yml file for adding the space id
* if there is an active space and that space is not the default one.
*
* @param {object} context - Context object generated from tutorial factory (see #22760)
*/
export function getSpaceIdForBeatsTutorial(context) {
export function getSpaceIdForBeatsTutorial(context?: TutorialContext) {
if (!context || !context.spaceId || context.isInDefaultSpace) {
return '';
}

View file

@ -20,15 +20,16 @@
import { i18n } from '@kbn/i18n';
import { INSTRUCTION_VARIANT } from './instruction_variant';
import { createTrycloudOption1, createTrycloudOption2 } from './onprem_cloud_instructions';
import { getSpaceIdForBeatsTutorial } from '../lib/get_space_id_for_beats_tutorial';
import { getSpaceIdForBeatsTutorial } from './get_space_id_for_beats_tutorial';
import { Platform, TutorialContext } from '../../services/tutorials/lib/tutorials_registry_types';
export const createHeartbeatInstructions = context => ({
export const createHeartbeatInstructions = (context?: TutorialContext) => ({
INSTALL: {
OSX: {
title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.osxTitle', {
title: i18n.translate('home.tutorials.common.heartbeatInstructions.install.osxTitle', {
defaultMessage: 'Download and install Heartbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.osxTextPre', {
textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.install.osxTextPre', {
defaultMessage: 'First time using Heartbeat? See the [Getting Started Guide]({link}).',
values: { link: '{config.docs.beats.heartbeat}/heartbeat-getting-started.html' },
}),
@ -39,10 +40,10 @@ export const createHeartbeatInstructions = context => ({
],
},
DEB: {
title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.debTitle', {
title: i18n.translate('home.tutorials.common.heartbeatInstructions.install.debTitle', {
defaultMessage: 'Download and install Heartbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.debTextPre', {
textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.install.debTextPre', {
defaultMessage: 'First time using Heartbeat? See the [Getting Started Guide]({link}).',
values: { link: '{config.docs.beats.heartbeat}/heartbeat-getting-started.html' },
}),
@ -50,16 +51,16 @@ export const createHeartbeatInstructions = context => ({
'curl -L -O https://artifacts.elastic.co/downloads/beats/heartbeat/heartbeat-{config.kibana.version}-amd64.deb',
'sudo dpkg -i heartbeat-{config.kibana.version}-amd64.deb',
],
textPost: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.debTextPost', {
textPost: i18n.translate('home.tutorials.common.heartbeatInstructions.install.debTextPost', {
defaultMessage: 'Looking for the 32-bit packages? See the [Download page]({link}).',
values: { link: 'https://www.elastic.co/downloads/beats/heartbeat' },
}),
},
RPM: {
title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.rpmTitle', {
title: i18n.translate('home.tutorials.common.heartbeatInstructions.install.rpmTitle', {
defaultMessage: 'Download and install Heartbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.rpmTextPre', {
textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.install.rpmTextPre', {
defaultMessage: 'First time using Heartbeat? See the [Getting Started Guide]({link}).',
values: { link: '{config.docs.beats.heartbeat}/heartbeat-getting-started.html' },
}),
@ -67,67 +68,70 @@ export const createHeartbeatInstructions = context => ({
'curl -L -O https://artifacts.elastic.co/downloads/beats/heartbeat/heartbeat-{config.kibana.version}-x86_64.rpm',
'sudo rpm -vi heartbeat-{config.kibana.version}-x86_64.rpm',
],
textPost: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.debTextPost', {
textPost: i18n.translate('home.tutorials.common.heartbeatInstructions.install.debTextPost', {
defaultMessage: 'Looking for the 32-bit packages? See the [Download page]({link}).',
values: { link: 'https://www.elastic.co/downloads/beats/heartbeat' },
}),
},
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.windowsTitle', {
title: i18n.translate('home.tutorials.common.heartbeatInstructions.install.windowsTitle', {
defaultMessage: 'Download and install Heartbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.install.windowsTextPre', {
defaultMessage:
'First time using Heartbeat? See the [Getting Started Guide]({heartbeatLink}).\n\
textPre: i18n.translate(
'home.tutorials.common.heartbeatInstructions.install.windowsTextPre',
{
defaultMessage:
'First time using Heartbeat? See the [Getting Started Guide]({heartbeatLink}).\n\
1. Download the Heartbeat Windows zip file from the [Download]({elasticLink}) page.\n\
2. Extract the contents of the zip file into {folderPath}.\n\
3. Rename the {directoryName} directory to `Heartbeat`.\n\
4. Open a PowerShell prompt as an Administrator (right-click the PowerShell icon and select \
**Run As Administrator**). If you are running Windows XP, you might need to download and install PowerShell.\n\
5. From the PowerShell prompt, run the following commands to install Heartbeat as a Windows service.',
values: {
directoryName: '`heartbeat-{config.kibana.version}-windows`',
folderPath: '`C:\\Program Files`',
heartbeatLink: '{config.docs.beats.heartbeat}/heartbeat-getting-started.html',
elasticLink: 'https://www.elastic.co/downloads/beats/heartbeat',
},
}),
values: {
directoryName: '`heartbeat-{config.kibana.version}-windows`',
folderPath: '`C:\\Program Files`',
heartbeatLink: '{config.docs.beats.heartbeat}/heartbeat-getting-started.html',
elasticLink: 'https://www.elastic.co/downloads/beats/heartbeat',
},
}
),
commands: ['cd "C:\\Program Files\\Heartbeat"', '.\\install-service-heartbeat.ps1'],
},
},
START: {
OSX: {
title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.start.osxTitle', {
title: i18n.translate('home.tutorials.common.heartbeatInstructions.start.osxTitle', {
defaultMessage: 'Start Heartbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.start.osxTextPre', {
textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.start.osxTextPre', {
defaultMessage: 'The `setup` command loads the Kibana index pattern.',
}),
commands: ['./heartbeat setup', './heartbeat -e'],
},
DEB: {
title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.start.debTitle', {
title: i18n.translate('home.tutorials.common.heartbeatInstructions.start.debTitle', {
defaultMessage: 'Start Heartbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.start.debTextPre', {
textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.start.debTextPre', {
defaultMessage: 'The `setup` command loads the Kibana index pattern.',
}),
commands: ['sudo heartbeat setup', 'sudo service heartbeat-elastic start'],
},
RPM: {
title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.start.rpmTitle', {
title: i18n.translate('home.tutorials.common.heartbeatInstructions.start.rpmTitle', {
defaultMessage: 'Start Heartbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.start.rpmTextPre', {
textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.start.rpmTextPre', {
defaultMessage: 'The `setup` command loads the Kibana index pattern.',
}),
commands: ['sudo heartbeat setup', 'sudo service heartbeat-elastic start'],
},
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.start.windowsTitle', {
title: i18n.translate('home.tutorials.common.heartbeatInstructions.start.windowsTitle', {
defaultMessage: 'Start Heartbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.start.windowsTextPre', {
textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.start.windowsTextPre', {
defaultMessage: 'The `setup` command loads the Kibana index pattern.',
}),
commands: ['.\\heartbeat.exe setup', 'Start-Service heartbeat'],
@ -135,10 +139,10 @@ export const createHeartbeatInstructions = context => ({
},
CONFIG: {
OSX: {
title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.osxTitle', {
title: i18n.translate('home.tutorials.common.heartbeatInstructions.config.osxTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.osxTextPre', {
textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.config.osxTextPre', {
defaultMessage: 'Modify {path} to set the connection information:',
values: {
path: '`heartbeat.yml`',
@ -153,7 +157,7 @@ export const createHeartbeatInstructions = context => ({
' host: "<kibana_url>"',
getSpaceIdForBeatsTutorial(context),
],
textPost: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.osxTextPost', {
textPost: i18n.translate('home.tutorials.common.heartbeatInstructions.config.osxTextPost', {
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
and {kibanaUrlTemplate} is the URL of Kibana.',
@ -165,10 +169,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
}),
},
DEB: {
title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.debTitle', {
title: i18n.translate('home.tutorials.common.heartbeatInstructions.config.debTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.debTextPre', {
textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.config.debTextPre', {
defaultMessage: 'Modify {path} to set the connection information:',
values: {
path: '`/etc/heartbeat/heartbeat.yml`',
@ -183,7 +187,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
' host: "<kibana_url>"',
getSpaceIdForBeatsTutorial(context),
],
textPost: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.debTextPost', {
textPost: i18n.translate('home.tutorials.common.heartbeatInstructions.config.debTextPost', {
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
and {kibanaUrlTemplate} is the URL of Kibana.',
@ -195,10 +199,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
}),
},
RPM: {
title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.rpmTitle', {
title: i18n.translate('home.tutorials.common.heartbeatInstructions.config.rpmTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.rpmTextPre', {
textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.config.rpmTextPre', {
defaultMessage: 'Modify {path} to set the connection information:',
values: {
path: '`/etc/heartbeat/heartbeat.yml`',
@ -213,7 +217,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
' host: "<kibana_url>"',
getSpaceIdForBeatsTutorial(context),
],
textPost: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.rpmTextPost', {
textPost: i18n.translate('home.tutorials.common.heartbeatInstructions.config.rpmTextPost', {
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
and {kibanaUrlTemplate} is the URL of Kibana.',
@ -225,10 +229,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
}),
},
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.windowsTitle', {
title: i18n.translate('home.tutorials.common.heartbeatInstructions.config.windowsTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.heartbeatInstructions.config.windowsTextPre', {
textPre: i18n.translate('home.tutorials.common.heartbeatInstructions.config.windowsTextPre', {
defaultMessage: 'Modify {path} to set the connection information:',
values: {
path: '`C:\\Program Files\\Heartbeat\\heartbeat.yml`',
@ -244,7 +248,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
getSpaceIdForBeatsTutorial(context),
],
textPost: i18n.translate(
'kbn.common.tutorials.heartbeatInstructions.config.windowsTextPost',
'home.tutorials.common.heartbeatInstructions.config.windowsTextPost',
{
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
@ -263,18 +267,21 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
export const createHeartbeatCloudInstructions = () => ({
CONFIG: {
OSX: {
title: i18n.translate('kbn.common.tutorials.heartbeatCloudInstructions.config.osxTitle', {
title: i18n.translate('home.tutorials.common.heartbeatCloudInstructions.config.osxTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.heartbeatCloudInstructions.config.osxTextPre', {
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
path: '`heartbeat.yml`',
},
}),
textPre: i18n.translate(
'home.tutorials.common.heartbeatCloudInstructions.config.osxTextPre',
{
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
path: '`heartbeat.yml`',
},
}
),
commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:<password>"'],
textPost: i18n.translate(
'kbn.common.tutorials.heartbeatCloudInstructions.config.osxTextPost',
'home.tutorials.common.heartbeatCloudInstructions.config.osxTextPost',
{
defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.',
values: { passwordTemplate: '`<password>`' },
@ -282,18 +289,21 @@ export const createHeartbeatCloudInstructions = () => ({
),
},
DEB: {
title: i18n.translate('kbn.common.tutorials.heartbeatCloudInstructions.config.debTitle', {
title: i18n.translate('home.tutorials.common.heartbeatCloudInstructions.config.debTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.heartbeatCloudInstructions.config.debTextPre', {
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
path: '`/etc/heartbeat/heartbeat.yml`',
},
}),
textPre: i18n.translate(
'home.tutorials.common.heartbeatCloudInstructions.config.debTextPre',
{
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
path: '`/etc/heartbeat/heartbeat.yml`',
},
}
),
commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:<password>"'],
textPost: i18n.translate(
'kbn.common.tutorials.heartbeatCloudInstructions.config.debTextPost',
'home.tutorials.common.heartbeatCloudInstructions.config.debTextPost',
{
defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.',
values: { passwordTemplate: '`<password>`' },
@ -301,18 +311,21 @@ export const createHeartbeatCloudInstructions = () => ({
),
},
RPM: {
title: i18n.translate('kbn.common.tutorials.heartbeatCloudInstructions.config.rpmTitle', {
title: i18n.translate('home.tutorials.common.heartbeatCloudInstructions.config.rpmTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.heartbeatCloudInstructions.config.rpmTextPre', {
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
path: '`/etc/heartbeat/heartbeat.yml`',
},
}),
textPre: i18n.translate(
'home.tutorials.common.heartbeatCloudInstructions.config.rpmTextPre',
{
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
path: '`/etc/heartbeat/heartbeat.yml`',
},
}
),
commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:<password>"'],
textPost: i18n.translate(
'kbn.common.tutorials.heartbeatCloudInstructions.config.rpmTextPost',
'home.tutorials.common.heartbeatCloudInstructions.config.rpmTextPost',
{
defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.',
values: { passwordTemplate: '`<password>`' },
@ -320,11 +333,14 @@ export const createHeartbeatCloudInstructions = () => ({
),
},
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.heartbeatCloudInstructions.config.windowsTitle', {
defaultMessage: 'Edit the configuration',
}),
title: i18n.translate(
'home.tutorials.common.heartbeatCloudInstructions.config.windowsTitle',
{
defaultMessage: 'Edit the configuration',
}
),
textPre: i18n.translate(
'kbn.common.tutorials.heartbeatCloudInstructions.config.windowsTextPre',
'home.tutorials.common.heartbeatCloudInstructions.config.windowsTextPre',
{
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
@ -334,7 +350,7 @@ export const createHeartbeatCloudInstructions = () => ({
),
commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:<password>"'],
textPost: i18n.translate(
'kbn.common.tutorials.heartbeatCloudInstructions.config.windowsTextPost',
'home.tutorials.common.heartbeatCloudInstructions.config.windowsTextPost',
{
defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.',
values: { passwordTemplate: '`<password>`' },
@ -346,7 +362,7 @@ export const createHeartbeatCloudInstructions = () => ({
export function heartbeatEnableInstructionsOnPrem() {
const defaultTitle = i18n.translate(
'kbn.common.tutorials.heartbeatEnableOnPremInstructions.defaultTitle',
'home.tutorials.common.heartbeatEnableOnPremInstructions.defaultTitle',
{
defaultMessage: 'Edit the configuration - Add monitors',
}
@ -358,7 +374,7 @@ export function heartbeatEnableInstructionsOnPrem() {
' schedule: "@every 10s"',
];
const defaultTextPost = i18n.translate(
'kbn.common.tutorials.heartbeatEnableOnPremInstructions.defaultTextPost',
'home.tutorials.common.heartbeatEnableOnPremInstructions.defaultTextPost',
{
defaultMessage:
'Where {hostTemplate} is your monitored URL, For more details on how to configure Monitors in \
@ -372,32 +388,41 @@ export function heartbeatEnableInstructionsOnPrem() {
return {
OSX: {
title: defaultTitle,
textPre: i18n.translate('kbn.common.tutorials.heartbeatEnableOnPremInstructions.osxTextPre', {
defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.',
}),
textPre: i18n.translate(
'home.tutorials.common.heartbeatEnableOnPremInstructions.osxTextPre',
{
defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.',
}
),
commands: defaultCommands,
textPost: defaultTextPost,
},
DEB: {
title: defaultTitle,
textPre: i18n.translate('kbn.common.tutorials.heartbeatEnableOnPremInstructions.debTextPre', {
defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.',
}),
textPre: i18n.translate(
'home.tutorials.common.heartbeatEnableOnPremInstructions.debTextPre',
{
defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.',
}
),
commands: defaultCommands,
textPost: defaultTextPost,
},
RPM: {
title: defaultTitle,
textPre: i18n.translate('kbn.common.tutorials.heartbeatEnableOnPremInstructions.rpmTextPre', {
defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.',
}),
textPre: i18n.translate(
'home.tutorials.common.heartbeatEnableOnPremInstructions.rpmTextPre',
{
defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.',
}
),
commands: defaultCommands,
textPost: defaultTextPost,
},
WINDOWS: {
title: defaultTitle,
textPre: i18n.translate(
'kbn.common.tutorials.heartbeatEnableOnPremInstructions.windowsTextPre',
'home.tutorials.common.heartbeatEnableOnPremInstructions.windowsTextPre',
{
defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.',
}
@ -410,7 +435,7 @@ export function heartbeatEnableInstructionsOnPrem() {
export function heartbeatEnableInstructionsCloud() {
const defaultTitle = i18n.translate(
'kbn.common.tutorials.heartbeatEnableCloudInstructions.defaultTitle',
'home.tutorials.common.heartbeatEnableCloudInstructions.defaultTitle',
{
defaultMessage: 'Edit the configuration - Add monitors',
}
@ -422,7 +447,7 @@ export function heartbeatEnableInstructionsCloud() {
' schedule: "@every 10s"',
];
const defaultTextPost = i18n.translate(
'kbn.common.tutorials.heartbeatEnableCloudInstructions.defaultTextPost',
'home.tutorials.common.heartbeatEnableCloudInstructions.defaultTextPost',
{
defaultMessage:
'For more details on how to configure Monitors in Heartbeat, read the [Heartbeat configuration docs.]({configureLink})',
@ -432,7 +457,7 @@ export function heartbeatEnableInstructionsCloud() {
return {
OSX: {
title: defaultTitle,
textPre: i18n.translate('kbn.common.tutorials.heartbeatEnableCloudInstructions.osxTextPre', {
textPre: i18n.translate('home.tutorials.common.heartbeatEnableCloudInstructions.osxTextPre', {
defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.',
}),
commands: defaultCommands,
@ -440,7 +465,7 @@ export function heartbeatEnableInstructionsCloud() {
},
DEB: {
title: defaultTitle,
textPre: i18n.translate('kbn.common.tutorials.heartbeatEnableCloudInstructions.debTextPre', {
textPre: i18n.translate('home.tutorials.common.heartbeatEnableCloudInstructions.debTextPre', {
defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.',
}),
commands: defaultCommands,
@ -448,7 +473,7 @@ export function heartbeatEnableInstructionsCloud() {
},
RPM: {
title: defaultTitle,
textPre: i18n.translate('kbn.common.tutorials.heartbeatEnableCloudInstructions.rpmTextPre', {
textPre: i18n.translate('home.tutorials.common.heartbeatEnableCloudInstructions.rpmTextPre', {
defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.',
}),
commands: defaultCommands,
@ -457,7 +482,7 @@ export function heartbeatEnableInstructionsCloud() {
WINDOWS: {
title: defaultTitle,
textPre: i18n.translate(
'kbn.common.tutorials.heartbeatEnableCloudInstructions.windowsTextPre',
'home.tutorials.common.heartbeatEnableCloudInstructions.windowsTextPre',
{
defaultMessage: 'Edit the `heartbeat.monitors` setting in the `heartbeat.yml` file.',
}
@ -470,19 +495,19 @@ export function heartbeatEnableInstructionsCloud() {
export function heartbeatStatusCheck() {
return {
title: i18n.translate('kbn.common.tutorials.heartbeatStatusCheck.title', {
title: i18n.translate('home.tutorials.common.heartbeatStatusCheck.title', {
defaultMessage: 'Heartbeat status',
}),
text: i18n.translate('kbn.common.tutorials.heartbeatStatusCheck.text', {
text: i18n.translate('home.tutorials.common.heartbeatStatusCheck.text', {
defaultMessage: 'Check that data is received from Heartbeat',
}),
btnLabel: i18n.translate('kbn.common.tutorials.heartbeatStatusCheck.buttonLabel', {
btnLabel: i18n.translate('home.tutorials.common.heartbeatStatusCheck.buttonLabel', {
defaultMessage: 'Check data',
}),
success: i18n.translate('kbn.common.tutorials.heartbeatStatusCheck.successText', {
success: i18n.translate('home.tutorials.common.heartbeatStatusCheck.successText', {
defaultMessage: 'Data successfully received from Heartbeat',
}),
error: i18n.translate('kbn.common.tutorials.heartbeatStatusCheck.errorText', {
error: i18n.translate('home.tutorials.common.heartbeatStatusCheck.errorText', {
defaultMessage: 'No data has been received from Heartbeat yet',
}),
esHitsCheck: {
@ -494,14 +519,14 @@ export function heartbeatStatusCheck() {
};
}
export function onPremInstructions(platforms, context) {
export function onPremInstructions(platforms: Platform[], context?: TutorialContext) {
const HEARTBEAT_INSTRUCTIONS = createHeartbeatInstructions(context);
return {
instructionSets: [
{
title: i18n.translate(
'kbn.common.tutorials.heartbeat.premInstructions.gettingStarted.title',
'home.tutorials.common.heartbeat.premInstructions.gettingStarted.title',
{
defaultMessage: 'Getting Started',
}
@ -559,7 +584,7 @@ export function onPremCloudInstructions() {
instructionSets: [
{
title: i18n.translate(
'kbn.common.tutorials.heartbeat.premCloudInstructions.gettingStarted.title',
'home.tutorials.common.heartbeat.premCloudInstructions.gettingStarted.title',
{
defaultMessage: 'Getting Started',
}
@ -624,7 +649,7 @@ export function cloudInstructions() {
instructionSets: [
{
title: i18n.translate(
'kbn.common.tutorials.heartbeat.cloudInstructions.gettingStarted.title',
'home.tutorials.common.heartbeat.cloudInstructions.gettingStarted.title',
{
defaultMessage: 'Getting Started',
}

View file

@ -61,7 +61,7 @@ const DISPLAY_MAP = {
* @params {String} id - instruction variant id as defined from INSTRUCTION_VARIANT
* @return {String} display name
*/
export function getDisplayText(id) {
export function getDisplayText(id: keyof typeof INSTRUCTION_VARIANT) {
if (id in DISPLAY_MAP) {
return DISPLAY_MAP[id];
}

View file

@ -23,11 +23,11 @@ export const createLogstashInstructions = () => ({
INSTALL: {
OSX: [
{
title: i18n.translate('kbn.common.tutorials.logstashInstructions.install.java.osxTitle', {
title: i18n.translate('home.tutorials.common.logstashInstructions.install.java.osxTitle', {
defaultMessage: 'Download and install the Java Runtime Environment',
}),
textPre: i18n.translate(
'kbn.common.tutorials.logstashInstructions.install.java.osxTextPre',
'home.tutorials.common.logstashInstructions.install.java.osxTextPre',
{
defaultMessage: 'Follow the installation instructions [here]({link}).',
values: {
@ -38,13 +38,13 @@ export const createLogstashInstructions = () => ({
},
{
title: i18n.translate(
'kbn.common.tutorials.logstashInstructions.install.logstash.osxTitle',
'home.tutorials.common.logstashInstructions.install.logstash.osxTitle',
{
defaultMessage: 'Download and install Logstash',
}
),
textPre: i18n.translate(
'kbn.common.tutorials.logstashInstructions.install.logstash.osxTextPre',
'home.tutorials.common.logstashInstructions.install.logstash.osxTextPre',
{
defaultMessage: 'First time using Logstash? See the [Getting Started Guide]({link}).',
values: {
@ -62,13 +62,13 @@ export const createLogstashInstructions = () => ({
WINDOWS: [
{
title: i18n.translate(
'kbn.common.tutorials.logstashInstructions.install.java.windowsTitle',
'home.tutorials.common.logstashInstructions.install.java.windowsTitle',
{
defaultMessage: 'Download and install the Java Runtime Environment',
}
),
textPre: i18n.translate(
'kbn.common.tutorials.logstashInstructions.install.java.windowsTextPre',
'home.tutorials.common.logstashInstructions.install.java.windowsTextPre',
{
defaultMessage: 'Follow the installation instructions [here]({link}).',
values: {
@ -80,13 +80,13 @@ export const createLogstashInstructions = () => ({
},
{
title: i18n.translate(
'kbn.common.tutorials.logstashInstructions.install.logstash.windowsTitle',
'home.tutorials.common.logstashInstructions.install.logstash.windowsTitle',
{
defaultMessage: 'Download and install Logstash',
}
),
textPre: i18n.translate(
'kbn.common.tutorials.logstashInstructions.install.logstash.windowsTextPre',
'home.tutorials.common.logstashInstructions.install.logstash.windowsTextPre',
{
defaultMessage:
'First time using Logstash? See the [Getting Started Guide]({logstashLink}).\n\

View file

@ -20,15 +20,16 @@
import { i18n } from '@kbn/i18n';
import { INSTRUCTION_VARIANT } from './instruction_variant';
import { createTrycloudOption1, createTrycloudOption2 } from './onprem_cloud_instructions';
import { getSpaceIdForBeatsTutorial } from '../lib/get_space_id_for_beats_tutorial';
import { getSpaceIdForBeatsTutorial } from './get_space_id_for_beats_tutorial';
import { TutorialContext } from '../../services/tutorials/lib/tutorials_registry_types';
export const createMetricbeatInstructions = context => ({
export const createMetricbeatInstructions = (context?: TutorialContext) => ({
INSTALL: {
OSX: {
title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.install.osxTitle', {
title: i18n.translate('home.tutorials.common.metricbeatInstructions.install.osxTitle', {
defaultMessage: 'Download and install Metricbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.install.osxTextPre', {
textPre: i18n.translate('home.tutorials.common.metricbeatInstructions.install.osxTextPre', {
defaultMessage: 'First time using Metricbeat? See the [Getting Started Guide]({link}).',
values: { link: '{config.docs.beats.metricbeat}/metricbeat-getting-started.html' },
}),
@ -39,10 +40,10 @@ export const createMetricbeatInstructions = context => ({
],
},
DEB: {
title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.install.debTitle', {
title: i18n.translate('home.tutorials.common.metricbeatInstructions.install.debTitle', {
defaultMessage: 'Download and install Metricbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.install.debTextPre', {
textPre: i18n.translate('home.tutorials.common.metricbeatInstructions.install.debTextPre', {
defaultMessage: 'First time using Metricbeat? See the [Getting Started Guide]({link}).',
values: { link: '{config.docs.beats.metricbeat}/metricbeat-getting-started.html' },
}),
@ -50,16 +51,16 @@ export const createMetricbeatInstructions = context => ({
'curl -L -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-{config.kibana.version}-amd64.deb',
'sudo dpkg -i metricbeat-{config.kibana.version}-amd64.deb',
],
textPost: i18n.translate('kbn.common.tutorials.metricbeatInstructions.install.debTextPost', {
textPost: i18n.translate('home.tutorials.common.metricbeatInstructions.install.debTextPost', {
defaultMessage: 'Looking for the 32-bit packages? See the [Download page]({link}).',
values: { link: 'https://www.elastic.co/downloads/beats/metricbeat' },
}),
},
RPM: {
title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.install.rpmTitle', {
title: i18n.translate('home.tutorials.common.metricbeatInstructions.install.rpmTitle', {
defaultMessage: 'Download and install Metricbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.install.rpmTextPre', {
textPre: i18n.translate('home.tutorials.common.metricbeatInstructions.install.rpmTextPre', {
defaultMessage: 'First time using Metricbeat? See the [Getting Started Guide]({link}).',
values: { link: '{config.docs.beats.metricbeat}/metricbeat-getting-started.html' },
}),
@ -67,17 +68,17 @@ export const createMetricbeatInstructions = context => ({
'curl -L -O https://artifacts.elastic.co/downloads/beats/metricbeat/metricbeat-{config.kibana.version}-x86_64.rpm',
'sudo rpm -vi metricbeat-{config.kibana.version}-x86_64.rpm',
],
textPost: i18n.translate('kbn.common.tutorials.metricbeatInstructions.install.debTextPost', {
textPost: i18n.translate('home.tutorials.common.metricbeatInstructions.install.debTextPost', {
defaultMessage: 'Looking for the 32-bit packages? See the [Download page]({link}).',
values: { link: 'https://www.elastic.co/downloads/beats/metricbeat' },
}),
},
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.install.windowsTitle', {
title: i18n.translate('home.tutorials.common.metricbeatInstructions.install.windowsTitle', {
defaultMessage: 'Download and install Metricbeat',
}),
textPre: i18n.translate(
'kbn.common.tutorials.metricbeatInstructions.install.windowsTextPre',
'home.tutorials.common.metricbeatInstructions.install.windowsTextPre',
{
defaultMessage:
'First time using Metricbeat? See the [Getting Started Guide]({metricbeatLink}).\n\
@ -97,7 +98,7 @@ export const createMetricbeatInstructions = context => ({
),
commands: ['cd "C:\\Program Files\\Metricbeat"', '.\\install-service-metricbeat.ps1'],
textPost: i18n.translate(
'kbn.common.tutorials.metricbeatInstructions.install.windowsTextPost',
'home.tutorials.common.metricbeatInstructions.install.windowsTextPost',
{
defaultMessage:
'Modify the settings under `output.elasticsearch` in the {path} file to point to your Elasticsearch installation.',
@ -108,40 +109,40 @@ export const createMetricbeatInstructions = context => ({
},
START: {
OSX: {
title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.start.osxTitle', {
title: i18n.translate('home.tutorials.common.metricbeatInstructions.start.osxTitle', {
defaultMessage: 'Start Metricbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.start.osxTextPre', {
textPre: i18n.translate('home.tutorials.common.metricbeatInstructions.start.osxTextPre', {
defaultMessage:
'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.',
}),
commands: ['./metricbeat setup', './metricbeat -e'],
},
DEB: {
title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.start.debTitle', {
title: i18n.translate('home.tutorials.common.metricbeatInstructions.start.debTitle', {
defaultMessage: 'Start Metricbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.start.debTextPre', {
textPre: i18n.translate('home.tutorials.common.metricbeatInstructions.start.debTextPre', {
defaultMessage:
'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.',
}),
commands: ['sudo metricbeat setup', 'sudo service metricbeat start'],
},
RPM: {
title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.start.rpmTitle', {
title: i18n.translate('home.tutorials.common.metricbeatInstructions.start.rpmTitle', {
defaultMessage: 'Start Metricbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.start.rpmTextPre', {
textPre: i18n.translate('home.tutorials.common.metricbeatInstructions.start.rpmTextPre', {
defaultMessage:
'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.',
}),
commands: ['sudo metricbeat setup', 'sudo service metricbeat start'],
},
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.start.windowsTitle', {
title: i18n.translate('home.tutorials.common.metricbeatInstructions.start.windowsTitle', {
defaultMessage: 'Start Metricbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.start.windowsTextPre', {
textPre: i18n.translate('home.tutorials.common.metricbeatInstructions.start.windowsTextPre', {
defaultMessage:
'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.',
}),
@ -150,10 +151,10 @@ export const createMetricbeatInstructions = context => ({
},
CONFIG: {
OSX: {
title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.osxTitle', {
title: i18n.translate('home.tutorials.common.metricbeatInstructions.config.osxTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.osxTextPre', {
textPre: i18n.translate('home.tutorials.common.metricbeatInstructions.config.osxTextPre', {
defaultMessage: 'Modify {path} to set the connection information:',
values: {
path: '`metricbeat.yml`',
@ -168,7 +169,7 @@ export const createMetricbeatInstructions = context => ({
' host: "<kibana_url>"',
getSpaceIdForBeatsTutorial(context),
],
textPost: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.osxTextPost', {
textPost: i18n.translate('home.tutorials.common.metricbeatInstructions.config.osxTextPost', {
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
and {kibanaUrlTemplate} is the URL of Kibana.',
@ -180,10 +181,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
}),
},
DEB: {
title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.debTitle', {
title: i18n.translate('home.tutorials.common.metricbeatInstructions.config.debTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.debTextPre', {
textPre: i18n.translate('home.tutorials.common.metricbeatInstructions.config.debTextPre', {
defaultMessage: 'Modify {path} to set the connection information:',
values: {
path: '`/etc/metricbeat/metricbeat.yml`',
@ -198,7 +199,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
' host: "<kibana_url>"',
getSpaceIdForBeatsTutorial(context),
],
textPost: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.debTextPost', {
textPost: i18n.translate('home.tutorials.common.metricbeatInstructions.config.debTextPost', {
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
and {kibanaUrlTemplate} is the URL of Kibana.',
@ -210,10 +211,10 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
}),
},
RPM: {
title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.rpmTitle', {
title: i18n.translate('home.tutorials.common.metricbeatInstructions.config.rpmTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.rpmTextPre', {
textPre: i18n.translate('home.tutorials.common.metricbeatInstructions.config.rpmTextPre', {
defaultMessage: 'Modify {path} to set the connection information:',
values: {
path: '`/etc/metricbeat/metricbeat.yml`',
@ -228,7 +229,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
' host: "<kibana_url>"',
getSpaceIdForBeatsTutorial(context),
],
textPost: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.rpmTextPost', {
textPost: i18n.translate('home.tutorials.common.metricbeatInstructions.config.rpmTextPost', {
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
and {kibanaUrlTemplate} is the URL of Kibana.',
@ -240,15 +241,18 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
}),
},
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.windowsTitle', {
title: i18n.translate('home.tutorials.common.metricbeatInstructions.config.windowsTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.metricbeatInstructions.config.windowsTextPre', {
defaultMessage: 'Modify {path} to set the connection information:',
values: {
path: '`C:\\Program Files\\Metricbeat\\metricbeat.yml`',
},
}),
textPre: i18n.translate(
'home.tutorials.common.metricbeatInstructions.config.windowsTextPre',
{
defaultMessage: 'Modify {path} to set the connection information:',
values: {
path: '`C:\\Program Files\\Metricbeat\\metricbeat.yml`',
},
}
),
commands: [
'output.elasticsearch:',
' hosts: ["<es_url>"]',
@ -259,7 +263,7 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
getSpaceIdForBeatsTutorial(context),
],
textPost: i18n.translate(
'kbn.common.tutorials.metricbeatInstructions.config.windowsTextPost',
'home.tutorials.common.metricbeatInstructions.config.windowsTextPost',
{
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
@ -278,11 +282,11 @@ and {kibanaUrlTemplate} is the URL of Kibana.',
export const createMetricbeatCloudInstructions = () => ({
CONFIG: {
OSX: {
title: i18n.translate('kbn.common.tutorials.metricbeatCloudInstructions.config.osxTitle', {
title: i18n.translate('home.tutorials.common.metricbeatCloudInstructions.config.osxTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate(
'kbn.common.tutorials.metricbeatCloudInstructions.config.osxTextPre',
'home.tutorials.common.metricbeatCloudInstructions.config.osxTextPre',
{
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
@ -292,7 +296,7 @@ export const createMetricbeatCloudInstructions = () => ({
),
commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:<password>"'],
textPost: i18n.translate(
'kbn.common.tutorials.metricbeatCloudInstructions.config.osxTextPost',
'home.tutorials.common.metricbeatCloudInstructions.config.osxTextPost',
{
defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.',
values: { passwordTemplate: '`<password>`' },
@ -300,11 +304,11 @@ export const createMetricbeatCloudInstructions = () => ({
),
},
DEB: {
title: i18n.translate('kbn.common.tutorials.metricbeatCloudInstructions.config.debTitle', {
title: i18n.translate('home.tutorials.common.metricbeatCloudInstructions.config.debTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate(
'kbn.common.tutorials.metricbeatCloudInstructions.config.debTextPre',
'home.tutorials.common.metricbeatCloudInstructions.config.debTextPre',
{
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
@ -314,7 +318,7 @@ export const createMetricbeatCloudInstructions = () => ({
),
commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:<password>"'],
textPost: i18n.translate(
'kbn.common.tutorials.metricbeatCloudInstructions.config.debTextPost',
'home.tutorials.common.metricbeatCloudInstructions.config.debTextPost',
{
defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.',
values: { passwordTemplate: '`<password>`' },
@ -322,11 +326,11 @@ export const createMetricbeatCloudInstructions = () => ({
),
},
RPM: {
title: i18n.translate('kbn.common.tutorials.metricbeatCloudInstructions.config.rpmTitle', {
title: i18n.translate('home.tutorials.common.metricbeatCloudInstructions.config.rpmTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate(
'kbn.common.tutorials.metricbeatCloudInstructions.config.rpmTextPre',
'home.tutorials.common.metricbeatCloudInstructions.config.rpmTextPre',
{
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
@ -336,7 +340,7 @@ export const createMetricbeatCloudInstructions = () => ({
),
commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:<password>"'],
textPost: i18n.translate(
'kbn.common.tutorials.metricbeatCloudInstructions.config.rpmTextPost',
'home.tutorials.common.metricbeatCloudInstructions.config.rpmTextPost',
{
defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.',
values: { passwordTemplate: '`<password>`' },
@ -345,13 +349,13 @@ export const createMetricbeatCloudInstructions = () => ({
},
WINDOWS: {
title: i18n.translate(
'kbn.common.tutorials.metricbeatCloudInstructions.config.windowsTitle',
'home.tutorials.common.metricbeatCloudInstructions.config.windowsTitle',
{
defaultMessage: 'Edit the configuration',
}
),
textPre: i18n.translate(
'kbn.common.tutorials.metricbeatCloudInstructions.config.windowsTextPre',
'home.tutorials.common.metricbeatCloudInstructions.config.windowsTextPre',
{
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
@ -361,7 +365,7 @@ export const createMetricbeatCloudInstructions = () => ({
),
commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:<password>"'],
textPost: i18n.translate(
'kbn.common.tutorials.metricbeatCloudInstructions.config.windowsTextPost',
'home.tutorials.common.metricbeatCloudInstructions.config.windowsTextPost',
{
defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.',
values: { passwordTemplate: '`<password>`' },
@ -371,58 +375,58 @@ export const createMetricbeatCloudInstructions = () => ({
},
});
export function metricbeatEnableInstructions(moduleName) {
export function metricbeatEnableInstructions(moduleName: string) {
return {
OSX: {
title: i18n.translate('kbn.common.tutorials.metricbeatEnableInstructions.osxTitle', {
title: i18n.translate('home.tutorials.common.metricbeatEnableInstructions.osxTitle', {
defaultMessage: 'Enable and configure the {moduleName} module',
values: { moduleName },
}),
textPre: i18n.translate('kbn.common.tutorials.metricbeatEnableInstructions.osxTextPre', {
textPre: i18n.translate('home.tutorials.common.metricbeatEnableInstructions.osxTextPre', {
defaultMessage: 'From the installation directory, run:',
}),
commands: ['./metricbeat modules enable ' + moduleName],
textPost: i18n.translate('kbn.common.tutorials.metricbeatEnableInstructions.osxTextPost', {
textPost: i18n.translate('home.tutorials.common.metricbeatEnableInstructions.osxTextPost', {
defaultMessage: 'Modify the settings in the `modules.d/{moduleName}.yml` file.',
values: { moduleName },
}),
},
DEB: {
title: i18n.translate('kbn.common.tutorials.metricbeatEnableInstructions.debTitle', {
title: i18n.translate('home.tutorials.common.metricbeatEnableInstructions.debTitle', {
defaultMessage: 'Enable and configure the {moduleName} module',
values: { moduleName },
}),
commands: ['sudo metricbeat modules enable ' + moduleName],
textPost: i18n.translate('kbn.common.tutorials.metricbeatEnableInstructions.debTextPost', {
textPost: i18n.translate('home.tutorials.common.metricbeatEnableInstructions.debTextPost', {
defaultMessage:
'Modify the settings in the `/etc/metricbeat/modules.d/{moduleName}.yml` file.',
values: { moduleName },
}),
},
RPM: {
title: i18n.translate('kbn.common.tutorials.metricbeatEnableInstructions.rpmTitle', {
title: i18n.translate('home.tutorials.common.metricbeatEnableInstructions.rpmTitle', {
defaultMessage: 'Enable and configure the {moduleName} module',
values: { moduleName },
}),
commands: ['sudo metricbeat modules enable ' + moduleName],
textPost: i18n.translate('kbn.common.tutorials.metricbeatEnableInstructions.rpmTextPost', {
textPost: i18n.translate('home.tutorials.common.metricbeatEnableInstructions.rpmTextPost', {
defaultMessage:
'Modify the settings in the `/etc/metricbeat/modules.d/{moduleName}.yml` file.',
values: { moduleName },
}),
},
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.metricbeatEnableInstructions.windowsTitle', {
title: i18n.translate('home.tutorials.common.metricbeatEnableInstructions.windowsTitle', {
defaultMessage: 'Enable and configure the {moduleName} module',
values: { moduleName },
}),
textPre: i18n.translate('kbn.common.tutorials.metricbeatEnableInstructions.windowsTextPre', {
textPre: i18n.translate('home.tutorials.common.metricbeatEnableInstructions.windowsTextPre', {
defaultMessage: 'From the {path} folder, run:',
values: { path: `C:\\Program Files\\Metricbeat` },
}),
commands: ['.\\metricbeat.exe modules enable ' + moduleName],
textPost: i18n.translate(
'kbn.common.tutorials.metricbeatEnableInstructions.windowsTextPost',
'home.tutorials.common.metricbeatEnableInstructions.windowsTextPost',
{
defaultMessage: 'Modify the settings in the `modules.d/{moduleName}.yml` file.',
values: { moduleName },
@ -432,22 +436,22 @@ export function metricbeatEnableInstructions(moduleName) {
};
}
export function metricbeatStatusCheck(moduleName) {
export function metricbeatStatusCheck(moduleName: string) {
return {
title: i18n.translate('kbn.common.tutorials.metricbeatStatusCheck.title', {
title: i18n.translate('home.tutorials.common.metricbeatStatusCheck.title', {
defaultMessage: 'Module status',
}),
text: i18n.translate('kbn.common.tutorials.metricbeatStatusCheck.text', {
text: i18n.translate('home.tutorials.common.metricbeatStatusCheck.text', {
defaultMessage: 'Check that data is received from the Metricbeat `{moduleName}` module',
values: { moduleName },
}),
btnLabel: i18n.translate('kbn.common.tutorials.metricbeatStatusCheck.buttonLabel', {
btnLabel: i18n.translate('home.tutorials.common.metricbeatStatusCheck.buttonLabel', {
defaultMessage: 'Check data',
}),
success: i18n.translate('kbn.common.tutorials.metricbeatStatusCheck.successText', {
success: i18n.translate('home.tutorials.common.metricbeatStatusCheck.successText', {
defaultMessage: 'Data successfully received from this module',
}),
error: i18n.translate('kbn.common.tutorials.metricbeatStatusCheck.errorText', {
error: i18n.translate('home.tutorials.common.metricbeatStatusCheck.errorText', {
defaultMessage: 'No data has been received from this module yet',
}),
esHitsCheck: {
@ -465,14 +469,14 @@ export function metricbeatStatusCheck(moduleName) {
};
}
export function onPremInstructions(moduleName, platforms, context) {
export function onPremInstructions(moduleName: string, context?: TutorialContext) {
const METRICBEAT_INSTRUCTIONS = createMetricbeatInstructions(context);
return {
instructionSets: [
{
title: i18n.translate(
'kbn.common.tutorials.metricbeat.premInstructions.gettingStarted.title',
'home.tutorials.common.metricbeat.premInstructions.gettingStarted.title',
{
defaultMessage: 'Getting Started',
}
@ -521,7 +525,7 @@ export function onPremInstructions(moduleName, platforms, context) {
};
}
export function onPremCloudInstructions(moduleName) {
export function onPremCloudInstructions(moduleName: string) {
const TRYCLOUD_OPTION1 = createTrycloudOption1();
const TRYCLOUD_OPTION2 = createTrycloudOption2();
const METRICBEAT_INSTRUCTIONS = createMetricbeatInstructions();
@ -530,7 +534,7 @@ export function onPremCloudInstructions(moduleName) {
instructionSets: [
{
title: i18n.translate(
'kbn.common.tutorials.metricbeat.premCloudInstructions.gettingStarted.title',
'home.tutorials.common.metricbeat.premCloudInstructions.gettingStarted.title',
{
defaultMessage: 'Getting Started',
}
@ -587,7 +591,7 @@ export function onPremCloudInstructions(moduleName) {
};
}
export function cloudInstructions(moduleName) {
export function cloudInstructions(moduleName: string) {
const METRICBEAT_INSTRUCTIONS = createMetricbeatInstructions();
const METRICBEAT_CLOUD_INSTRUCTIONS = createMetricbeatCloudInstructions();
@ -595,7 +599,7 @@ export function cloudInstructions(moduleName) {
instructionSets: [
{
title: i18n.translate(
'kbn.common.tutorials.metricbeat.cloudInstructions.gettingStarted.title',
'home.tutorials.common.metricbeat.cloudInstructions.gettingStarted.title',
{
defaultMessage: 'Getting Started',
}

View file

@ -20,10 +20,10 @@
import { i18n } from '@kbn/i18n';
export const createTrycloudOption1 = () => ({
title: i18n.translate('kbn.common.tutorials.premCloudInstructions.option1.title', {
title: i18n.translate('home.tutorials.common.premCloudInstructions.option1.title', {
defaultMessage: 'Option 1: Try in Elastic Cloud',
}),
textPre: i18n.translate('kbn.common.tutorials.premCloudInstructions.option1.textPre', {
textPre: i18n.translate('home.tutorials.common.premCloudInstructions.option1.textPre', {
defaultMessage:
'Go to [Elastic Cloud]({link}). Register if you \
do not already have an account. Free 14-day trial available.\n\n\
@ -41,10 +41,10 @@ To create a cluster, in Elastic Cloud console:\n\
});
export const createTrycloudOption2 = () => ({
title: i18n.translate('kbn.common.tutorials.premCloudInstructions.option2.title', {
title: i18n.translate('home.tutorials.common.premCloudInstructions.option2.title', {
defaultMessage: 'Option 2: Connect local Kibana to a Cloud instance',
}),
textPre: i18n.translate('kbn.common.tutorials.premCloudInstructions.option2.textPre', {
textPre: i18n.translate('home.tutorials.common.premCloudInstructions.option2.textPre', {
defaultMessage:
'If you are running this Kibana instance against a hosted Elasticsearch instance, \
proceed with manual setup.\n\n\

View file

@ -20,16 +20,17 @@
import { i18n } from '@kbn/i18n';
import { INSTRUCTION_VARIANT } from './instruction_variant';
import { createTrycloudOption1, createTrycloudOption2 } from './onprem_cloud_instructions';
import { getSpaceIdForBeatsTutorial } from '../lib/get_space_id_for_beats_tutorial';
import { getSpaceIdForBeatsTutorial } from './get_space_id_for_beats_tutorial';
import { TutorialContext } from '../../services/tutorials/lib/tutorials_registry_types';
export const createWinlogbeatInstructions = context => ({
export const createWinlogbeatInstructions = (context?: TutorialContext) => ({
INSTALL: {
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.winlogbeatInstructions.install.windowsTitle', {
title: i18n.translate('home.tutorials.common.winlogbeatInstructions.install.windowsTitle', {
defaultMessage: 'Download and install Winlogbeat',
}),
textPre: i18n.translate(
'kbn.common.tutorials.winlogbeatInstructions.install.windowsTextPre',
'home.tutorials.common.winlogbeatInstructions.install.windowsTextPre',
{
defaultMessage:
'First time using Winlogbeat? See the [Getting Started Guide]({winlogbeatLink}).\n\
@ -49,7 +50,7 @@ export const createWinlogbeatInstructions = context => ({
),
commands: ['cd "C:\\Program Files\\Winlogbeat"', '.\\install-service-winlogbeat.ps1'],
textPost: i18n.translate(
'kbn.common.tutorials.winlogbeatInstructions.install.windowsTextPost',
'home.tutorials.common.winlogbeatInstructions.install.windowsTextPost',
{
defaultMessage:
'Modify the settings under `output.elasticsearch` in the {path} file to point to your Elasticsearch installation.',
@ -60,10 +61,10 @@ export const createWinlogbeatInstructions = context => ({
},
START: {
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.winlogbeatInstructions.start.windowsTitle', {
title: i18n.translate('home.tutorials.common.winlogbeatInstructions.start.windowsTitle', {
defaultMessage: 'Start Winlogbeat',
}),
textPre: i18n.translate('kbn.common.tutorials.winlogbeatInstructions.start.windowsTextPre', {
textPre: i18n.translate('home.tutorials.common.winlogbeatInstructions.start.windowsTextPre', {
defaultMessage:
'The `setup` command loads the Kibana dashboards. If the dashboards are already set up, omit this command.',
}),
@ -72,15 +73,18 @@ export const createWinlogbeatInstructions = context => ({
},
CONFIG: {
WINDOWS: {
title: i18n.translate('kbn.common.tutorials.winlogbeatInstructions.config.windowsTitle', {
title: i18n.translate('home.tutorials.common.winlogbeatInstructions.config.windowsTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('kbn.common.tutorials.winlogbeatInstructions.config.windowsTextPre', {
defaultMessage: 'Modify {path} to set the connection information:',
values: {
path: '`C:\\Program Files\\Winlogbeat\\winlogbeat.yml`',
},
}),
textPre: i18n.translate(
'home.tutorials.common.winlogbeatInstructions.config.windowsTextPre',
{
defaultMessage: 'Modify {path} to set the connection information:',
values: {
path: '`C:\\Program Files\\Winlogbeat\\winlogbeat.yml`',
},
}
),
commands: [
'output.elasticsearch:',
' hosts: ["<es_url>"]',
@ -91,7 +95,7 @@ export const createWinlogbeatInstructions = context => ({
getSpaceIdForBeatsTutorial(context),
],
textPost: i18n.translate(
'kbn.common.tutorials.winlogbeatInstructions.config.windowsTextPost',
'home.tutorials.common.winlogbeatInstructions.config.windowsTextPost',
{
defaultMessage:
'Where {passwordTemplate} is the password of the `elastic` user, {esUrlTemplate} is the URL of Elasticsearch, \
@ -111,13 +115,13 @@ export const createWinlogbeatCloudInstructions = () => ({
CONFIG: {
WINDOWS: {
title: i18n.translate(
'kbn.common.tutorials.winlogbeatCloudInstructions.config.windowsTitle',
'home.tutorials.common.winlogbeatCloudInstructions.config.windowsTitle',
{
defaultMessage: 'Edit the configuration',
}
),
textPre: i18n.translate(
'kbn.common.tutorials.winlogbeatCloudInstructions.config.windowsTextPre',
'home.tutorials.common.winlogbeatCloudInstructions.config.windowsTextPre',
{
defaultMessage: 'Modify {path} to set the connection information for Elastic Cloud:',
values: {
@ -127,7 +131,7 @@ export const createWinlogbeatCloudInstructions = () => ({
),
commands: ['cloud.id: "{config.cloud.id}"', 'cloud.auth: "elastic:<password>"'],
textPost: i18n.translate(
'kbn.common.tutorials.winlogbeatCloudInstructions.config.windowsTextPost',
'home.tutorials.common.winlogbeatCloudInstructions.config.windowsTextPost',
{
defaultMessage: 'Where {passwordTemplate} is the password of the `elastic` user.',
values: { passwordTemplate: '`<password>`' },
@ -139,19 +143,19 @@ export const createWinlogbeatCloudInstructions = () => ({
export function winlogbeatStatusCheck() {
return {
title: i18n.translate('kbn.common.tutorials.winlogbeatStatusCheck.title', {
title: i18n.translate('home.tutorials.common.winlogbeatStatusCheck.title', {
defaultMessage: 'Module status',
}),
text: i18n.translate('kbn.common.tutorials.winlogbeatStatusCheck.text', {
text: i18n.translate('home.tutorials.common.winlogbeatStatusCheck.text', {
defaultMessage: 'Check that data is received from Winlogbeat',
}),
btnLabel: i18n.translate('kbn.common.tutorials.winlogbeatStatusCheck.buttonLabel', {
btnLabel: i18n.translate('home.tutorials.common.winlogbeatStatusCheck.buttonLabel', {
defaultMessage: 'Check data',
}),
success: i18n.translate('kbn.common.tutorials.winlogbeatStatusCheck.successText', {
success: i18n.translate('home.tutorials.common.winlogbeatStatusCheck.successText', {
defaultMessage: 'Data successfully received',
}),
error: i18n.translate('kbn.common.tutorials.winlogbeatStatusCheck.errorText', {
error: i18n.translate('home.tutorials.common.winlogbeatStatusCheck.errorText', {
defaultMessage: 'No data has been received yet',
}),
esHitsCheck: {
@ -169,14 +173,14 @@ export function winlogbeatStatusCheck() {
};
}
export function onPremInstructions(platforms, context) {
export function onPremInstructions(context?: TutorialContext) {
const WINLOGBEAT_INSTRUCTIONS = createWinlogbeatInstructions(context);
return {
instructionSets: [
{
title: i18n.translate(
'kbn.common.tutorials.winlogbeat.premInstructions.gettingStarted.title',
'home.tutorials.common.winlogbeat.premInstructions.gettingStarted.title',
{
defaultMessage: 'Getting Started',
}
@ -206,7 +210,7 @@ export function onPremCloudInstructions() {
instructionSets: [
{
title: i18n.translate(
'kbn.common.tutorials.winlogbeat.premCloudInstructions.gettingStarted.title',
'home.tutorials.common.winlogbeat.premCloudInstructions.gettingStarted.title',
{
defaultMessage: 'Getting Started',
}
@ -237,7 +241,7 @@ export function cloudInstructions() {
instructionSets: [
{
title: i18n.translate(
'kbn.common.tutorials.winlogbeat.cloudInstructions.gettingStarted.title',
'home.tutorials.common.winlogbeat.cloudInstructions.gettingStarted.title',
{
defaultMessage: 'Getting Started',
}

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function iptablesLogsSpecProvider(context) {
export function iptablesLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'iptables';
const platforms = ['DEB', 'RPM'];
const platforms = ['DEB', 'RPM'] as const;
return {
id: 'iptablesLogs',
name: i18n.translate('kbn.server.tutorials.iptablesLogs.nameTitle', {
name: i18n.translate('home.tutorials.iptablesLogs.nameTitle', {
defaultMessage: 'Iptables / Ubiquiti',
}),
category: TUTORIAL_CATEGORY.SIEM,
shortDescription: i18n.translate('kbn.server.tutorials.iptablesLogs.shortDescription', {
category: TutorialsCategory.SIEM,
shortDescription: i18n.translate('home.tutorials.iptablesLogs.shortDescription', {
defaultMessage: 'Collect and parse iptables and ip6tables logs or from Ubiqiti firewalls.',
}),
longDescription: i18n.translate('kbn.server.tutorials.iptablesLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.iptablesLogs.longDescription', {
defaultMessage:
'This is a module for iptables and ip6tables logs. It parses logs \
received over the network via syslog or from a file. Also, it understands the \
@ -48,12 +52,12 @@ number and the action performed on the traffic (allow/deny).. \
learnMoreLink: '{config.docs.beats.filebeat}/filebeat-module-iptables.html',
},
}),
//euiIconType: 'logoUbiquiti',
// euiIconType: 'logoUbiquiti',
artifacts: {
dashboards: [],
application: {
path: '/app/siem',
label: i18n.translate('kbn.server.tutorials.iptablesLogs.artifacts.dashboards.linkLabel', {
label: i18n.translate('home.tutorials.iptablesLogs.artifacts.dashboards.linkLabel', {
defaultMessage: 'SIEM App',
}),
},

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function kafkaLogsSpecProvider(context) {
export function kafkaLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'kafka';
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'];
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const;
return {
id: 'kafkaLogs',
name: i18n.translate('kbn.server.tutorials.kafkaLogs.nameTitle', {
name: i18n.translate('home.tutorials.kafkaLogs.nameTitle', {
defaultMessage: 'Kafka logs',
}),
category: TUTORIAL_CATEGORY.LOGGING,
shortDescription: i18n.translate('kbn.server.tutorials.kafkaLogs.shortDescription', {
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.tutorials.kafkaLogs.shortDescription', {
defaultMessage: 'Collect and parse logs created by Kafka.',
}),
longDescription: i18n.translate('kbn.server.tutorials.kafkaLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.kafkaLogs.longDescription', {
defaultMessage:
'The `kafka` Filebeat module parses logs created by Kafka. \
[Learn more]({learnMoreLink}).',
@ -50,12 +54,9 @@ export function kafkaLogsSpecProvider(context) {
dashboards: [
{
id: '943caca0-87ee-11e7-ad9c-db80de0bf8d3-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.kafkaLogs.artifacts.dashboards.linkLabel',
{
defaultMessage: 'Kafka logs dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.kafkaLogs.artifacts.dashboards.linkLabel', {
defaultMessage: 'Kafka logs dashboard',
}),
isOverview: true,
},
],

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function kafkaMetricsSpecProvider(context) {
export function kafkaMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'kafka';
return {
id: 'kafkaMetrics',
name: i18n.translate('kbn.server.tutorials.kafkaMetrics.nameTitle', {
name: i18n.translate('home.tutorials.kafkaMetrics.nameTitle', {
defaultMessage: 'Kafka metrics',
}),
isBeta: false,
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.kafkaMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.kafkaMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from the Kafka server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.kafkaMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.kafkaMetrics.longDescription', {
defaultMessage:
'The `kafka` Metricbeat module fetches internal metrics from Kafka. \
[Learn more]({learnMoreLink}).',
@ -48,7 +52,7 @@ export function kafkaMetricsSpecProvider(context) {
euiIconType: 'logoKafka',
artifacts: {
application: {
label: i18n.translate('kbn.server.tutorials.kafkaMetrics.artifacts.application.label', {
label: i18n.translate('home.tutorials.kafkaMetrics.artifacts.application.label', {
defaultMessage: 'Discover',
}),
path: '/app/kibana#/discover',
@ -59,7 +63,7 @@ export function kafkaMetricsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function kibanaMetricsSpecProvider(context) {
export function kibanaMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'kibana';
return {
id: 'kibanaMetrics',
name: i18n.translate('kbn.server.tutorials.kibanaMetrics.nameTitle', {
name: i18n.translate('home.tutorials.kibanaMetrics.nameTitle', {
defaultMessage: 'Kibana metrics',
}),
isBeta: false,
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.kibanaMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.kibanaMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from Kibana.',
}),
longDescription: i18n.translate('kbn.server.tutorials.kibanaMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.kibanaMetrics.longDescription', {
defaultMessage:
'The `kibana` Metricbeat module fetches internal metrics from Kibana. \
[Learn more]({learnMoreLink}).',
@ -48,7 +52,7 @@ export function kibanaMetricsSpecProvider(context) {
euiIconType: 'logoKibana',
artifacts: {
application: {
label: i18n.translate('kbn.server.tutorials.kibanaMetrics.artifacts.application.label', {
label: i18n.translate('home.tutorials.kibanaMetrics.artifacts.application.label', {
defaultMessage: 'Discover',
}),
path: '/app/kibana#/discover',
@ -59,7 +63,7 @@ export function kibanaMetricsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function kubernetesMetricsSpecProvider(context) {
export function kubernetesMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'kubernetes';
return {
id: 'kubernetesMetrics',
name: i18n.translate('kbn.server.tutorials.kubernetesMetrics.nameTitle', {
name: i18n.translate('home.tutorials.kubernetesMetrics.nameTitle', {
defaultMessage: 'Kubernetes metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.kubernetesMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.kubernetesMetrics.shortDescription', {
defaultMessage: 'Fetch metrics from your Kubernetes installation.',
}),
longDescription: i18n.translate('kbn.server.tutorials.kubernetesMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.kubernetesMetrics.longDescription', {
defaultMessage:
'The `kubernetes` Metricbeat module fetches metrics from the Kubernetes APIs. \
[Learn more]({learnMoreLink}).',
@ -50,7 +54,7 @@ export function kubernetesMetricsSpecProvider(context) {
{
id: 'AV4RGUqo5NkDleZmzKuZ-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.kubernetesMetrics.artifacts.dashboards.linkLabel',
'home.tutorials.kubernetesMetrics.artifacts.dashboards.linkLabel',
{
defaultMessage: 'Kubernetes metrics dashboard',
}
@ -64,7 +68,7 @@ export function kubernetesMetricsSpecProvider(context) {
},
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/kubernetes_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function logstashLogsSpecProvider(context) {
export function logstashLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'logstash';
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'];
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const;
return {
id: 'logstashLogs',
name: i18n.translate('kbn.server.tutorials.logstashLogs.nameTitle', {
name: i18n.translate('home.tutorials.logstashLogs.nameTitle', {
defaultMessage: 'Logstash logs',
}),
category: TUTORIAL_CATEGORY.LOGGING,
shortDescription: i18n.translate('kbn.server.tutorials.logstashLogs.shortDescription', {
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.tutorials.logstashLogs.shortDescription', {
defaultMessage: 'Collect and parse debug and slow logs created by Logstash itself.',
}),
longDescription: i18n.translate('kbn.server.tutorials.logstashLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.logstashLogs.longDescription', {
defaultMessage:
'The `logstash` Filebeat module parses debug and slow logs created by Logstash itself. \
[Learn more]({learnMoreLink}).',
@ -50,12 +54,9 @@ export function logstashLogsSpecProvider(context) {
dashboards: [
{
id: 'Filebeat-Logstash-Log-Dashboard-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.logstashLogs.artifacts.dashboards.linkLabel',
{
defaultMessage: 'Logstash logs dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.logstashLogs.artifacts.dashboards.linkLabel', {
defaultMessage: 'Logstash logs dashboard',
}),
isOverview: true,
},
],

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function logstashMetricsSpecProvider(context) {
export function logstashMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'logstash';
return {
id: moduleName + 'Metrics',
name: i18n.translate('kbn.server.tutorials.logstashMetrics.nameTitle', {
name: i18n.translate('home.tutorials.logstashMetrics.nameTitle', {
defaultMessage: 'Logstash metrics',
}),
isBeta: false,
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.logstashMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.logstashMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from a Logstash server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.logstashMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.logstashMetrics.longDescription', {
defaultMessage:
'The `{moduleName}` Metricbeat module fetches internal metrics from a Logstash server. \
[Learn more]({learnMoreLink}).',
@ -49,7 +53,7 @@ export function logstashMetricsSpecProvider(context) {
euiIconType: 'logoLogstash',
artifacts: {
application: {
label: i18n.translate('kbn.server.tutorials.logstashMetrics.artifacts.application.label', {
label: i18n.translate('home.tutorials.logstashMetrics.artifacts.application.label', {
defaultMessage: 'Discover',
}),
path: '/app/kibana#/discover',
@ -60,7 +64,7 @@ export function logstashMetricsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function memcachedMetricsSpecProvider(context) {
export function memcachedMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'memcached';
return {
id: 'memcachedMetrics',
name: i18n.translate('kbn.server.tutorials.memcachedMetrics.nameTitle', {
name: i18n.translate('home.tutorials.memcachedMetrics.nameTitle', {
defaultMessage: 'Memcached metrics',
}),
isBeta: false,
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.memcachedMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.memcachedMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from the Memcached server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.memcachedMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.memcachedMetrics.longDescription', {
defaultMessage:
'The `memcached` Metricbeat module fetches internal metrics from Memcached. \
[Learn more]({learnMoreLink}).',
@ -48,7 +52,7 @@ export function memcachedMetricsSpecProvider(context) {
euiIconType: 'logoMemcached',
artifacts: {
application: {
label: i18n.translate('kbn.server.tutorials.memcachedMetrics.artifacts.application.label', {
label: i18n.translate('home.tutorials.memcachedMetrics.artifacts.application.label', {
defaultMessage: 'Discover',
}),
path: '/app/kibana#/discover',
@ -59,7 +63,7 @@ export function memcachedMetricsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function mongodbMetricsSpecProvider(context) {
export function mongodbMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'mongodb';
return {
id: 'mongodbMetrics',
name: i18n.translate('kbn.server.tutorials.mongodbMetrics.nameTitle', {
name: i18n.translate('home.tutorials.mongodbMetrics.nameTitle', {
defaultMessage: 'MongoDB metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.mongodbMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.mongodbMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from MongoDB.',
}),
longDescription: i18n.translate('kbn.server.tutorials.mongodbMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.mongodbMetrics.longDescription', {
defaultMessage:
'The `mongodb` Metricbeat module fetches internal metrics from the MongoDB server. \
[Learn more]({learnMoreLink}).',
@ -50,7 +54,7 @@ export function mongodbMetricsSpecProvider(context) {
{
id: 'Metricbeat-MongoDB-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.mongodbMetrics.artifacts.dashboards.linkLabel',
'home.tutorials.mongodbMetrics.artifacts.dashboards.linkLabel',
{
defaultMessage: 'MongoDB metrics dashboard',
}
@ -64,7 +68,7 @@ export function mongodbMetricsSpecProvider(context) {
},
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/mongodb_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function mssqlMetricsSpecProvider(context) {
export function mssqlMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'mssql';
return {
id: 'mssqlMetrics',
name: i18n.translate('kbn.server.tutorials.mssqlMetrics.nameTitle', {
name: i18n.translate('home.tutorials.mssqlMetrics.nameTitle', {
defaultMessage: 'Microsoft SQL Server Metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.mssqlMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.mssqlMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from a Microsoft SQL Server instance',
}),
longDescription: i18n.translate('kbn.server.tutorials.mssqlMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.mssqlMetrics.longDescription', {
defaultMessage:
'The `mssql` Metricbeat module fetches monitoring, log and performance metrics from a Microsoft SQL Server instance. \
[Learn more]({learnMoreLink}).',
@ -50,12 +54,9 @@ export function mssqlMetricsSpecProvider(context) {
dashboards: [
{
id: 'a2ead240-18bb-11e9-9836-f37dedd3b411-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.mssqlMetrics.artifacts.dashboards.linkLabel',
{
defaultMessage: 'Microsoft SQL Server metrics dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.mssqlMetrics.artifacts.dashboards.linkLabel', {
defaultMessage: 'Microsoft SQL Server metrics dashboard',
}),
isOverview: true,
},
],
@ -65,7 +66,7 @@ export function mssqlMetricsSpecProvider(context) {
},
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/mssql_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function muninMetricsSpecProvider(context) {
export function muninMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'munin';
return {
id: 'muninMetrics',
name: i18n.translate('kbn.server.tutorials.muninMetrics.nameTitle', {
name: i18n.translate('home.tutorials.muninMetrics.nameTitle', {
defaultMessage: 'Munin metrics',
}),
isBeta: true,
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.muninMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.muninMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from the Munin server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.muninMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.muninMetrics.longDescription', {
defaultMessage:
'The `munin` Metricbeat module fetches internal metrics from Munin. \
[Learn more]({learnMoreLink}).',
@ -47,7 +51,7 @@ export function muninMetricsSpecProvider(context) {
}),
artifacts: {
application: {
label: i18n.translate('kbn.server.tutorials.muninMetrics.artifacts.application.label', {
label: i18n.translate('home.tutorials.muninMetrics.artifacts.application.label', {
defaultMessage: 'Discover',
}),
path: '/app/kibana#/discover',
@ -58,7 +62,7 @@ export function muninMetricsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function mysqlLogsSpecProvider(context) {
export function mysqlLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'mysql';
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'];
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const;
return {
id: 'mysqlLogs',
name: i18n.translate('kbn.server.tutorials.mysqlLogs.nameTitle', {
name: i18n.translate('home.tutorials.mysqlLogs.nameTitle', {
defaultMessage: 'MySQL logs',
}),
category: TUTORIAL_CATEGORY.LOGGING,
shortDescription: i18n.translate('kbn.server.tutorials.mysqlLogs.shortDescription', {
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.tutorials.mysqlLogs.shortDescription', {
defaultMessage: 'Collect and parse error and slow logs created by MySQL.',
}),
longDescription: i18n.translate('kbn.server.tutorials.mysqlLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.mysqlLogs.longDescription', {
defaultMessage:
'The `mysql` Filebeat module parses error and slow logs created by MySQL. \
[Learn more]({learnMoreLink}).',
@ -50,12 +54,9 @@ export function mysqlLogsSpecProvider(context) {
dashboards: [
{
id: 'Filebeat-MySQL-Dashboard-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.mysqlLogs.artifacts.dashboards.linkLabel',
{
defaultMessage: 'MySQL logs dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.mysqlLogs.artifacts.dashboards.linkLabel', {
defaultMessage: 'MySQL logs dashboard',
}),
isOverview: true,
},
],

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function mysqlMetricsSpecProvider(context) {
export function mysqlMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'mysql';
return {
id: 'mysqlMetrics',
name: i18n.translate('kbn.server.tutorials.mysqlMetrics.nameTitle', {
name: i18n.translate('home.tutorials.mysqlMetrics.nameTitle', {
defaultMessage: 'MySQL metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.mysqlMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.mysqlMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from MySQL.',
}),
longDescription: i18n.translate('kbn.server.tutorials.mysqlMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.mysqlMetrics.longDescription', {
defaultMessage:
'The `mysql` Metricbeat module fetches internal metrics from the MySQL server. \
[Learn more]({learnMoreLink}).',
@ -49,12 +53,9 @@ export function mysqlMetricsSpecProvider(context) {
dashboards: [
{
id: '66881e90-0006-11e7-bf7f-c9acc3d3e306-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.mysqlMetrics.artifacts.dashboards.linkLabel',
{
defaultMessage: 'MySQL metrics dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.mysqlMetrics.artifacts.dashboards.linkLabel', {
defaultMessage: 'MySQL metrics dashboard',
}),
isOverview: true,
},
],
@ -64,7 +65,7 @@ export function mysqlMetricsSpecProvider(context) {
},
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/mysql_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,29 +18,31 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function natsLogsSpecProvider(context) {
export function natsLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'nats';
const geoipRequired = false;
const uaRequired = false;
const platforms = ['DEB', 'RPM'];
const platforms = ['DEB', 'RPM'] as const;
return {
id: 'natsLogs',
name: i18n.translate('kbn.server.tutorials.natsLogs.nameTitle', {
name: i18n.translate('home.tutorials.natsLogs.nameTitle', {
defaultMessage: 'NATS logs',
}),
category: TUTORIAL_CATEGORY.LOGGING,
category: TutorialsCategory.LOGGING,
isBeta: true,
shortDescription: i18n.translate('kbn.server.tutorials.natsLogs.shortDescription', {
shortDescription: i18n.translate('home.tutorials.natsLogs.shortDescription', {
defaultMessage: 'Collect and parse logs created by Nats.',
}),
longDescription: i18n.translate('kbn.server.tutorials.natsLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.natsLogs.longDescription', {
defaultMessage:
'The `nats` Filebeat module parses logs created by Nats. \
[Learn more]({learnMoreLink}).',
@ -53,12 +55,9 @@ export function natsLogsSpecProvider(context) {
dashboards: [
{
id: 'Filebeat-nats-overview-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.natsLogs.artifacts.dashboards.linkLabel',
{
defaultMessage: 'NATS logs dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.natsLogs.artifacts.dashboards.linkLabel', {
defaultMessage: 'NATS logs dashboard',
}),
isOverview: true,
},
],
@ -68,7 +67,7 @@ export function natsLogsSpecProvider(context) {
},
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/nats_logs/screenshot.png',
onPrem: onPremInstructions(moduleName, platforms, geoipRequired, uaRequired, context),
onPrem: onPremInstructions(moduleName, platforms, context),
elasticCloud: cloudInstructions(moduleName, platforms),
onPremElasticCloud: onPremCloudInstructions(moduleName, platforms),
};

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function natsMetricsSpecProvider(context) {
export function natsMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'nats';
return {
id: 'natsMetrics',
name: i18n.translate('kbn.server.tutorials.natsMetrics.nameTitle', {
name: i18n.translate('home.tutorials.natsMetrics.nameTitle', {
defaultMessage: 'NATS metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.natsMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.natsMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from the Nats server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.natsMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.natsMetrics.longDescription', {
defaultMessage:
'The `nats` Metricbeat module fetches monitoring metrics from Nats. \
[Learn more]({learnMoreLink}).',
@ -49,12 +53,9 @@ export function natsMetricsSpecProvider(context) {
dashboards: [
{
id: 'Metricbeat-Nats-Dashboard-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.natsMetrics.artifacts.dashboards.linkLabel',
{
defaultMessage: 'NATS metrics dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.natsMetrics.artifacts.dashboards.linkLabel', {
defaultMessage: 'NATS metrics dashboard',
}),
isOverview: true,
},
],
@ -64,7 +65,7 @@ export function natsMetricsSpecProvider(context) {
},
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/nats_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -25,51 +25,39 @@ export function createCommonNetflowInstructions() {
ON_PREM: {
OSX: [
{
title: i18n.translate('kbn.server.tutorials.netflow.common.config.onPrem.osxTitle', {
title: i18n.translate('home.tutorials.netflow.common.config.onPrem.osxTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate(
'kbn.server.tutorials.netflow.common.config.onPrem.osxTextPre',
{
defaultMessage: 'Modify {logstashConfigPath} to set the configuration parameters:',
values: {
logstashConfigPath: '`config/logstash.yml`',
},
}
),
textPre: i18n.translate('home.tutorials.netflow.common.config.onPrem.osxTextPre', {
defaultMessage: 'Modify {logstashConfigPath} to set the configuration parameters:',
values: {
logstashConfigPath: '`config/logstash.yml`',
},
}),
commands: ['modules:', ' - name: netflow', ' var.input.udp.port: <udp_port>'],
textPost: i18n.translate(
'kbn.server.tutorials.netflow.common.config.onPrem.osxTextPost',
{
defaultMessage:
'Where {udpPort} is the UDP port on which Logstash will receive Netflow data.',
values: {
udpPort: '`<udp_port>`',
},
}
),
textPost: i18n.translate('home.tutorials.netflow.common.config.onPrem.osxTextPost', {
defaultMessage:
'Where {udpPort} is the UDP port on which Logstash will receive Netflow data.',
values: {
udpPort: '`<udp_port>`',
},
}),
},
],
WINDOWS: [
{
title: i18n.translate(
'kbn.server.tutorials.netflow.common.config.onPrem.windowsTitle',
{
defaultMessage: 'Edit the configuration',
}
),
textPre: i18n.translate(
'kbn.server.tutorials.netflow.common.config.onPrem.windowsTextPre',
{
defaultMessage: 'Modify {logstashConfigPath} to set the configuration parameters:',
values: {
logstashConfigPath: '`config\\logstash.yml`',
},
}
),
title: i18n.translate('home.tutorials.netflow.common.config.onPrem.windowsTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate('home.tutorials.netflow.common.config.onPrem.windowsTextPre', {
defaultMessage: 'Modify {logstashConfigPath} to set the configuration parameters:',
values: {
logstashConfigPath: '`config\\logstash.yml`',
},
}),
commands: ['modules:', ' - name: netflow', ' var.input.udp.port: <udp_port>'],
textPost: i18n.translate(
'kbn.server.tutorials.netflow.common.config.onPrem.windowsTextPost',
'home.tutorials.netflow.common.config.onPrem.windowsTextPost',
{
defaultMessage:
'Where {udpPort} is the UDP port on which Logstash will receive Netflow data.',
@ -85,13 +73,13 @@ export function createCommonNetflowInstructions() {
OSX: [
{
title: i18n.translate(
'kbn.server.tutorials.netflow.common.config.onPremElasticCloud.osxTitle',
'home.tutorials.netflow.common.config.onPremElasticCloud.osxTitle',
{
defaultMessage: 'Edit the configuration',
}
),
textPre: i18n.translate(
'kbn.server.tutorials.netflow.common.config.onPremElasticCloud.osxTextPre',
'home.tutorials.netflow.common.config.onPremElasticCloud.osxTextPre',
{
defaultMessage: 'Modify {logstashConfigPath} to set the configuration parameters:',
values: {
@ -108,7 +96,7 @@ export function createCommonNetflowInstructions() {
' var.elasticsearch.password: <password>',
],
textPost: i18n.translate(
'kbn.server.tutorials.netflow.common.config.onPremElasticCloud.osxTextPost',
'home.tutorials.netflow.common.config.onPremElasticCloud.osxTextPost',
{
defaultMessage:
'Where {udpPort} is the UDP port on which Logstash will receive Netflow data, \
@ -127,13 +115,13 @@ export function createCommonNetflowInstructions() {
WINDOWS: [
{
title: i18n.translate(
'kbn.server.tutorials.netflow.common.config.onPremElasticCloud.windowsTitle',
'home.tutorials.netflow.common.config.onPremElasticCloud.windowsTitle',
{
defaultMessage: 'Edit the configuration',
}
),
textPre: i18n.translate(
'kbn.server.tutorials.netflow.common.config.onPremElasticCloud.windowsTextPre',
'home.tutorials.netflow.common.config.onPremElasticCloud.windowsTextPre',
{
defaultMessage: 'Modify {logstashConfigPath} to set the configuration parameters:',
values: {
@ -150,7 +138,7 @@ export function createCommonNetflowInstructions() {
' var.elasticsearch.password: <password>',
],
textPost: i18n.translate(
'kbn.server.tutorials.netflow.common.config.onPremElasticCloud.windowsTextPost',
'home.tutorials.netflow.common.config.onPremElasticCloud.windowsTextPost',
{
defaultMessage:
'Where {udpPort} is the UDP port on which Logstash will receive Netflow data, \
@ -170,14 +158,11 @@ export function createCommonNetflowInstructions() {
ELASTIC_CLOUD: {
OSX: [
{
title: i18n.translate(
'kbn.server.tutorials.netflow.common.config.elasticCloud.osxTitle',
{
defaultMessage: 'Edit the configuration',
}
),
title: i18n.translate('home.tutorials.netflow.common.config.elasticCloud.osxTitle', {
defaultMessage: 'Edit the configuration',
}),
textPre: i18n.translate(
'kbn.server.tutorials.netflow.common.config.elasticCloud.osxTextPre',
'home.tutorials.netflow.common.config.elasticCloud.osxTextPre',
{
defaultMessage: 'Modify {logstashConfigPath} to set the configuration parameters:',
values: {
@ -194,7 +179,7 @@ export function createCommonNetflowInstructions() {
' var.input.udp.port: <udp_port>',
],
textPost: i18n.translate(
'kbn.server.tutorials.netflow.common.config.elasticCloud.osxTextPost',
'home.tutorials.netflow.common.config.elasticCloud.osxTextPost',
{
defaultMessage:
'Where {udpPort} is the UDP port on which Logstash will receive Netflow data and \
@ -211,13 +196,13 @@ export function createCommonNetflowInstructions() {
WINDOWS: [
{
title: i18n.translate(
'kbn.server.tutorials.netflow.common.config.elasticCloud.windowsTitle',
'home.tutorials.netflow.common.config.elasticCloud.windowsTitle',
{
defaultMessage: 'Edit the configuration',
}
),
textPre: i18n.translate(
'kbn.server.tutorials.netflow.common.config.elasticCloud.windowsTextPre',
'home.tutorials.netflow.common.config.elasticCloud.windowsTextPre',
{
defaultMessage: 'Modify {logstashConfigPath} to set the configuration parameters:',
values: {
@ -234,7 +219,7 @@ export function createCommonNetflowInstructions() {
' var.input.udp.port: <udp_port>',
],
textPost: i18n.translate(
'kbn.server.tutorials.netflow.common.config.elasticCloud.windowsTextPost',
'home.tutorials.netflow.common.config.elasticCloud.windowsTextPost',
{
defaultMessage:
'Where {udpPort} is the UDP port on which Logstash will receive Netflow data and \
@ -253,14 +238,14 @@ export function createCommonNetflowInstructions() {
SETUP: {
OSX: [
{
title: i18n.translate('kbn.server.tutorials.netflow.common.setup.osxTitle', {
title: i18n.translate('home.tutorials.netflow.common.setup.osxTitle', {
defaultMessage: 'Run the Netflow module',
}),
textPre: i18n.translate('kbn.server.tutorials.netflow.common.setup.osxTextPre', {
textPre: i18n.translate('home.tutorials.netflow.common.setup.osxTextPre', {
defaultMessage: 'Run:',
}),
commands: ['./bin/logstash --modules netflow --setup'],
textPost: i18n.translate('kbn.server.tutorials.netflow.common.setup.osxTextPost', {
textPost: i18n.translate('home.tutorials.netflow.common.setup.osxTextPost', {
defaultMessage:
'The {setupOption} option creates a {netflowPrefix} index pattern in Elasticsearch and imports \
Kibana dashboards and visualizations. Omit this option for subsequent runs to avoid overwriting existing dashboards.',
@ -273,14 +258,14 @@ export function createCommonNetflowInstructions() {
],
WINDOWS: [
{
title: i18n.translate('kbn.server.tutorials.netflow.common.setup.windowsTitle', {
title: i18n.translate('home.tutorials.netflow.common.setup.windowsTitle', {
defaultMessage: 'Run the Netflow module',
}),
textPre: i18n.translate('kbn.server.tutorials.netflow.common.setup.windowsTextPre', {
textPre: i18n.translate('home.tutorials.netflow.common.setup.windowsTextPre', {
defaultMessage: 'Run:',
}),
commands: ['bin\\logstash --modules netflow --setup'],
textPost: i18n.translate('kbn.server.tutorials.netflow.common.setup.windowsTextPost', {
textPost: i18n.translate('home.tutorials.netflow.common.setup.windowsTextPost', {
defaultMessage:
'The {setupOption} option creates a {netflowPrefix} index pattern in Elasticsearch and imports \
Kibana dashboards and visualizations. Omit this option for subsequent runs to avoid overwriting existing dashboards.',

View file

@ -19,8 +19,8 @@
import { i18n } from '@kbn/i18n';
import { INSTRUCTION_VARIANT } from '../../../common/tutorials/instruction_variant';
import { createLogstashInstructions } from '../../../common/tutorials/logstash_instructions';
import { INSTRUCTION_VARIANT } from '../instructions/instruction_variant';
import { createLogstashInstructions } from '../instructions/logstash_instructions';
import { createCommonNetflowInstructions } from './common_instructions';
// TODO: compare with onPremElasticCloud and onPrem scenarios and extract out common bits
@ -31,7 +31,7 @@ export function createElasticCloudInstructions() {
return {
instructionSets: [
{
title: i18n.translate('kbn.server.tutorials.netflow.elasticCloudInstructions.title', {
title: i18n.translate('home.tutorials.netflow.elasticCloudInstructions.title', {
defaultMessage: 'Getting Started',
}),
instructionVariants: [

View file

@ -19,7 +19,7 @@
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import { createOnPremInstructions } from './on_prem';
import { createElasticCloudInstructions } from './elastic_cloud';
import { createOnPremElasticCloudInstructions } from './on_prem_elastic_cloud';
@ -28,11 +28,11 @@ export function netflowSpecProvider() {
return {
id: 'netflow',
name: 'Netflow',
category: TUTORIAL_CATEGORY.SIEM,
shortDescription: i18n.translate('kbn.server.tutorials.netflow.tutorialShortDescription', {
category: TutorialsCategory.SIEM,
shortDescription: i18n.translate('home.tutorials.netflow.tutorialShortDescription', {
defaultMessage: 'Collect Netflow records sent by a Netflow exporter.',
}),
longDescription: i18n.translate('kbn.server.tutorials.netflow.tutorialLongDescription', {
longDescription: i18n.translate('home.tutorials.netflow.tutorialLongDescription', {
defaultMessage:
'The Logstash Netflow module collects and parses network flow data, \
indexes the events into Elasticsearch, and installs a suite of Kibana dashboards. \
@ -42,7 +42,7 @@ This module support Netflow Version 5 and 9. [Learn more]({linkUrl}).',
},
}),
completionTimeMinutes: 10,
//previewImagePath: 'kibana-apache.png', TODO
// previewImagePath: 'kibana-apache.png', TODO
onPrem: createOnPremInstructions(),
elasticCloud: createElasticCloudInstructions(),
onPremElasticCloud: createOnPremElasticCloudInstructions(),

View file

@ -19,8 +19,8 @@
import { i18n } from '@kbn/i18n';
import { INSTRUCTION_VARIANT } from '../../../common/tutorials/instruction_variant';
import { createLogstashInstructions } from '../../../common/tutorials/logstash_instructions';
import { INSTRUCTION_VARIANT } from '../instructions/instruction_variant';
import { createLogstashInstructions } from '../instructions/logstash_instructions';
import { createCommonNetflowInstructions } from './common_instructions';
// TODO: compare with onPremElasticCloud and elasticCloud scenarios and extract out common bits
@ -31,7 +31,7 @@ export function createOnPremInstructions() {
return {
instructionSets: [
{
title: i18n.translate('kbn.server.tutorials.netflow.onPremInstructions.title', {
title: i18n.translate('home.tutorials.netflow.onPremInstructions.title', {
defaultMessage: 'Getting Started',
}),
instructionVariants: [

View file

@ -19,12 +19,12 @@
import { i18n } from '@kbn/i18n';
import { INSTRUCTION_VARIANT } from '../../../common/tutorials/instruction_variant';
import { createLogstashInstructions } from '../../../common/tutorials/logstash_instructions';
import { INSTRUCTION_VARIANT } from '../instructions/instruction_variant';
import { createLogstashInstructions } from '../instructions/logstash_instructions';
import {
createTrycloudOption1,
createTrycloudOption2,
} from '../../../common/tutorials/onprem_cloud_instructions';
} from '../instructions/onprem_cloud_instructions';
import { createCommonNetflowInstructions } from './common_instructions';
// TODO: compare with onPrem and elasticCloud scenarios and extract out common bits
@ -37,7 +37,7 @@ export function createOnPremElasticCloudInstructions() {
return {
instructionSets: [
{
title: i18n.translate('kbn.server.tutorials.netflow.onPremElasticCloudInstructions.title', {
title: i18n.translate('home.tutorials.netflow.onPremElasticCloudInstructions.title', {
defaultMessage: 'Getting Started',
}),
instructionVariants: [

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function nginxLogsSpecProvider(context) {
export function nginxLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'nginx';
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'];
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const;
return {
id: 'nginxLogs',
name: i18n.translate('kbn.server.tutorials.nginxLogs.nameTitle', {
name: i18n.translate('home.tutorials.nginxLogs.nameTitle', {
defaultMessage: 'Nginx logs',
}),
category: TUTORIAL_CATEGORY.LOGGING,
shortDescription: i18n.translate('kbn.server.tutorials.nginxLogs.shortDescription', {
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.tutorials.nginxLogs.shortDescription', {
defaultMessage: 'Collect and parse access and error logs created by the Nginx HTTP server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.nginxLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.nginxLogs.longDescription', {
defaultMessage:
'The `nginx` Filebeat module parses access and error logs created by the Nginx HTTP server. \
[Learn more]({learnMoreLink}).',
@ -50,12 +54,9 @@ export function nginxLogsSpecProvider(context) {
dashboards: [
{
id: '55a9e6e0-a29e-11e7-928f-5dbe6f6f5519-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.nginxLogs.artifacts.dashboards.linkLabel',
{
defaultMessage: 'Nginx logs dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.nginxLogs.artifacts.dashboards.linkLabel', {
defaultMessage: 'Nginx logs dashboard',
}),
isOverview: true,
},
],

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function nginxMetricsSpecProvider(context) {
export function nginxMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'nginx';
return {
id: 'nginxMetrics',
name: i18n.translate('kbn.server.tutorials.nginxMetrics.nameTitle', {
name: i18n.translate('home.tutorials.nginxMetrics.nameTitle', {
defaultMessage: 'Nginx metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.nginxMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.nginxMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from the Nginx HTTP server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.nginxMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.nginxMetrics.longDescription', {
defaultMessage:
'The `nginx` Metricbeat module fetches internal metrics from the Nginx HTTP server. \
The module scrapes the server status data from the web page generated by the \
@ -54,12 +58,9 @@ which must be enabled in your Nginx installation. \
dashboards: [
{
id: '023d2930-f1a5-11e7-a9ef-93c69af7b129-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.nginxMetrics.artifacts.dashboards.linkLabel',
{
defaultMessage: 'Nginx metrics dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.nginxMetrics.artifacts.dashboards.linkLabel', {
defaultMessage: 'Nginx metrics dashboard',
}),
isOverview: true,
},
],
@ -69,7 +70,7 @@ which must be enabled in your Nginx installation. \
},
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/nginx_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function osqueryLogsSpecProvider(context) {
export function osqueryLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'osquery';
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'];
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const;
return {
id: 'osqueryLogs',
name: i18n.translate('kbn.server.tutorials.osqueryLogs.nameTitle', {
name: i18n.translate('home.tutorials.osqueryLogs.nameTitle', {
defaultMessage: 'Osquery logs',
}),
category: TUTORIAL_CATEGORY.SIEM,
shortDescription: i18n.translate('kbn.server.tutorials.osqueryLogs.shortDescription', {
category: TutorialsCategory.SIEM,
shortDescription: i18n.translate('home.tutorials.osqueryLogs.shortDescription', {
defaultMessage: 'Collect the result logs created by osqueryd.',
}),
longDescription: i18n.translate('kbn.server.tutorials.osqueryLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.osqueryLogs.longDescription', {
defaultMessage:
'The `osquery` Filebeat module collects the JSON result logs collected by `osqueryd`. \
[Learn more]({learnMoreLink}).',
@ -50,12 +54,9 @@ export function osqueryLogsSpecProvider(context) {
dashboards: [
{
id: '69f5ae20-eb02-11e7-8f04-51231daa5b05-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.osqueryLogs.artifacts.dashboards.linkLabel',
{
defaultMessage: 'Osquery logs dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.osqueryLogs.artifacts.dashboards.linkLabel', {
defaultMessage: 'Osquery logs dashboard',
}),
isOverview: true,
},
],

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function phpfpmMetricsSpecProvider(context) {
export function phpfpmMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'php_fpm';
return {
id: 'phpfpmMetrics',
name: i18n.translate('kbn.server.tutorials.phpFpmMetrics.nameTitle', {
name: i18n.translate('home.tutorials.phpFpmMetrics.nameTitle', {
defaultMessage: 'PHP-FPM metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
category: TutorialsCategory.METRICS,
isBeta: false,
shortDescription: i18n.translate('kbn.server.tutorials.phpFpmMetrics.shortDescription', {
shortDescription: i18n.translate('home.tutorials.phpFpmMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from PHP-FPM.',
}),
longDescription: i18n.translate('kbn.server.tutorials.phpFpmMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.phpFpmMetrics.longDescription', {
defaultMessage:
'The `php_fpm` Metricbeat module fetches internal metrics from the PHP-FPM server. \
[Learn more]({learnMoreLink}).',
@ -48,7 +52,7 @@ export function phpfpmMetricsSpecProvider(context) {
euiIconType: 'logoPhp',
artifacts: {
dashboards: [
/*{
/* {
id: 'TODO',
linkLabel: 'PHP-FPM metrics dashboard',
isOverview: true
@ -59,8 +63,8 @@ export function phpfpmMetricsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
//previewImagePath: '/plugins/kibana/home/tutorial_resources/php_fpm_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
// previewImagePath: '/plugins/kibana/home/tutorial_resources/php_fpm_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function postgresqlLogsSpecProvider(context) {
export function postgresqlLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'postgresql';
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'];
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const;
return {
id: 'postgresqlLogs',
name: i18n.translate('kbn.server.tutorials.postgresqlLogs.nameTitle', {
name: i18n.translate('home.tutorials.postgresqlLogs.nameTitle', {
defaultMessage: 'PostgreSQL logs',
}),
category: TUTORIAL_CATEGORY.LOGGING,
shortDescription: i18n.translate('kbn.server.tutorials.postgresqlLogs.shortDescription', {
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.tutorials.postgresqlLogs.shortDescription', {
defaultMessage: 'Collect and parse error and slow logs created by PostgreSQL.',
}),
longDescription: i18n.translate('kbn.server.tutorials.postgresqlLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.postgresqlLogs.longDescription', {
defaultMessage:
'The `postgresql` Filebeat module parses error and slow logs created by PostgreSQL. \
[Learn more]({learnMoreLink}).',
@ -51,7 +55,7 @@ export function postgresqlLogsSpecProvider(context) {
{
id: '158be870-87f4-11e7-ad9c-db80de0bf8d3-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.postgresqlLogs.artifacts.dashboards.linkLabel',
'home.tutorials.postgresqlLogs.artifacts.dashboards.linkLabel',
{
defaultMessage: 'PostgreSQL logs dashboard',
}

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function postgresqlMetricsSpecProvider(context) {
export function postgresqlMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'postgresql';
return {
id: 'postgresqlMetrics',
name: i18n.translate('kbn.server.tutorials.postgresqlMetrics.nameTitle', {
name: i18n.translate('home.tutorials.postgresqlMetrics.nameTitle', {
defaultMessage: 'PostgreSQL metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
category: TutorialsCategory.METRICS,
isBeta: false,
shortDescription: i18n.translate('kbn.server.tutorials.postgresqlMetrics.shortDescription', {
shortDescription: i18n.translate('home.tutorials.postgresqlMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from PostgreSQL.',
}),
longDescription: i18n.translate('kbn.server.tutorials.postgresqlMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.postgresqlMetrics.longDescription', {
defaultMessage:
'The `postgresql` Metricbeat module fetches internal metrics from the PostgreSQL server. \
[Learn more]({learnMoreLink}).',
@ -61,8 +65,8 @@ export function postgresqlMetricsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
//previewImagePath: '/plugins/kibana/home/tutorial_resources/postgresql_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
// previewImagePath: '/plugins/kibana/home/tutorial_resources/postgresql_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function prometheusMetricsSpecProvider(context) {
export function prometheusMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'prometheus';
return {
id: moduleName + 'Metrics',
name: i18n.translate('kbn.server.tutorials.prometheusMetrics.nameTitle', {
name: i18n.translate('home.tutorials.prometheusMetrics.nameTitle', {
defaultMessage: 'Prometheus metrics',
}),
isBeta: false,
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.prometheusMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.prometheusMetrics.shortDescription', {
defaultMessage: 'Fetch metrics from a Prometheus exporter.',
}),
longDescription: i18n.translate('kbn.server.tutorials.prometheusMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.prometheusMetrics.longDescription', {
defaultMessage:
'The `{moduleName}` Metricbeat module fetches metrics from Prometheus endpoint. \
[Learn more]({learnMoreLink}).',
@ -49,12 +53,9 @@ export function prometheusMetricsSpecProvider(context) {
euiIconType: 'logoPrometheus',
artifacts: {
application: {
label: i18n.translate(
'kbn.server.tutorials.prometheusMetrics.artifacts.application.label',
{
defaultMessage: 'Discover',
}
),
label: i18n.translate('home.tutorials.prometheusMetrics.artifacts.application.label', {
defaultMessage: 'Discover',
}),
path: '/app/kibana#/discover',
},
dashboards: [],
@ -63,7 +64,7 @@ export function prometheusMetricsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function rabbitmqMetricsSpecProvider(context) {
export function rabbitmqMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'rabbitmq';
return {
id: 'rabbitmqMetrics',
name: i18n.translate('kbn.server.tutorials.rabbitmqMetrics.nameTitle', {
name: i18n.translate('home.tutorials.rabbitmqMetrics.nameTitle', {
defaultMessage: 'RabbitMQ metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.rabbitmqMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.rabbitmqMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from the RabbitMQ server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.rabbitmqMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.rabbitmqMetrics.longDescription', {
defaultMessage:
'The `rabbitmq` Metricbeat module fetches internal metrics from the RabbitMQ server. \
[Learn more]({learnMoreLink}).',
@ -51,7 +55,7 @@ export function rabbitmqMetricsSpecProvider(context) {
{
id: 'AV4YobKIge1VCbKU_qVo-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.rabbitmqMetrics.artifacts.dashboards.linkLabel',
'home.tutorials.rabbitmqMetrics.artifacts.dashboards.linkLabel',
{
defaultMessage: 'RabbitMQ metrics dashboard',
}
@ -65,7 +69,7 @@ export function rabbitmqMetricsSpecProvider(context) {
},
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/rabbitmq_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function redisLogsSpecProvider(context) {
export function redisLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'redis';
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'];
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const;
return {
id: 'redisLogs',
name: i18n.translate('kbn.server.tutorials.redisLogs.nameTitle', {
name: i18n.translate('home.tutorials.redisLogs.nameTitle', {
defaultMessage: 'Redis logs',
}),
category: TUTORIAL_CATEGORY.LOGGING,
shortDescription: i18n.translate('kbn.server.tutorials.redisLogs.shortDescription', {
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.tutorials.redisLogs.shortDescription', {
defaultMessage: 'Collect and parse error and slow logs created by Redis.',
}),
longDescription: i18n.translate('kbn.server.tutorials.redisLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.redisLogs.longDescription', {
defaultMessage:
'The `redis` Filebeat module parses error and slow logs created by Redis. \
For Redis to write error logs, make sure the `logfile` option, from the \
@ -56,12 +60,9 @@ Note that the `slowlog` fileset is experimental. \
dashboards: [
{
id: '7fea2930-478e-11e7-b1f0-cb29bac6bf8b-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.redisLogs.artifacts.dashboards.linkLabel',
{
defaultMessage: 'Redis logs dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.redisLogs.artifacts.dashboards.linkLabel', {
defaultMessage: 'Redis logs dashboard',
}),
isOverview: true,
},
],

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function redisMetricsSpecProvider(context) {
export function redisMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'redis';
return {
id: 'redisMetrics',
name: i18n.translate('kbn.server.tutorials.redisMetrics.nameTitle', {
name: i18n.translate('home.tutorials.redisMetrics.nameTitle', {
defaultMessage: 'Redis metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.redisMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.redisMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from Redis.',
}),
longDescription: i18n.translate('kbn.server.tutorials.redisMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.redisMetrics.longDescription', {
defaultMessage:
'The `redis` Metricbeat module fetches internal metrics from the Redis server. \
[Learn more]({learnMoreLink}).',
@ -49,12 +53,9 @@ export function redisMetricsSpecProvider(context) {
dashboards: [
{
id: 'AV4YjZ5pux-M-tCAunxK-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.redisMetrics.artifacts.dashboards.linkLabel',
{
defaultMessage: 'Redis metrics dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.redisMetrics.artifacts.dashboards.linkLabel', {
defaultMessage: 'Redis metrics dashboard',
}),
isOverview: true,
},
],
@ -64,7 +65,7 @@ export function redisMetricsSpecProvider(context) {
},
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/redis_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -0,0 +1,159 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { systemLogsSpecProvider } from './system_logs';
import { systemMetricsSpecProvider } from './system_metrics';
import { apacheLogsSpecProvider } from './apache_logs';
import { apacheMetricsSpecProvider } from './apache_metrics';
import { elasticsearchLogsSpecProvider } from './elasticsearch_logs';
import { iisLogsSpecProvider } from './iis_logs';
import { kafkaLogsSpecProvider } from './kafka_logs';
import { logstashLogsSpecProvider } from './logstash_logs';
import { nginxLogsSpecProvider } from './nginx_logs';
import { nginxMetricsSpecProvider } from './nginx_metrics';
import { mysqlLogsSpecProvider } from './mysql_logs';
import { mysqlMetricsSpecProvider } from './mysql_metrics';
import { mongodbMetricsSpecProvider } from './mongodb_metrics';
import { osqueryLogsSpecProvider } from './osquery_logs';
import { phpfpmMetricsSpecProvider } from './php_fpm_metrics';
import { postgresqlMetricsSpecProvider } from './postgresql_metrics';
import { postgresqlLogsSpecProvider } from './postgresql_logs';
import { rabbitmqMetricsSpecProvider } from './rabbitmq_metrics';
import { redisLogsSpecProvider } from './redis_logs';
import { redisMetricsSpecProvider } from './redis_metrics';
import { suricataLogsSpecProvider } from './suricata_logs';
import { dockerMetricsSpecProvider } from './docker_metrics';
import { kubernetesMetricsSpecProvider } from './kubernetes_metrics';
import { uwsgiMetricsSpecProvider } from './uwsgi_metrics';
import { netflowSpecProvider } from './netflow';
import { traefikLogsSpecProvider } from './traefik_logs';
import { cephMetricsSpecProvider } from './ceph_metrics';
import { aerospikeMetricsSpecProvider } from './aerospike_metrics';
import { couchbaseMetricsSpecProvider } from './couchbase_metrics';
import { dropwizardMetricsSpecProvider } from './dropwizard_metrics';
import { elasticsearchMetricsSpecProvider } from './elasticsearch_metrics';
import { etcdMetricsSpecProvider } from './etcd_metrics';
import { haproxyMetricsSpecProvider } from './haproxy_metrics';
import { kafkaMetricsSpecProvider } from './kafka_metrics';
import { kibanaMetricsSpecProvider } from './kibana_metrics';
import { memcachedMetricsSpecProvider } from './memcached_metrics';
import { muninMetricsSpecProvider } from './munin_metrics';
import { vSphereMetricsSpecProvider } from './vsphere_metrics';
import { windowsMetricsSpecProvider } from './windows_metrics';
import { windowsEventLogsSpecProvider } from './windows_event_logs';
import { golangMetricsSpecProvider } from './golang_metrics';
import { logstashMetricsSpecProvider } from './logstash_metrics';
import { prometheusMetricsSpecProvider } from './prometheus_metrics';
import { zookeeperMetricsSpecProvider } from './zookeeper_metrics';
import { uptimeMonitorsSpecProvider } from './uptime_monitors';
import { cloudwatchLogsSpecProvider } from './cloudwatch_logs';
import { awsMetricsSpecProvider } from './aws_metrics';
import { mssqlMetricsSpecProvider } from './mssql_metrics';
import { natsMetricsSpecProvider } from './nats_metrics';
import { natsLogsSpecProvider } from './nats_logs';
import { zeekLogsSpecProvider } from './zeek_logs';
import { corednsMetricsSpecProvider } from './coredns_metrics';
import { corednsLogsSpecProvider } from './coredns_logs';
import { auditbeatSpecProvider } from './auditbeat';
import { iptablesLogsSpecProvider } from './iptables_logs';
import { ciscoLogsSpecProvider } from './cisco_logs';
import { envoyproxyLogsSpecProvider } from './envoyproxy_logs';
import { couchdbMetricsSpecProvider } from './couchdb_metrics';
import { consulMetricsSpecProvider } from './consul_metrics';
import { cockroachdbMetricsSpecProvider } from './cockroachdb_metrics';
import { traefikMetricsSpecProvider } from './traefik_metrics';
import { awsLogsSpecProvider } from './aws_logs';
import { activemqLogsSpecProvider } from './activemq_logs';
import { activemqMetricsSpecProvider } from './activemq_metrics';
import { azureMetricsSpecProvider } from './azure_metrics';
import { ibmmqLogsSpecProvider } from './ibmmq_logs';
import { stanMetricsSpecProvider } from './stan_metrics';
import { envoyproxyMetricsSpecProvider } from './envoyproxy_metrics';
import { ibmmqMetricsSpecProvider } from './ibmmq_metrics';
export const builtInTutorials = [
systemLogsSpecProvider,
systemMetricsSpecProvider,
apacheLogsSpecProvider,
apacheMetricsSpecProvider,
elasticsearchLogsSpecProvider,
iisLogsSpecProvider,
kafkaLogsSpecProvider,
logstashLogsSpecProvider,
nginxLogsSpecProvider,
nginxMetricsSpecProvider,
mysqlLogsSpecProvider,
mysqlMetricsSpecProvider,
mongodbMetricsSpecProvider,
osqueryLogsSpecProvider,
phpfpmMetricsSpecProvider,
postgresqlMetricsSpecProvider,
postgresqlLogsSpecProvider,
rabbitmqMetricsSpecProvider,
redisLogsSpecProvider,
redisMetricsSpecProvider,
suricataLogsSpecProvider,
dockerMetricsSpecProvider,
kubernetesMetricsSpecProvider,
uwsgiMetricsSpecProvider,
netflowSpecProvider,
traefikLogsSpecProvider,
cephMetricsSpecProvider,
aerospikeMetricsSpecProvider,
couchbaseMetricsSpecProvider,
dropwizardMetricsSpecProvider,
elasticsearchMetricsSpecProvider,
etcdMetricsSpecProvider,
haproxyMetricsSpecProvider,
kafkaMetricsSpecProvider,
kibanaMetricsSpecProvider,
memcachedMetricsSpecProvider,
muninMetricsSpecProvider,
vSphereMetricsSpecProvider,
windowsMetricsSpecProvider,
windowsEventLogsSpecProvider,
golangMetricsSpecProvider,
logstashMetricsSpecProvider,
prometheusMetricsSpecProvider,
zookeeperMetricsSpecProvider,
uptimeMonitorsSpecProvider,
cloudwatchLogsSpecProvider,
awsMetricsSpecProvider,
mssqlMetricsSpecProvider,
natsMetricsSpecProvider,
natsLogsSpecProvider,
zeekLogsSpecProvider,
corednsMetricsSpecProvider,
corednsLogsSpecProvider,
auditbeatSpecProvider,
iptablesLogsSpecProvider,
ciscoLogsSpecProvider,
envoyproxyLogsSpecProvider,
couchdbMetricsSpecProvider,
consulMetricsSpecProvider,
cockroachdbMetricsSpecProvider,
traefikMetricsSpecProvider,
awsLogsSpecProvider,
activemqLogsSpecProvider,
activemqMetricsSpecProvider,
azureMetricsSpecProvider,
ibmmqLogsSpecProvider,
ibmmqMetricsSpecProvider,
stanMetricsSpecProvider,
envoyproxyMetricsSpecProvider,
];

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function stanMetricsSpecProvider(context) {
export function stanMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'stan';
return {
id: 'stanMetrics',
name: i18n.translate('kbn.server.tutorials.stanMetrics.nameTitle', {
name: i18n.translate('home.tutorials.stanMetrics.nameTitle', {
defaultMessage: 'STAN metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.stanMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.stanMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from the STAN server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.stanMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.stanMetrics.longDescription', {
defaultMessage:
'The `stan` Metricbeat module fetches monitoring metrics from STAN. \
[Learn more]({learnMoreLink}).',
@ -53,7 +57,7 @@ export function stanMetricsSpecProvider(context) {
},
completionTimeMinutes: 10,
// previewImagePath: '/plugins/kibana/home/tutorial_resources/stan_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function suricataLogsSpecProvider(context) {
export function suricataLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'suricata';
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'];
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const;
return {
id: 'suricataLogs',
name: i18n.translate('kbn.server.tutorials.suricataLogs.nameTitle', {
name: i18n.translate('home.tutorials.suricataLogs.nameTitle', {
defaultMessage: 'Suricata logs',
}),
category: TUTORIAL_CATEGORY.SIEM,
shortDescription: i18n.translate('kbn.server.tutorials.suricataLogs.shortDescription', {
category: TutorialsCategory.SIEM,
shortDescription: i18n.translate('home.tutorials.suricataLogs.shortDescription', {
defaultMessage: 'Collect the result logs created by Suricata IDS/IPS/NSM.',
}),
longDescription: i18n.translate('kbn.server.tutorials.suricataLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.suricataLogs.longDescription', {
defaultMessage:
'The `suricata` Filebeat module collects the logs from the \
[Suricata Eve JSON output](https://suricata.readthedocs.io/en/latest/output/eve/eve-json-format.html). \
@ -46,17 +50,14 @@ export function suricataLogsSpecProvider(context) {
learnMoreLink: '{config.docs.beats.filebeat}/filebeat-module-suricata.html',
},
}),
//euiIconType: 'logoSuricata',
// euiIconType: 'logoSuricata',
artifacts: {
dashboards: [
{
id: '69f5ae20-eb02-11e7-8f04-51231daa5b05',
linkLabel: i18n.translate(
'kbn.server.tutorials.suricataLogs.artifacts.dashboards.linkLabel',
{
defaultMessage: 'Suricata logs dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.suricataLogs.artifacts.dashboards.linkLabel', {
defaultMessage: 'Suricata logs dashboard',
}),
isOverview: true,
},
],

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function systemLogsSpecProvider(context) {
export function systemLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'system';
const platforms = ['OSX', 'DEB', 'RPM'];
const platforms = ['OSX', 'DEB', 'RPM'] as const;
return {
id: 'systemLogs',
name: i18n.translate('kbn.server.tutorials.systemLogs.nameTitle', {
name: i18n.translate('home.tutorials.systemLogs.nameTitle', {
defaultMessage: 'System logs',
}),
category: TUTORIAL_CATEGORY.LOGGING,
shortDescription: i18n.translate('kbn.server.tutorials.systemLogs.shortDescription', {
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.tutorials.systemLogs.shortDescription', {
defaultMessage: 'Collect and parse logs written by the local Syslog server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.systemLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.systemLogs.longDescription', {
defaultMessage:
'The `system` Filebeat module collects and parses logs created by the system logging service of common \
Unix/Linux based distributions. This module is not available on Windows. \
@ -50,12 +54,9 @@ Unix/Linux based distributions. This module is not available on Windows. \
dashboards: [
{
id: 'Filebeat-syslog-dashboard-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.systemLogs.artifacts.dashboards.linkLabel',
{
defaultMessage: 'System logs dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.systemLogs.artifacts.dashboards.linkLabel', {
defaultMessage: 'System logs dashboard',
}),
isOverview: true,
},
],

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function systemMetricsSpecProvider(context) {
export function systemMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'system';
return {
id: 'systemMetrics',
name: i18n.translate('kbn.server.tutorials.systemMetrics.nameTitle', {
name: i18n.translate('home.tutorials.systemMetrics.nameTitle', {
defaultMessage: 'System metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.systemMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.systemMetrics.shortDescription', {
defaultMessage: 'Collect CPU, memory, network, and disk statistics from the host.',
}),
longDescription: i18n.translate('kbn.server.tutorials.systemMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.systemMetrics.longDescription', {
defaultMessage:
'The `system` Metricbeat module collects CPU, memory, network, and disk statistics from the host. \
It collects system wide statistics and statistics per process and filesystem. \
@ -49,12 +53,9 @@ It collects system wide statistics and statistics per process and filesystem. \
dashboards: [
{
id: 'Metricbeat-system-overview-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.systemMetrics.artifacts.dashboards.linkLabel',
{
defaultMessage: 'System metrics dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.systemMetrics.artifacts.dashboards.linkLabel', {
defaultMessage: 'System metrics dashboard',
}),
isOverview: true,
},
],
@ -64,7 +65,7 @@ It collects system wide statistics and statistics per process and filesystem. \
},
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/system_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/filebeat_instructions';
} from '../instructions/filebeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function traefikLogsSpecProvider(context) {
export function traefikLogsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'traefik';
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'];
const platforms = ['OSX', 'DEB', 'RPM', 'WINDOWS'] as const;
return {
id: 'traefikLogs',
name: i18n.translate('kbn.server.tutorials.traefikLogs.nameTitle', {
name: i18n.translate('home.tutorials.traefikLogs.nameTitle', {
defaultMessage: 'Traefik logs',
}),
category: TUTORIAL_CATEGORY.LOGGING,
shortDescription: i18n.translate('kbn.server.tutorials.traefikLogs.shortDescription', {
category: TutorialsCategory.LOGGING,
shortDescription: i18n.translate('home.tutorials.traefikLogs.shortDescription', {
defaultMessage: 'Collect and parse access logs created by the Traefik Proxy.',
}),
longDescription: i18n.translate('kbn.server.tutorials.traefikLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.traefikLogs.longDescription', {
defaultMessage:
'The `traefik` Filebeat module parses access logs created by Traefik. \
[Learn more]({learnMoreLink}).',
@ -45,17 +49,14 @@ export function traefikLogsSpecProvider(context) {
learnMoreLink: '{config.docs.beats.filebeat}/filebeat-module-traefik.html',
},
}),
//euiIconType: 'logoTraefik',
// euiIconType: 'logoTraefik',
artifacts: {
dashboards: [
{
id: 'Filebeat-Traefik-Dashboard-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.traefikLogs.artifacts.dashboards.linkLabel',
{
defaultMessage: 'Traefik logs dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.traefikLogs.artifacts.dashboards.linkLabel', {
defaultMessage: 'Traefik logs dashboard',
}),
isOverview: true,
},
],

View file

@ -18,25 +18,26 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory, TutorialSchema } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import { TutorialContext } from '../../services/tutorials/lib/tutorials_registry_types';
export function traefikMetricsSpecProvider(server, context) {
export function traefikMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'traefik';
return {
id: 'traefikMetrics',
name: i18n.translate('kbn.server.tutorials.traefikMetrics.nameTitle', {
name: i18n.translate('home.tutorials.traefikMetrics.nameTitle', {
defaultMessage: 'Traefik metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.traefikMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.traefikMetrics.shortDescription', {
defaultMessage: 'Fetch monitoring metrics from Traefik.',
}),
longDescription: i18n.translate('kbn.server.tutorials.traefikMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.traefikMetrics.longDescription', {
defaultMessage:
'The `traefik` Metricbeat module fetches monitoring metrics from Traefik. \
[Learn more]({learnMoreLink}).',
@ -53,7 +54,7 @@ export function traefikMetricsSpecProvider(server, context) {
},
completionTimeMinutes: 10,
// previewImagePath: '/plugins/kibana/home/tutorial_resources/traefik_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,24 +18,28 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/heartbeat_instructions';
} from '../instructions/heartbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function uptimeMonitorsSpecProvider(context) {
export function uptimeMonitorsSpecProvider(context: TutorialContext): TutorialSchema {
return {
id: 'uptimeMonitors',
name: i18n.translate('kbn.server.tutorials.uptimeMonitors.nameTitle', {
name: i18n.translate('home.tutorials.uptimeMonitors.nameTitle', {
defaultMessage: 'Uptime Monitors',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.uptimeMonitors.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.uptimeMonitors.shortDescription', {
defaultMessage: 'Monitor services for their availability',
}),
longDescription: i18n.translate('kbn.server.tutorials.uptimeMonitors.longDescription', {
longDescription: i18n.translate('home.tutorials.uptimeMonitors.longDescription', {
defaultMessage:
'Monitor services for their availability with active probing. \
Given a list of URLs, Heartbeat asks the simple question: Are you alive? \
@ -49,12 +53,9 @@ export function uptimeMonitorsSpecProvider(context) {
dashboards: [],
application: {
path: '/app/uptime',
label: i18n.translate(
'kbn.server.tutorials.uptimeMonitors.artifacts.dashboards.linkLabel',
{
defaultMessage: 'Uptime App',
}
),
label: i18n.translate('home.tutorials.uptimeMonitors.artifacts.dashboards.linkLabel', {
defaultMessage: 'Uptime App',
}),
},
exportedFields: {
documentationUrl: '{config.docs.beats.heartbeat}/exported-fields.html',
@ -62,7 +63,7 @@ export function uptimeMonitorsSpecProvider(context) {
},
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/uptime_monitors/screenshot.png',
onPrem: onPremInstructions(null, null, null, context),
onPrem: onPremInstructions([], context),
elasticCloud: cloudInstructions(),
onPremElasticCloud: onPremCloudInstructions(),
};

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function uwsgiMetricsSpecProvider(context) {
export function uwsgiMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'uwsgi';
return {
id: 'uwsgiMetrics',
name: i18n.translate('kbn.server.tutorials.uwsgiMetrics.nameTitle', {
name: i18n.translate('home.tutorials.uwsgiMetrics.nameTitle', {
defaultMessage: 'uWSGI metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.uwsgiMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.uwsgiMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from the uWSGI server.',
}),
longDescription: i18n.translate('kbn.server.tutorials.uwsgiMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.uwsgiMetrics.longDescription', {
defaultMessage:
'The `uwsgi` Metricbeat module fetches internal metrics from the uWSGI server. \
[Learn more]({learnMoreLink}).',
@ -44,18 +48,15 @@ export function uwsgiMetricsSpecProvider(context) {
learnMoreLink: '{config.docs.beats.metricbeat}/metricbeat-module-uwsgi.html',
},
}),
//euiIconType: 'logouWSGI',
// euiIconType: 'logouWSGI',
isBeta: false,
artifacts: {
dashboards: [
{
id: '32fca290-f0af-11e7-b9ff-9f96241065de-ecs',
linkLabel: i18n.translate(
'kbn.server.tutorials.uwsgiMetrics.artifacts.dashboards.linkLabel',
{
defaultMessage: 'uWSGI metrics dashboard',
}
),
linkLabel: i18n.translate('home.tutorials.uwsgiMetrics.artifacts.dashboards.linkLabel', {
defaultMessage: 'uWSGI metrics dashboard',
}),
isOverview: true,
},
],
@ -65,7 +66,7 @@ export function uwsgiMetricsSpecProvider(context) {
},
completionTimeMinutes: 10,
previewImagePath: '/plugins/kibana/home/tutorial_resources/uwsgi_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function vSphereMetricsSpecProvider(context) {
export function vSphereMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'vsphere';
return {
id: 'vsphereMetrics',
name: i18n.translate('kbn.server.tutorials.vsphereMetrics.nameTitle', {
name: i18n.translate('home.tutorials.vsphereMetrics.nameTitle', {
defaultMessage: 'vSphere metrics',
}),
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.vsphereMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.vsphereMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from vSphere.',
}),
longDescription: i18n.translate('kbn.server.tutorials.vsphereMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.vsphereMetrics.longDescription', {
defaultMessage:
'The `vsphere` Metricbeat module fetches internal metrics from a vSphere cluster. \
[Learn more]({learnMoreLink}).',
@ -44,11 +48,11 @@ export function vSphereMetricsSpecProvider(context) {
learnMoreLink: '{config.docs.beats.metricbeat}/metricbeat-module-vsphere.html',
},
}),
//euiIconType: 'logoVSphere',
// euiIconType: 'logoVSphere',
isBeta: true,
artifacts: {
application: {
label: i18n.translate('kbn.server.tutorials.vsphereMetrics.artifacts.application.label', {
label: i18n.translate('home.tutorials.vsphereMetrics.artifacts.application.label', {
defaultMessage: 'Discover',
}),
path: '/app/kibana#/discover',
@ -59,8 +63,8 @@ export function vSphereMetricsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
//previewImagePath: '/plugins/kibana/home/tutorial_resources/vsphere_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, null, null, null, context),
// previewImagePath: '/plugins/kibana/home/tutorial_resources/vsphere_metrics/screenshot.png',
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

View file

@ -18,25 +18,29 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/winlogbeat_instructions';
} from '../instructions/winlogbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function windowsEventLogsSpecProvider(context) {
export function windowsEventLogsSpecProvider(context: TutorialContext): TutorialSchema {
return {
id: 'windowsEventLogs',
name: i18n.translate('kbn.server.tutorials.windowsEventLogs.nameTitle', {
name: i18n.translate('home.tutorials.windowsEventLogs.nameTitle', {
defaultMessage: 'Windows Event Log',
}),
isBeta: false,
category: TUTORIAL_CATEGORY.SIEM,
shortDescription: i18n.translate('kbn.server.tutorials.windowsEventLogs.shortDescription', {
category: TutorialsCategory.SIEM,
shortDescription: i18n.translate('home.tutorials.windowsEventLogs.shortDescription', {
defaultMessage: 'Fetch logs from the Windows Event Log.',
}),
longDescription: i18n.translate('kbn.server.tutorials.windowsEventLogs.longDescription', {
longDescription: i18n.translate('home.tutorials.windowsEventLogs.longDescription', {
defaultMessage:
'Use Winlogbeat to collect the logs from the Windows Event Log. \
[Learn more]({learnMoreLink}).',
@ -47,7 +51,7 @@ export function windowsEventLogsSpecProvider(context) {
euiIconType: 'logoWindows',
artifacts: {
application: {
label: i18n.translate('kbn.server.tutorials.windowsEventLogs.artifacts.application.label', {
label: i18n.translate('home.tutorials.windowsEventLogs.artifacts.application.label', {
defaultMessage: 'SIEM App',
}),
path: '/app/siem',
@ -58,7 +62,7 @@ export function windowsEventLogsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
onPrem: onPremInstructions(null, null, null, context),
onPrem: onPremInstructions(context),
elasticCloud: cloudInstructions(),
onPremElasticCloud: onPremCloudInstructions(),
};

View file

@ -18,26 +18,30 @@
*/
import { i18n } from '@kbn/i18n';
import { TUTORIAL_CATEGORY } from '../../../common/tutorials/tutorial_category';
import { TutorialsCategory } from '../../services/tutorials';
import {
onPremInstructions,
cloudInstructions,
onPremCloudInstructions,
} from '../../../common/tutorials/metricbeat_instructions';
} from '../instructions/metricbeat_instructions';
import {
TutorialContext,
TutorialSchema,
} from '../../services/tutorials/lib/tutorials_registry_types';
export function windowsMetricsSpecProvider(context) {
export function windowsMetricsSpecProvider(context: TutorialContext): TutorialSchema {
const moduleName = 'windows';
return {
id: 'windowsMetrics',
name: i18n.translate('kbn.server.tutorials.windowsMetrics.nameTitle', {
name: i18n.translate('home.tutorials.windowsMetrics.nameTitle', {
defaultMessage: 'Windows metrics',
}),
isBeta: false,
category: TUTORIAL_CATEGORY.METRICS,
shortDescription: i18n.translate('kbn.server.tutorials.windowsMetrics.shortDescription', {
category: TutorialsCategory.METRICS,
shortDescription: i18n.translate('home.tutorials.windowsMetrics.shortDescription', {
defaultMessage: 'Fetch internal metrics from Windows.',
}),
longDescription: i18n.translate('kbn.server.tutorials.windowsMetrics.longDescription', {
longDescription: i18n.translate('home.tutorials.windowsMetrics.longDescription', {
defaultMessage:
'The `windows` Metricbeat module fetches internal metrics from Windows. \
[Learn more]({learnMoreLink}).',
@ -48,7 +52,7 @@ export function windowsMetricsSpecProvider(context) {
euiIconType: 'logoWindows',
artifacts: {
application: {
label: i18n.translate('kbn.server.tutorials.windowsMetrics.artifacts.application.label', {
label: i18n.translate('home.tutorials.windowsMetrics.artifacts.application.label', {
defaultMessage: 'Discover',
}),
path: '/app/kibana#/discover',
@ -59,7 +63,7 @@ export function windowsMetricsSpecProvider(context) {
},
},
completionTimeMinutes: 10,
onPrem: onPremInstructions(moduleName, null, null, null, context),
onPrem: onPremInstructions(moduleName, context),
elasticCloud: cloudInstructions(moduleName),
onPremElasticCloud: onPremCloudInstructions(moduleName),
};

Some files were not shown because too many files have changed in this diff Show more