Skip to content

Commit

Permalink
Merge branch '7.x' into backport/7.x/pr-49390
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Oct 28, 2019
2 parents 141c981 + 405d12a commit b9464bd
Show file tree
Hide file tree
Showing 263 changed files with 4,260 additions and 1,982 deletions.
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"data": ["src/legacy/core_plugins/data", "src/plugins/data"],
"expressions": "src/legacy/core_plugins/expressions",
"kibana_react": "src/legacy/core_plugins/kibana_react",
"navigation": "src/legacy/core_plugins/navigation",
"server": "src/legacy/server",
"console": "src/legacy/core_plugins/console",
"core": "src/core",
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/tutorial-full-experience.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ At this point, you're ready to use the Elasticsearch {ref}/docs-bulk.html[bulk]
API to load the data sets:

[source,shell]
curl -u elastic -H 'Content-Type: application/x-ndjson' -XPOST '<host>:<port>/bank/account/_bulk?pretty' --data-binary @accounts.json
curl -u elastic -H 'Content-Type: application/x-ndjson' -XPOST '<host>:<port>/bank/_bulk?pretty' --data-binary @accounts.json
curl -u elastic -H 'Content-Type: application/x-ndjson' -XPOST '<host>:<port>/shakespeare/_bulk?pretty' --data-binary @shakespeare.json
curl -u elastic -H 'Content-Type: application/x-ndjson' -XPOST '<host>:<port>/_bulk?pretty' --data-binary @logs.jsonl

Expand Down
2 changes: 1 addition & 1 deletion docs/infrastructure/getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
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.
The {metrics-guide}[Metrics Monitoring Guide] is a good source for more detailed information and instructions.

[role="screenshot"]
image::infrastructure/images/metrics-add-data.png[Screenshot showing Add metric data to Kibana UI]
19 changes: 10 additions & 9 deletions docs/infrastructure/infra-ui.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -62,29 +62,30 @@ 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

If your metrics have custom index patterns, or use non-default field settings, you can override the default configuration settings.

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.

If your metrics have custom index patterns, or use non-default field settings, you can override the default settings.
Click *Configuration* to change the settings.
This opens the *Configure source* fly-out dialog.
To change the configuration settings, click the *Settings* tab.

NOTE: These settings are shared with logs. Changes you make here may also affect the settings used by the *Logs* app.

In the *Configure source* dialog, you can change the following values:
In the *Settings* tab, you can change the values in these sections:

* *Name*: the name of the source configuration
* *Indices*: the index pattern or patterns in the Elasticsearch indices to read metrics data and log data
from
* *Indices*: the index pattern or patterns in the Elasticsearch indices to read metrics data and log data from
* *Fields*: the names of specific fields in the indices that are used to query and interpret the data correctly

TIP: If <<xpack-spaces>> are enabled in your Kibana instance, any configuration changes you make here are specific to the current space.
You can make different subsets of data available by creating multiple spaces with different data source configurations.
When you have completed your changes, click *Apply*.

TIP: If you don't see the *Configuration* option, you may not have sufficient privileges to change the source configuration.
If the fields are greyed out and cannot be edited, you may not have sufficient privileges to change the source configuration.
For more information see <<xpack-security-authorization>>.

TIP: If <<xpack-spaces>> are enabled in your Kibana instance, any configuration changes you make here are specific to the current space.
You can make different subsets of data available by creating multiple spaces with different data source configurations.

[float]
[[infra-metrics-explorer]]
=== Visualize multiple metrics in Metrics Explorer
Expand Down
44 changes: 20 additions & 24 deletions docs/logs/configuring.asciidoc
Original file line number Diff line number Diff line change
@@ -1,50 +1,46 @@
[role="xpack"]
[[xpack-logs-configuring]]

:ecs-link: {ecs-ref}[Elastic Common Schema (ECS)]
:ecs-base-link: {ecs-ref}/ecs-base.html[base]

== Configuring the Logs data

The default source configuration for logs is specified in the {kibana-ref}/logs-ui-settings-kb.html[Logs app settings] in the {kibana-ref}/settings.html[Kibana configuration file].
The default configuration uses the `filebeat-*` index pattern to query the data.
The default configuration also defines field settings for things like timestamps and container names, and the default columns to show in the logs pane.
The default configuration also defines field settings for things like timestamps and container names, and the default columns to show in the logs stream.

If your logs have custom index patterns, or use non-default field settings, or contain parsed fields which you want to expose as individual columns, you can override the default settings.
Click *Configuration* to change the settings.
This opens the *Configure source* fly-out dialog.
If your logs have custom index patterns, use non-default field settings, or contain parsed fields which you want to expose as individual columns, you can override the default configuration settings.

NOTE: These settings are shared with metrics. Changes you make here may also affect the settings used by the *Metrics* app.

TIP: If <<xpack-spaces>> are enabled in your Kibana instance, any configuration changes you make here are specific to the current space.
You can make different subsets of data available by creating multiple spaces with different data source configurations.
To change the configuration settings, click the *Settings* tab.

TIP: If you don't see the *Configuration* option, you may not have sufficient privileges to change the source configuration.
For more information see <<xpack-security-authorization>>.

[float]
=== Indices and fields tab
NOTE: These settings are shared with metrics. Changes you make here may also affect the settings used by the *Metrics* app.

In the *Indices and fields* tab, you can change the following values:
In the *Settings* tab, you can change the values in these sections:

* *Name*: the name of the source configuration
* *Indices*: the index pattern or patterns in the Elasticsearch indices to read metrics data and log data from
* *Fields*: the names of specific fields in the indices that are used to query and interpret the data correctly
* *Log columns*: the columns that are shown in the logs stream

[float]
==== Log columns configuration

In the *Log columns* tab you can change the columns that are displayed in the Logs app.
By default the following columns are shown:
By default the logs stream shows following columns:

* *Timestamp*: The timestamp of the log entry from the `timestamp` field.
* *Message*: The message extracted from the document.
The content of this field depends on the type of log message.
If no special log message type is detected, the {ecs-link} field `message` is used.
// ++ add a better link. The actual page location is ecs-base
If no special log message type is detected, the Elastic Common Schema (ECS) {ecs-base-link} field, `message`, is used.

To add a new column, click *Add column*.
To add a new column to the logs stream, in the *Settings* tab, click *Add column*.
In the list of available fields, select the field you want to add.
You can start typing a field name in the search box to filter the field list by that name.

To remove an existing column, click the *Remove this column* icon
image:logs/images/logs-configure-source-dialog-remove-column-button.png[Remove column].
image:logs/images/logs-configure-source-dialog-remove-column-button.png[Remove column].

When you have completed your changes, click *Apply*.

If the fields are greyed out and cannot be edited, you may not have sufficient privileges to change the source configuration.
For more information see <<xpack-security-authorization>>.

TIP: If <<xpack-spaces>> are enabled in your Kibana instance, any configuration changes you make here are specific to the current space.
You can make different subsets of data available by creating multiple spaces with different data source configurations.

2 changes: 1 addition & 1 deletion docs/logs/getting-started.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
To get started with the Logs app in Kibana, you need to start collecting logs data for your infrastructure.

Kibana provides step-by-step instructions to help you add logs data.
The {infra-guide}[Infrastructure Monitoring Guide] is a good source for more detailed information and instructions.
The {logs-guide}[Logs Monitoring Guide] is a good source for more detailed information and instructions.

[role="screenshot"]
image::logs/images/logs-add-data.png[Screenshot showing Add logging data in Kibana]
9 changes: 7 additions & 2 deletions docs/logs/using.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ To quickly jump to a nearby point in time, click the minimap timeline to the rig
Click *Customize* to customize the view.
Here, you can set the scale to use for the minimap timeline, choose whether to wrap long lines, and choose your preferred text size.

[float]
=== Configuring the data to use for your logs

If your logs have custom index patterns, use non-default field settings, or contain parsed fields which you want to expose as individual columns, you can <<xpack-logs-configuring, override the default configuration settings>>.

[float]
[[logs-stream]]
=== Stream or pause logs
Expand Down Expand Up @@ -70,10 +75,10 @@ To highlight a word or phrase in the logs stream, click *Highlights* and enter y
To inspect a log event, hover over it, then click the *View details* icon image:logs/images/logs-view-event.png[View event icon] beside the event.
This opens the *Log event document details* fly-out that shows the fields associated with the log event.

To quickly filter the logs stream by one of the field values, click the *View event with filter* icon image:logs/images/logs-view-event-with-filter.png[View event icon] beside the field.
To quickly filter the logs stream by one of the field values, in the log event details, click the *View event with filter* icon image:logs/images/logs-view-event-with-filter.png[View event icon] beside the field.
This automatically adds a search filter to the logs stream to filter the entries by this field and value.

In the log event details, click *Actions* to see the other actions related to the event.
To see other actions related to the event, in the log event details, click *Actions*.
Depending on the event and the features you have installed and configured, you may also be able to:

* Select *View status in Uptime* to <<uptime-overview, view related uptime information>> in the *Uptime* app.
Expand Down
43 changes: 35 additions & 8 deletions packages/kbn-expect/expect.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ Assertion.prototype.assert = function (truth, msg, error, expected) {

if (!ok) {
err = new Error(msg.call(this));
if (this.customMsg) {
err.message = this.customMsg;
}
if (arguments.length > 3) {
err.actual = this.obj;
err.expected = expected;
Expand Down Expand Up @@ -217,7 +220,10 @@ Assertion.prototype.empty = function () {
*/

Assertion.prototype.be =
Assertion.prototype.equal = function (obj) {
Assertion.prototype.equal = function (obj, msg) {
if (typeof(msg) === 'string') {
this.customMsg = msg;
}
this.assert(
obj === this.obj
, function(){ return 'expected ' + i(this.obj) + ' to equal ' + i(obj) }
Expand All @@ -231,7 +237,10 @@ Assertion.prototype.equal = function (obj) {
* @api public
*/

Assertion.prototype.eql = function (obj) {
Assertion.prototype.eql = function (obj, msg) {
if (typeof(msg) === 'string') {
this.customMsg = msg;
}
this.assert(
expect.eql(this.obj, obj)
, function(){ return 'expected ' + i(this.obj) + ' to sort of equal ' + i(obj) }
Expand All @@ -248,7 +257,10 @@ Assertion.prototype.eql = function (obj) {
* @api public
*/

Assertion.prototype.within = function (start, finish) {
Assertion.prototype.within = function (start, finish, msg) {
if (typeof(msg) === 'string') {
this.customMsg = msg;
}
var range = start + '..' + finish;
this.assert(
this.obj >= start && this.obj <= finish
Expand Down Expand Up @@ -298,7 +310,10 @@ Assertion.prototype.an = function (type) {
*/

Assertion.prototype.greaterThan =
Assertion.prototype.above = function (n) {
Assertion.prototype.above = function (n, msg) {
if (typeof(msg) === 'string') {
this.customMsg = msg;
}
this.assert(
this.obj > n
, function(){ return 'expected ' + i(this.obj) + ' to be above ' + n }
Expand All @@ -314,7 +329,10 @@ Assertion.prototype.above = function (n) {
*/

Assertion.prototype.lessThan =
Assertion.prototype.below = function (n) {
Assertion.prototype.below = function (n, msg) {
if (typeof(msg) === 'string') {
this.customMsg = msg;
}
this.assert(
this.obj < n
, function(){ return 'expected ' + i(this.obj) + ' to be below ' + n }
Expand All @@ -329,7 +347,10 @@ Assertion.prototype.below = function (n) {
* @api public
*/

Assertion.prototype.match = function (regexp) {
Assertion.prototype.match = function (regexp, msg) {
if (typeof(msg) === 'string') {
this.customMsg = msg;
}
this.assert(
regexp.exec(this.obj)
, function(){ return 'expected ' + i(this.obj) + ' to match ' + regexp }
Expand All @@ -344,7 +365,10 @@ Assertion.prototype.match = function (regexp) {
* @api public
*/

Assertion.prototype.length = function (n) {
Assertion.prototype.length = function (n, msg) {
if (typeof(msg) === 'string') {
this.customMsg = msg;
}
expect(this.obj).to.have.property('length');
var len = this.obj.length;
this.assert(
Expand Down Expand Up @@ -410,7 +434,10 @@ Assertion.prototype.property = function (name, val) {
*/

Assertion.prototype.string =
Assertion.prototype.contain = function (obj) {
Assertion.prototype.contain = function (obj, msg) {
if (typeof(msg) === 'string') {
this.customMsg = msg;
}
if ('string' == typeof this.obj) {
this.assert(
~this.obj.indexOf(obj)
Expand Down
26 changes: 13 additions & 13 deletions packages/kbn-expect/expect.js.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,20 @@ interface Assertion {
/**
* Checks if the obj exactly equals another.
*/
equal(obj: any): Assertion;
equal(obj: any, msg?: string): Assertion;

/**
* Checks if the obj sortof equals another.
*/
eql(obj: any): Assertion;
eql(obj: any, msg?: string): Assertion;

/**
* Assert within start to finish (inclusive).
*
* @param start
* @param finish
*/
within(start: number, finish: number): Assertion;
within(start: number, finish: number, msg?: string): Assertion;

/**
* Assert typeof.
Expand All @@ -87,36 +87,36 @@ interface Assertion {
/**
* Assert numeric value above n.
*/
greaterThan(n: number): Assertion;
greaterThan(n: number, msg?: string): Assertion;

/**
* Assert numeric value above n.
*/
above(n: number): Assertion;
above(n: number, msg?: string): Assertion;

/**
* Assert numeric value below n.
*/
lessThan(n: number): Assertion;
lessThan(n: number, msg?: string): Assertion;

/**
* Assert numeric value below n.
*/
below(n: number): Assertion;
below(n: number, msg?: string): Assertion;

/**
* Assert string value matches regexp.
*
* @param regexp
*/
match(regexp: RegExp): Assertion;
match(regexp: RegExp, msg?: string): Assertion;

/**
* Assert property "length" exists and has value of n.
*
* @param n
*/
length(n: number): Assertion;
length(n: number, msg?: string): Assertion;

/**
* Assert property name exists, with optional val.
Expand All @@ -129,14 +129,14 @@ interface Assertion {
/**
* Assert that string contains str.
*/
contain(str: string): Assertion;
string(str: string): Assertion;
contain(str: string, msg?: string): Assertion;
string(str: string, msg?: string): Assertion;

/**
* Assert that the array contains obj.
*/
contain(obj: any): Assertion;
string(obj: any): Assertion;
contain(obj: any, msg?: string): Assertion;
string(obj: any, msg?: string): Assertion;

/**
* Assert exact keys or inclusion of keys by using the `.own` modifier.
Expand Down
Loading

0 comments on commit b9464bd

Please sign in to comment.