Skip to content

Commit

Permalink
Merge branch 'master' of github.com:elastic/kibana into detections-fi…
Browse files Browse the repository at this point in the history
…x-import-rules
  • Loading branch information
XavierM committed Jan 30, 2020
2 parents 3d33f14 + 8a4d680 commit 3464bb8
Show file tree
Hide file tree
Showing 294 changed files with 831 additions and 591 deletions.
5 changes: 4 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@
/src/legacy/core_plugins/kibana/public/discover/ @elastic/kibana-app
/src/legacy/core_plugins/kibana/public/visualize/ @elastic/kibana-app
/src/legacy/core_plugins/kibana/public/local_application_service/ @elastic/kibana-app
/src/legacy/core_plugins/kibana/public/home/ @elastic/kibana-app
/src/legacy/core_plugins/kibana/public/dev_tools/ @elastic/kibana-app
/src/legacy/core_plugins/metrics/ @elastic/kibana-app
/src/legacy/core_plugins/vis_type_vislib/ @elastic/kibana-app
# Exclude tutorials folder for now because they are not owned by Kibana app and most will move out soon
/src/plugins/home/public @elastic/kibana-app
/src/plugins/home/server/*.ts @elastic/kibana-app
/src/plugins/home/server/services/ @elastic/kibana-app
# Exclude tutorial resources folder for now because they are not owned by Kibana app and most will move out soon
/src/legacy/core_plugins/kibana/public/home/*.ts @elastic/kibana-app
/src/legacy/core_plugins/kibana/public/home/*.scss @elastic/kibana-app
/src/legacy/core_plugins/kibana/public/home/np_ready/ @elastic/kibana-app
/src/plugins/kibana_legacy/ @elastic/kibana-app
/src/plugins/timelion/ @elastic/kibana-app
/src/plugins/dev_tools/ @elastic/kibana-app
Expand Down
2 changes: 1 addition & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"visTypeMetric": "src/legacy/core_plugins/vis_type_metric",
"visTypeTable": "src/legacy/core_plugins/vis_type_table",
"visTypeTagCloud": "src/legacy/core_plugins/vis_type_tagcloud",
"visTypeTimeseries": "src/legacy/core_plugins/vis_type_timeseries",
"visTypeTimeseries": ["src/legacy/core_plugins/vis_type_timeseries", "src/plugins/vis_type_timeseries"],
"visTypeVega": "src/legacy/core_plugins/vis_type_vega",
"visTypeVislib": "src/legacy/core_plugins/vis_type_vislib",
"visualizations": [
Expand Down
32 changes: 16 additions & 16 deletions docs/settings/monitoring-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ built-in `elastic` user has this role.

You can adjust how monitoring data is
collected from {kib} and displayed in {kib} by configuring settings in the
`kibana.yml` file. There are also `xpack.monitoring.elasticsearch.*` settings,
`kibana.yml` file. There are also `monitoring.ui.elasticsearch.*` settings,
which support the same values as <<settings,{kib} configuration settings>>.

To control how data is collected from your {es} nodes, you configure
Expand All @@ -31,20 +31,20 @@ For more information, see
[[monitoring-general-settings]]
==== General monitoring settings

`xpack.monitoring.enabled`::
`monitoring.enabled`::
Set to `true` (default) to enable the {monitor-features} in {kib}. Unlike the
`xpack.monitoring.ui.enabled` setting, when this setting is `false`, the
`monitoring.ui.enabled` setting, when this setting is `false`, the
monitoring back-end does not run and {kib} stats are not sent to the monitoring
cluster.

`xpack.monitoring.elasticsearch.hosts`::
`monitoring.ui.elasticsearch.hosts`::
Specifies the location of the {es} cluster where your monitoring data is stored.
By default, this is the same as `elasticsearch.hosts`. This setting enables
you to use a single {kib} instance to search and visualize data in your
production cluster as well as monitor data sent to a dedicated monitoring
cluster.

`xpack.monitoring.elasticsearch.username`::
`monitoring.ui.elasticsearch.username`::
Specifies the username used by {kib} monitoring to establish a persistent connection
in {kib} to the {es} monitoring cluster and to verify licensing status on the {es}
monitoring cluster.
Expand All @@ -55,7 +55,7 @@ both the {es} monitoring cluster and the {es} production cluster.

If not set, {kib} uses the value of the `elasticsearch.username` setting.

`xpack.monitoring.elasticsearch.password`::
`monitoring.ui.elasticsearch.password`::
Specifies the password used by {kib} monitoring to establish a persistent connection
in {kib} to the {es} monitoring cluster and to verify licensing status on the {es}
monitoring cluster.
Expand All @@ -66,7 +66,7 @@ both the {es} monitoring cluster and the {es} production cluster.

If not set, {kib} uses the value of the `elasticsearch.password` setting.

`xpack.monitoring.elasticsearch.pingTimeout`::
`monitoring.ui.elasticsearch.pingTimeout`::
Specifies the time in milliseconds to wait for {es} to respond to internal
health checks. By default, it matches the `elasticsearch.pingTimeout` setting,
which has a default value of `30000`.
Expand All @@ -77,11 +77,11 @@ which has a default value of `30000`.

These settings control how data is collected from {kib}.

`xpack.monitoring.kibana.collection.enabled`::
`monitoring.kibana.collection.enabled`::
Set to `true` (default) to enable data collection from the {kib} NodeJS server
for {kib} Dashboards to be featured in the Monitoring.

`xpack.monitoring.kibana.collection.interval`::
`monitoring.kibana.collection.interval`::
Specifies the number of milliseconds to wait in between data sampling on the
{kib} NodeJS server for the metrics that are displayed in the {kib} dashboards.
Defaults to `10000` (10 seconds).
Expand All @@ -96,24 +96,24 @@ However, the defaults work best in most circumstances. For more information
about configuring {kib}, see
{kibana-ref}/settings.html[Setting Kibana Server Properties].

`xpack.monitoring.elasticsearch.logFetchCount`::
`monitoring.ui.elasticsearch.logFetchCount`::
Specifies the number of log entries to display in the Monitoring UI. Defaults to
`10`. The maximum value is `50`.

`xpack.monitoring.max_bucket_size`::
`monitoring.ui.max_bucket_size`::
Specifies the number of term buckets to return out of the overall terms list when
performing terms aggregations to retrieve index and node metrics. For more
information about the `size` parameter, see
{ref}/search-aggregations-bucket-terms-aggregation.html#search-aggregations-bucket-terms-aggregation-size[Terms Aggregation].
Defaults to `10000`.

`xpack.monitoring.min_interval_seconds`::
`monitoring.ui.min_interval_seconds`::
Specifies the minimum number of seconds that a time bucket in a chart can
represent. Defaults to 10. If you modify the
`xpack.monitoring.collection.interval` in `elasticsearch.yml`, use the same
`monitoring.ui.collection.interval` in `elasticsearch.yml`, use the same
value in this setting.

`xpack.monitoring.ui.enabled`::
`monitoring.ui.enabled`::
Set to `false` to hide the Monitoring UI in {kib}. The monitoring back-end
continues to run as an agent for sending {kib} stats to the monitoring
cluster. Defaults to `true`.
Expand All @@ -127,15 +127,15 @@ better decisions about your container performance, rather than guessing based on
the overall machine performance. If you are not running your applications in a
container, then Cgroup statistics are not useful.

`xpack.monitoring.ui.container.elasticsearch.enabled`::
`monitoring.ui.container.elasticsearch.enabled`::

For {es} clusters that are running in containers, this setting changes the
*Node Listing* to display the CPU utilization based on the reported Cgroup
statistics. It also adds the calculated Cgroup CPU utilization to the
*Node Overview* page instead of the overall operating system's CPU
utilization. Defaults to `false`.

`xpack.monitoring.ui.container.logstash.enabled`::
`monitoring.ui.container.logstash.enabled`::

For {ls} nodes that are running in containers, this setting
changes the {ls} *Node Listing* to display the CPU utilization
Expand Down
50 changes: 50 additions & 0 deletions src/core/server/config/deprecation/core_deprecations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,56 @@ export const coreDeprecationProvider: ConfigDeprecationProvider = ({
renameFromRoot('xpack.telemetry.config', 'telemetry.config'),
renameFromRoot('xpack.telemetry.banner', 'telemetry.banner'),
renameFromRoot('xpack.telemetry.url', 'telemetry.url'),
// Monitoring renames
// TODO: Remove these from here once the monitoring plugin is migrated to NP
renameFromRoot('xpack.monitoring.enabled', 'monitoring.enabled'),
renameFromRoot('xpack.monitoring.ui.enabled', 'monitoring.ui.enabled'),
renameFromRoot(
'xpack.monitoring.kibana.collection.enabled',
'monitoring.kibana.collection.enabled'
),
renameFromRoot('xpack.monitoring.max_bucket_size', 'monitoring.ui.max_bucket_size'),
renameFromRoot('xpack.monitoring.min_interval_seconds', 'monitoring.ui.min_interval_seconds'),
renameFromRoot(
'xpack.monitoring.show_license_expiration',
'monitoring.ui.show_license_expiration'
),
renameFromRoot(
'xpack.monitoring.ui.container.elasticsearch.enabled',
'monitoring.ui.container.elasticsearch.enabled'
),
renameFromRoot(
'xpack.monitoring.ui.container.logstash.enabled',
'monitoring.ui.container.logstash.enabled'
),
renameFromRoot(
'xpack.monitoring.tests.cloud_detector.enabled',
'monitoring.tests.cloud_detector.enabled'
),
renameFromRoot(
'xpack.monitoring.kibana.collection.interval',
'monitoring.kibana.collection.interval'
),
renameFromRoot('xpack.monitoring.elasticsearch.hosts', 'monitoring.ui.elasticsearch.hosts'),
renameFromRoot('xpack.monitoring.elasticsearch.username', 'monitoring.ui.elasticsearch.username'),
renameFromRoot('xpack.monitoring.elasticsearch.password', 'monitoring.ui.elasticsearch.password'),
renameFromRoot(
'xpack.monitoring.xpack_api_polling_frequency_millis',
'monitoring.xpack_api_polling_frequency_millis'
),
renameFromRoot(
'xpack.monitoring.cluster_alerts.email_notifications.enabled',
'monitoring.cluster_alerts.email_notifications.enabled'
),
renameFromRoot(
'xpack.monitoring.cluster_alerts.email_notifications.email_address',
'monitoring.cluster_alerts.email_notifications.email_address'
),
renameFromRoot('xpack.monitoring.ccs.enabled', 'monitoring.ui.ccs.enabled'),
renameFromRoot(
'xpack.monitoring.elasticsearch.logFetchCount',
'monitoring.ui.elasticsearch.logFetchCount'
),
configPathDeprecation,
dataPathDeprecation,
rewriteBasePathDeprecation,
Expand Down
6 changes: 0 additions & 6 deletions src/legacy/core_plugins/vis_type_timeseries/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { resolve } from 'path';
import { Legacy } from 'kibana';

import { LegacyPluginApi, LegacyPluginInitializer } from '../../../../src/legacy/types';
import { VisTypeTimeseriesSetup } from '../../../plugins/vis_type_timeseries/server';

const metricsPluginInitializer: LegacyPluginInitializer = ({ Plugin }: LegacyPluginApi) =>
new Plugin({
Expand All @@ -47,11 +46,6 @@ const metricsPluginInitializer: LegacyPluginInitializer = ({ Plugin }: LegacyPlu
},
},
},
init: (server: Legacy.Server) => {
const visTypeTimeSeriesPlugin = server.newPlatform.setup.plugins
.metrics as VisTypeTimeseriesSetup;
visTypeTimeSeriesPlugin.__legacy.registerLegacyAPI({ server });
},
config(Joi: any) {
return Joi.object({
enabled: Joi.boolean().default(true),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { KBN_FIELD_TYPES } from '../../../../../../plugins/data/public';
import { METRIC_TYPES } from '../../../common/metric_types';
import { METRIC_TYPES } from '../../../../../../plugins/vis_type_timeseries/common/metric_types';

export const FilterRatioAgg = props => {
const { series, fields, panel } = props;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ import { includes } from 'lodash';
import { injectI18n } from '@kbn/i18n/react';
import { EuiComboBox } from '@elastic/eui';
import { calculateSiblings } from '../lib/calculate_siblings';
import { calculateLabel } from '../../../common/calculate_label';
import { basicAggs } from '../../../common/basic_aggs';
import { toPercentileNumber } from '../../../common/to_percentile_number';
import { METRIC_TYPES } from '../../../common/metric_types';
import { calculateLabel } from '../../../../../../plugins/vis_type_timeseries/common/calculate_label';
import { basicAggs } from '../../../../../../plugins/vis_type_timeseries/common/basic_aggs';
import { toPercentileNumber } from '../../../../../../plugins/vis_type_timeseries/common/to_percentile_number';
import { METRIC_TYPES } from '../../../../../../plugins/vis_type_timeseries/common/metric_types';

function createTypeFilter(restrict, exclude) {
return metric => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {
EuiFieldNumber,
} from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { MODEL_TYPES } from '../../../common/model_options';
import { MODEL_TYPES } from '../../../../../../plugins/vis_type_timeseries/common/model_options';

const DEFAULTS = {
model_type: MODEL_TYPES.UNWEIGHTED,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
} from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { KBN_FIELD_TYPES } from '../../../../../../plugins/data/public';
import { METRIC_TYPES } from '../../../common/metric_types';
import { METRIC_TYPES } from '../../../../../../plugins/vis_type_timeseries/common/metric_types';

export function StandardAgg(props) {
const { model, panel, series, fields, uiRestrictions } = props;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {
} from '@elastic/eui';
import { injectI18n, FormattedMessage } from '@kbn/i18n/react';
import { KBN_FIELD_TYPES } from '../../../../../../plugins/data/public';
import { PANEL_TYPES } from '../../../common/panel_types';
import { PANEL_TYPES } from '../../../../../../plugins/vis_type_timeseries/common/panel_types';

const isFieldTypeEnabled = (fieldRestrictions, fieldType) =>
fieldRestrictions.length ? fieldRestrictions.includes(fieldType) : true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@ import {
AUTO_INTERVAL,
} from './lib/get_interval';
import { i18n } from '@kbn/i18n';
import { TIME_RANGE_DATA_MODES, TIME_RANGE_MODE_KEY } from '../../common/timerange_data_modes';
import { PANEL_TYPES } from '../../common/panel_types';
import {
TIME_RANGE_DATA_MODES,
TIME_RANGE_MODE_KEY,
} from '../../../../../plugins/vis_type_timeseries/common/timerange_data_modes';
import { PANEL_TYPES } from '../../../../../plugins/vis_type_timeseries/common/panel_types';
import { isTimerangeModeEnabled } from '../lib/check_ui_restrictions';
import { VisDataContext } from '../contexts/vis_data_context';

Expand Down Expand Up @@ -138,8 +141,8 @@ export const IndexPattern = ({ fields, prefix, onChange, disabled, model: _model
</EuiFormRow>
<EuiText size="xs" style={{ margin: 0 }}>
{i18n.translate('visTypeTimeseries.indexPattern.timeRange.hint', {
defaultMessage: `This setting controls the timespan used for matching documents.
"Entire timerange" will match all the documents selected in the timepicker.
defaultMessage: `This setting controls the timespan used for matching documents.
"Entire timerange" will match all the documents selected in the timepicker.
"Last value" will match only the documents for the specified interval from the end of the timerange.`,
})}
</EuiText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import _ from 'lodash';
import { getLastValue } from '../../../common/get_last_value';
import { getLastValue } from '../../../../../../plugins/vis_type_timeseries/common/get_last_value';
import { createTickFormatter } from './tick_formatter';
import moment from 'moment';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import moment from 'moment';
import { i18n } from '@kbn/i18n';
import { get } from 'lodash';
import { parseEsInterval } from '../../../../data/public';
import { GTE_INTERVAL_RE } from '../../../common/interval_regexp';
import { GTE_INTERVAL_RE } from '../../../../../../plugins/vis_type_timeseries/common/interval_regexp';

export const AUTO_INTERVAL = 'auto';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import _ from 'lodash';
import { newMetricAggFn } from './new_metric_agg_fn';
import { isBasicAgg } from '../../../common/agg_lookup';
import { isBasicAgg } from '../../../../../../plugins/vis_type_timeseries/common/agg_lookup';
import { handleAdd, handleChange } from './collection_actions';

export const seriesChangeHandler = (props, items) => doc => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import {
EuiFieldText,
} from '@elastic/eui';
import { injectI18n, FormattedMessage } from '@kbn/i18n/react';
import { FIELD_TYPES } from '../../../common/field_types';
import { FIELD_TYPES } from '../../../../../../plugins/vis_type_timeseries/common/field_types';
import { STACKED_OPTIONS } from '../../visualizations/constants';

const DEFAULTS = { terms_direction: 'desc', terms_size: 10, terms_order_by: '_count' };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { VisPicker } from './vis_picker';
import { PanelConfig } from './panel_config';
import { createBrushHandler } from '../lib/create_brush_handler';
import { fetchFields } from '../lib/fetch_fields';
import { extractIndexPatterns } from '../../common/extract_index_patterns';
import { extractIndexPatterns } from '../../../../../plugins/vis_type_timeseries/common/extract_index_patterns';
import { esKuery } from '../../../../../plugins/data/public';

import { npStart } from 'ui/new_platform';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
isGteInterval,
AUTO_INTERVAL,
} from './lib/get_interval';
import { PANEL_TYPES } from '../../common/panel_types';
import { PANEL_TYPES } from '../../../../../plugins/vis_type_timeseries/common/panel_types';
import { start as embeddables } from '../../../embeddable_api/public/np_ready/public/legacy';

const MIN_CHART_HEIGHT = 300;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import PropTypes from 'prop-types';
import React from 'react';
import { EuiTabs, EuiTab } from '@elastic/eui';
import { injectI18n } from '@kbn/i18n/react';
import { PANEL_TYPES } from '../../common/panel_types';
import { PANEL_TYPES } from '../../../../../plugins/vis_type_timeseries/common/panel_types';

function VisPickerItem(props) {
const { label, type, selected } = props;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { visWithSplits } from '../../vis_with_splits';
import { createTickFormatter } from '../../lib/tick_formatter';
import _, { get, isUndefined, assign, includes } from 'lodash';
import { Gauge } from '../../../visualizations/views/gauge';
import { getLastValue } from '../../../../common/get_last_value';
import { getLastValue } from '../../../../../../../plugins/vis_type_timeseries/common/get_last_value';

function getColors(props) {
const { model, visData } = props;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { Markdown } from '../../../../../kibana_react/public';
import { ErrorComponent } from '../../error';
import { replaceVars } from '../../lib/replace_vars';
import { convertSeriesToVars } from '../../lib/convert_series_to_vars';
import { isBackgroundInverted } from '../../../../common/set_is_reversed';
import { isBackgroundInverted } from '../../../lib/set_is_reversed';

const getMarkdownId = id => `markdown-${id}`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import { visWithSplits } from '../../vis_with_splits';
import { createTickFormatter } from '../../lib/tick_formatter';
import _, { get, isUndefined, assign, includes, pick } from 'lodash';
import { Metric } from '../../../visualizations/views/metric';
import { getLastValue } from '../../../../common/get_last_value';
import { isBackgroundInverted } from '../../../../common/set_is_reversed';
import { getLastValue } from '../../../../../../../plugins/vis_type_timeseries/common/get_last_value';
import { isBackgroundInverted } from '../../../lib/set_is_reversed';

function getColors(props) {
const { model, visData } = props;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { basicAggs } from '../../../../common/basic_aggs';
import { basicAggs } from '../../../../../../../plugins/vis_type_timeseries/common/basic_aggs';

export function isSortable(metric) {
return basicAggs.includes(metric.type);
Expand Down
Loading

0 comments on commit 3464bb8

Please sign in to comment.