diff --git a/src/plugins/kibana/server/lib/__tests__/convert_pattern_and_template_name.js b/src/plugins/kibana/common/lib/__tests__/convert_pattern_and_ingest_name.js similarity index 100% rename from src/plugins/kibana/server/lib/__tests__/convert_pattern_and_template_name.js rename to src/plugins/kibana/common/lib/__tests__/convert_pattern_and_ingest_name.js diff --git a/src/plugins/kibana/server/lib/convert_pattern_and_ingest_name.js b/src/plugins/kibana/common/lib/convert_pattern_and_ingest_name.js similarity index 100% rename from src/plugins/kibana/server/lib/convert_pattern_and_ingest_name.js rename to src/plugins/kibana/common/lib/convert_pattern_and_ingest_name.js diff --git a/src/plugins/kibana/public/settings/sections/indices/add_data_steps/install_filebeat_step.html b/src/plugins/kibana/public/settings/sections/indices/add_data_steps/install_filebeat_step.html index 7905de770baf1..cd1d483adc849 100644 --- a/src/plugins/kibana/public/settings/sections/indices/add_data_steps/install_filebeat_step.html +++ b/src/plugins/kibana/public/settings/sections/indices/add_data_steps/install_filebeat_step.html @@ -6,27 +6,40 @@

Follow these instructions to install Filebeat

  1. Install Filebeat on all servers on which you want to tail logs - ( + ( instructions )
  2. +
  3. Point Filebeat at the log files you want to tail - ( + ( instructions )
  4. -
  5. Configure Filebeat on each server to send data to your Elasticsearch instances - ( + +
  6. + Configure Filebeat to send data through your new Elasticsearch pipeline + ( instructions - ) -
  7. -
  8. Set the index name in filebeat.yml based on the index pattern you configured in the previous step. The Filebeat - config takes a base index name and automatically rotates the target index by appending "-{date}" to the end, so if - your pattern was "foo-*" you would make the index name "foo" in filebeat.yml. + )
    + At minimum you'll need to configure Filebeat's Elasticsearch output with a hostname, an index name, and a + + paramaters + block. Your config should end up looking something like this:

    +
    +output:
    + elasticsearch:
    +   hosts: ["your-elasticsearch-host"]
    +   index: "your-base-index-name"
    +   parameters:
    +     pipeline: "{{installStep.pipelineId}}"
    + NOTE: The Filebeat config takes a base index name and automatically rotates the target index by appending "-{date}" + to the end, so if your pattern was "filebeat-*" you would make the index name "filebeat" in filebeat.yml.

  9. +
  10. Run Filebeat on each server - ( + ( instructions )
  11. diff --git a/src/plugins/kibana/public/settings/sections/indices/add_data_steps/install_filebeat_step.js b/src/plugins/kibana/public/settings/sections/indices/add_data_steps/install_filebeat_step.js index 5869d4b385a30..b6f4c3664a220 100644 --- a/src/plugins/kibana/public/settings/sections/indices/add_data_steps/install_filebeat_step.js +++ b/src/plugins/kibana/public/settings/sections/indices/add_data_steps/install_filebeat_step.js @@ -1,5 +1,6 @@ import modules from 'ui/modules'; import template from 'plugins/kibana/settings/sections/indices/add_data_steps/install_filebeat_step.html'; +import { patternToIngest } from '../../../../../common/lib/convert_pattern_and_ingest_name'; modules.get('apps/settings') .directive('installFilebeatStep', function () { @@ -8,8 +9,10 @@ modules.get('apps/settings') scope: { results: '=' }, + bindToController: true, + controllerAs: 'installStep', controller: function ($scope) { - var results = $scope.results; + this.pipelineId = patternToIngest(this.results.indexPattern.id); } }; }); diff --git a/src/plugins/kibana/server/routes/api/ingest/register_delete.js b/src/plugins/kibana/server/routes/api/ingest/register_delete.js index 195e8cff1e2f3..f639949c74e7d 100644 --- a/src/plugins/kibana/server/routes/api/ingest/register_delete.js +++ b/src/plugins/kibana/server/routes/api/ingest/register_delete.js @@ -1,6 +1,6 @@ import Promise from 'bluebird'; import handleESError from '../../../lib/handle_es_error'; -import {ingestToPattern, patternToIngest} from '../../../lib/convert_pattern_and_ingest_name'; +import {ingestToPattern, patternToIngest} from '../../../../common/lib/convert_pattern_and_ingest_name'; module.exports = function registerDelete(server) { server.route({ diff --git a/src/plugins/kibana/server/routes/api/ingest/register_post.js b/src/plugins/kibana/server/routes/api/ingest/register_post.js index 51c76fcd3373d..dd503e0de7175 100644 --- a/src/plugins/kibana/server/routes/api/ingest/register_post.js +++ b/src/plugins/kibana/server/routes/api/ingest/register_post.js @@ -4,7 +4,7 @@ import ingestConfigSchema from '../../../lib/schemas/resources/ingest_config_sch import handleESError from '../../../lib/handle_es_error'; import createMappingsFromPatternFields from '../../../lib/create_mappings_from_pattern_fields'; import initDefaultFieldProps from '../../../lib/init_default_field_props'; -import {ingestToPattern, patternToIngest} from '../../../lib/convert_pattern_and_ingest_name'; +import {ingestToPattern, patternToIngest} from '../../../../common/lib/convert_pattern_and_ingest_name'; import { keysToCamelCaseShallow } from '../../../../common/lib/case_conversion'; function patternRollback(rootError, indexPatternId, boundCallWithRequest) {