Skip to content

Commit

Permalink
Merge branch '7.5' into backport/7.5/pr-48508
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Oct 18, 2019
2 parents b7888ee + 8da3235 commit 4a056fe
Show file tree
Hide file tree
Showing 61 changed files with 691 additions and 146 deletions.
2 changes: 1 addition & 1 deletion docs/infrastructure/getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[[xpack-metrics-getting-started]]
== Getting started with infrastructure monitoring

To get started with the Infrastructure app in Kibana, you need to start collecting metrics data for your infrastructure.
To get started with the Metrics app in Kibana, you need to start collecting metrics data for your infrastructure.

Kibana provides step-by-step instructions to help you add metrics data.
The {infra-guide}[Infrastructure Monitoring Guide] is a good source for more detailed information and instructions.
Expand Down
6 changes: 3 additions & 3 deletions docs/infrastructure/index.asciidoc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[role="xpack"]
[[xpack-infra]]
= Infrastructure
= Metrics

[partintro]
--
The Infrastructure app enables you to monitor your infrastructure and identify problems in real time.
The Metrics app enables you to monitor your infrastructure and identify problems in real time.
You start with a visual summary of your infrastructure where you can view basic metrics for common servers, containers, and services.
Then you can drill down to view more detailed metrics or other information for that component.

Expand All @@ -21,7 +21,7 @@ You can optionally save these views and add them to {kibana-ref}/dashboard.html[

* Seamlessly switch to view the corresponding logs, application traces or uptime information for a component.

To get started, you need to <<xpack-metrics-getting-started, start collecting metrics data from your infrastructure>>. Then you can <<infra-ui, use the Infrastructure application to inspect and analyze your data>>.
To get started, you need to <<xpack-metrics-getting-started, start collecting metrics data from your infrastructure>>. Then you can <<infra-ui, use the Metrics application to inspect and analyze your data>>.

[role="screenshot"]
image::infrastructure/images/infra-sysmon.png[Infrastructure Overview in Kibana]
Expand Down
6 changes: 3 additions & 3 deletions docs/infrastructure/infra-ui.asciidoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[role="xpack"]
[[infra-ui]]
== Using the Infrastructure app
== Using the Metrics app

Use the Infrastructure app in {kib} to monitor your infrastructure and identify problems in real time.
Use the Metrics app in {kib} to monitor your infrastructure and identify problems in real time.
You can explore metrics for hosts, containers, and services.
You can also drill down to view more detailed metrics, or seamlessly switch to view the corresponding logs, application traces, and uptime information.

Expand Down Expand Up @@ -62,7 +62,7 @@ Select *Auto-refresh* to keep up-to-date metrics information coming in, or *Stop
[[infra-configure-source]]
=== Configure the data to use for your metrics

The default source configuration for metrics is specified in the {kibana-ref}/infrastructure-ui-settings-kb.html[Infrastructure app settings] in the {kibana-ref}/settings.html[Kibana configuration file].
The default source configuration for metrics is specified in the {kibana-ref}/infrastructure-ui-settings-kb.html[Metrics app settings] in the {kibana-ref}/settings.html[Kibana configuration file].
The default configuration uses the `metricbeat-*` index pattern to query the data.
The default configuration also defines field settings for things like timestamps and container names.

Expand Down
6 changes: 3 additions & 3 deletions docs/infrastructure/metrics-explorer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[[metrics-explorer]]
== Metrics Explorer

Metrics Explorer in the Infrastructure app in Kibana allows you to group and visualise multiple customisable metrics for one or more components in a graphical format.
Metrics Explorer in the Metrics app in Kibana allows you to group and visualise multiple customisable metrics for one or more components in a graphical format.
This can be a starting point for further investigations.
You can also save your views and add them to {kibana-ref}/dashboard.html[dashboards].

Expand All @@ -14,7 +14,7 @@ image::infrastructure/images/metrics-explorer-screen.png[Metrics Explorer in Kib
=== Metrics Explorer requirements and considerations

* Metrics Explorer uses data collected from {metricbeat-ref}/metricbeat-overview.html[Metricbeat].
* You need read permissions on `metricbeat-*` or the metric index specified in the Infrastructure configuration.
* You need read permissions on `metricbeat-*` or the metric index specified in the Metrics configuration.
* Metrics Explorer uses the timestamp field set in the Infrastructure configuration.
By default that is set to `@timestamp`.
* The interval for the X Axis is set to `auto`.
Expand All @@ -30,7 +30,7 @@ After that, we'll filter down to a specific host and explore the outbound traffi
Before we start, if you don't have any Metricbeat data, you'll need to head over to our
{metricbeat-ref}/metricbeat-overview.html[Metricbeat documentation] to install Metricbeat and start collecting data.

1. When you have Metricbeat running and collecting data, open Kibana and navigate to *Infrastructure*.
1. When you have Metricbeat running and collecting data, open Kibana and navigate to *Metrics*.
The *Inventory* tab shows the host or hosts you are monitoring.

2. Select the *Metrics Explorer* tab.
Expand Down
2 changes: 1 addition & 1 deletion docs/infrastructure/view-metrics.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

== Viewing infrastructure metrics

When you select *View Metrics* for a component in your infrastructure from the <<infra-ui, Infrastructure app in Kibana>>, you can view detailed metrics for that component, and for any related components.
When you select *View Metrics* for a component in your infrastructure from the <<infra-ui, Metrics app in Kibana>>, you can view detailed metrics for that component, and for any related components.
You can also view additional component metadata.

[role="screenshot"]
Expand Down
2 changes: 1 addition & 1 deletion docs/logs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The Logs app has a compact, console-like display that you can customize.
You can filter the logs by various fields, start and stop live streaming, and highlight text of interest.

You can open the Logs app from the *Logs* tab in Kibana.
You can also open the Logs app directly from a component in the Infrastructure app.
You can also open the Logs app directly from a component in the Metrics app.
In this case, you will only see the logs for the selected component.

* <<xpack-logs-getting-started>>
Expand Down
2 changes: 1 addition & 1 deletion docs/settings/general-infra-logs-ui-settings.asciidoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
`xpack.infra.enabled`:: Set to `false` to disable the Logs and Infrastructure UI plugin {kib}. Defaults to `true`.
`xpack.infra.enabled`:: Set to `false` to disable the Logs and Metrics UI plugin {kib}. Defaults to `true`.

`xpack.infra.sources.default.logAlias`:: Index pattern for matching indices that contain log data. Defaults to `filebeat-*,kibana_sample_data_logs*`.

Expand Down
8 changes: 4 additions & 4 deletions docs/settings/infrastructure-ui-settings.asciidoc
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[role="xpack"]
[[infrastructure-ui-settings-kb]]
=== Infrastructure UI settings in Kibana
=== Metrics UI settings in Kibana
++++
<titleabbrev>Infrastructure UI settings</titleabbrev>
<titleabbrev>Metrics UI settings</titleabbrev>
++++

You do not need to configure any settings to use the Infrastructure UI. It is enabled by default.
You do not need to configure any settings to use the Metrics UI. It is enabled by default.

[float]
[[general-infra-ui-settings-kb]]
==== General Infrastructure UI settings
==== General Metrics UI settings

include::general-infra-logs-ui-settings.asciidoc[]
2 changes: 1 addition & 1 deletion docs/uptime/overview.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ ID and URL, its IP address, and a dedicated sparkline showing its check status o
image::uptime/images/observability_integrations.png[Observability integrations]

The Monitor list also contains a menu of possible integrations. If Uptime detects Kubernetes or
Docker related host information, it will provide links to open the Infrastructure UI or Logs UI pre-filtered
Docker related host information, it will provide links to open the Metrics UI or Logs UI pre-filtered
for this host. Additionally, this feature supplies links to simply filter the other views on the host's
IP address, to help you quickly determine if these other solutions contain data relevant to your current
interest.
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
"@elastic/filesaver": "1.1.2",
"@elastic/good": "8.1.1-kibana2",
"@elastic/numeral": "2.3.3",
"@elastic/request-crypto": "^1.0.2",
"@elastic/ui-ace": "0.2.3",
"@hapi/wreck": "^15.0.1",
"@kbn/analytics": "1.0.0",
Expand Down
7 changes: 6 additions & 1 deletion packages/kbn-spec-to-console/lib/convert/params.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ module.exports = params => {
result[param] = 0.0;
break;
case 'enum':
result[param] = options;
// This is to clean up entries like: "d (Days)". We only want the "d" part.
if (param === 'time') {
result[param] = options.map(option => option.split(' ')[0]);
} else {
result[param] = options;
}
break;
case 'boolean':
result[param] = '__flag__';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import React, { CSSProperties, useEffect, useRef, useState } from 'react';
import React, { CSSProperties, useCallback, useEffect, useRef, useState } from 'react';
import { EuiToolTip } from '@elastic/eui';
import { i18n } from '@kbn/i18n';

Expand Down Expand Up @@ -143,7 +143,7 @@ function _Editor({ previousStateLocation = 'stored' }: EditorProps) {
};
}, []);

const sendCurrentRequestToES = () => {
const sendCurrentRequestToES = useCallback(() => {
dispatch({
type: 'sendRequestToEs',
value: {
Expand All @@ -153,7 +153,7 @@ function _Editor({ previousStateLocation = 'stored' }: EditorProps) {
history.addToHistory(esPath, esMethod, esData),
},
});
};
}, [settings]);

useEffect(() => {
applyCurrentSettings(editorInstanceRef.current!, settings);
Expand All @@ -167,7 +167,7 @@ function _Editor({ previousStateLocation = 'stored' }: EditorProps) {
sendCurrentRequestToES,
openDocumentation,
});
}, []);
}, [sendCurrentRequestToES]);

return (
<div style={abs} className="conApp">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

interface Actions {
input: any;
input: any; // TODO: Wrap this in an editor interface
sendCurrentRequestToES: () => void;
openDocumentation: () => void;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"url_params": {
"format": "",
"local": "__flag__",
"master_timeout": "",
"h": [],
"help": "__flag__",
"s": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"cat.count": {
"url_params": {
"format": "",
"local": "__flag__",
"master_timeout": "",
"h": [],
"help": "__flag__",
"s": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
"p",
"pb"
],
"local": "__flag__",
"master_timeout": "",
"h": [],
"help": "__flag__",
"s": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@
"cat.health": {
"url_params": {
"format": "",
"local": "__flag__",
"master_timeout": "",
"h": [],
"help": "__flag__",
"s": [],
"time": [
"d",
"h",
"m",
"s",
"ms",
"micros",
"nanos"
],
"ts": "__flag__",
"v": "__flag__"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
"help": "__flag__",
"pri": "__flag__",
"s": [],
"time": [
"d",
"h",
"m",
"s",
"ms",
"micros",
"nanos"
],
"v": "__flag__",
"include_unloaded_segments": "__flag__"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
{
"cat.nodes": {
"url_params": {
"bytes": [
"b",
"k",
"kb",
"m",
"mb",
"g",
"gb",
"t",
"tb",
"p",
"pb"
],
"format": "",
"full_id": "__flag__",
"local": "__flag__",
"master_timeout": "",
"h": [],
"help": "__flag__",
"s": [],
"time": [
"d",
"h",
"m",
"s",
"ms",
"micros",
"nanos"
],
"v": "__flag__"
},
"methods": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
"h": [],
"help": "__flag__",
"s": [],
"time": [
"d",
"h",
"m",
"s",
"ms",
"micros",
"nanos"
],
"v": "__flag__"
},
"methods": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,19 @@
"pb"
],
"detailed": "__flag__",
"master_timeout": "",
"h": [],
"help": "__flag__",
"index": [],
"s": [],
"time": [
"d",
"h",
"m",
"s",
"ms",
"micros",
"nanos"
],
"v": "__flag__"
},
"methods": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
"h": [],
"help": "__flag__",
"s": [],
"time": [
"d",
"h",
"m",
"s",
"ms",
"micros",
"nanos"
],
"v": "__flag__"
},
"methods": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
"h": [],
"help": "__flag__",
"s": [],
"time": [
"d",
"h",
"m",
"s",
"ms",
"micros",
"nanos"
],
"v": "__flag__"
},
"methods": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
"h": [],
"help": "__flag__",
"s": [],
"time": [
"d",
"h",
"m",
"s",
"ms",
"micros",
"nanos"
],
"v": "__flag__"
},
"methods": [
Expand Down
2 changes: 1 addition & 1 deletion src/legacy/ui/ui_render/bootstrap/template.js.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if (window.__kbnStrictCsp__ && window.__kbnCspNotEnforced__) {
function createJavascriptElement(path) {
var dom = document.createElement('script');

dom.setAttribute('async', '');
dom.setAttribute('defer', 'defer');
dom.addEventListener('error', failure);
dom.setAttribute('src', file);
dom.addEventListener('load', next);
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/code/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const code = (kibana: any) =>
// Still keep this config item here for the injectDefaultVars
// in line 40 here.
ui: Joi.object({
enabled: Joi.boolean().default(true),
enabled: Joi.boolean().default(false),
}).default(),
integrations: Joi.object({
enabled: Joi.boolean().default(false),
Expand Down
Loading

0 comments on commit 4a056fe

Please sign in to comment.