Skip to content

Commit

Permalink
Merge branch '7.9' into 7.9_Definitions_Update_For_Console
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Jul 30, 2020
2 parents f86e989 + b262d55 commit eb573df
Show file tree
Hide file tree
Showing 468 changed files with 14,345 additions and 4,879 deletions.
4 changes: 4 additions & 0 deletions .ci/pipeline-library/src/test/KibanaBasePipelineTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ class KibanaBasePipelineTest extends BasePipelineTest {
return helper.callStack.find { it.methodName == name }
}

def fnMocks(String name) {
helper.callStack.findAll { it.methodName == name }
}

void mockFailureBuild() {
props([
buildUtils: [
Expand Down
63 changes: 63 additions & 0 deletions .ci/pipeline-library/src/test/slackNotifications.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,67 @@ class SlackNotificationsTest extends KibanaBasePipelineTest {
args.blocks[2].text.text.toString()
)
}

@Test
void 'sendFailedBuild() should call slackSend() with a backup message when first attempt fails'() {
mockFailureBuild()
def counter = 0
helper.registerAllowedMethod('slackSend', [Map.class], { ++counter > 1 })
slackNotifications.sendFailedBuild()

def args = fnMocks('slackSend')[1].args[0]

def expected = [
channel: '#kibana-operations-alerts',
username: 'Kibana Operations',
iconEmoji: ':jenkins:',
color: 'danger',
message: ':broken_heart: elastic / kibana # master #1',
]

expected.each {
assertEquals(it.value.toString(), args[it.key].toString())
}

assertEquals(
":broken_heart: *<http://jenkins.localhost:8080/job/elastic+kibana+master/1/|elastic / kibana # master #1>*" +
"\n\nFirst attempt at sending this notification failed. Please check the build.",
args.blocks[0].text.text.toString()
)
}

@Test
void 'getTestFailures() should truncate list of failures to 10'() {
prop('testUtils', [
getFailures: {
return (1..12).collect {
return [
url: Mocks.TEST_FAILURE_URL,
fullDisplayName: "Failure #${it}",
]
}
},
])

def message = (String) slackNotifications.getTestFailures()

assertTrue("Message ends with truncated indicator", message.endsWith("...and 2 more"))
assertTrue("Message contains Failure #10", message.contains("Failure #10"))
assertTrue("Message does not contain Failure #11", !message.contains("Failure #11"))
}

@Test
void 'shortenMessage() should truncate a long message, but leave parts that fit'() {
assertEquals('Hello\nHello\n[...truncated...]', slackNotifications.shortenMessage('Hello\nHello\nthis is a long string', 29))
}

@Test
void 'shortenMessage() should not modify a short message'() {
assertEquals('Hello world', slackNotifications.shortenMessage('Hello world', 11))
}

@Test
void 'shortenMessage() should truncate an entire message with only one part'() {
assertEquals('[...truncated...]', slackNotifications.shortenMessage('Hello world this is a really long message', 40))
}
}
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ kibanaPipeline(timeoutMinutes: 155, checkPrChanges: true, setCommitStatus: true)
'xpack-savedObjectsFieldMetrics': kibanaPipeline.functionalTestProcess('xpack-savedObjectsFieldMetrics', './test/scripts/jenkins_xpack_saved_objects_field_metrics.sh'),
// 'xpack-pageLoadMetrics': kibanaPipeline.functionalTestProcess('xpack-pageLoadMetrics', './test/scripts/jenkins_xpack_page_load_metrics.sh'),
'xpack-securitySolutionCypress': { processNumber ->
whenChanged(['x-pack/plugins/security_solution/', 'x-pack/test/security_solution_cypress/']) {
whenChanged(['x-pack/plugins/security_solution/', 'x-pack/test/security_solution_cypress/', 'x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/', 'x-pack/plugins/triggers_actions_ui/public/application/context/actions_connectors_context.tsx']) {
kibanaPipeline.functionalTestProcess('xpack-securitySolutionCypress', './test/scripts/jenkins_security_solution_cypress.sh')(processNumber)
}
},
Expand Down
18 changes: 0 additions & 18 deletions docs/apm/error-reports-watcher.asciidoc

This file was deleted.

3 changes: 0 additions & 3 deletions docs/apm/how-to-guides.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Learn how to perform common APM app tasks.
* <<agent-configuration>>
* <<apm-alerts>>
* <<custom-links>>
* <<errors-alerts-with-watcher>>
* <<filters>>
* <<machine-learning-integration>>
* <<advanced-queries>>
Expand All @@ -21,8 +20,6 @@ include::apm-alerts.asciidoc[]

include::custom-links.asciidoc[]

include::error-reports-watcher.asciidoc[]

include::filters.asciidoc[]

include::machine-learning.asciidoc[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ export interface RouteConfigOptions<Method extends RouteMethod>
| [authRequired](./kibana-plugin-core-server.routeconfigoptions.authrequired.md) | <code>boolean &#124; 'optional'</code> | Defines authentication mode for a route: - true. A user has to have valid credentials to access a resource - false. A user can access a resource without any credentials. - 'optional'. A user can access a resource if has valid credentials or no credentials at all. Can be useful when we grant access to a resource but want to identify a user if possible.<!-- -->Defaults to <code>true</code> if an auth mechanism is registered. |
| [body](./kibana-plugin-core-server.routeconfigoptions.body.md) | <code>Method extends 'get' &#124; 'options' ? undefined : RouteConfigOptionsBody</code> | Additional body options [RouteConfigOptionsBody](./kibana-plugin-core-server.routeconfigoptionsbody.md)<!-- -->. |
| [tags](./kibana-plugin-core-server.routeconfigoptions.tags.md) | <code>readonly string[]</code> | Additional metadata tag strings to attach to the route. |
| [timeout](./kibana-plugin-core-server.routeconfigoptions.timeout.md) | <code>number</code> | Timeouts for processing durations. Response timeout is in milliseconds. Default value: 2 minutes |
| [xsrfRequired](./kibana-plugin-core-server.routeconfigoptions.xsrfrequired.md) | <code>Method extends 'get' ? never : boolean</code> | Defines xsrf protection requirements for a route: - true. Requires an incoming POST/PUT/DELETE request to contain <code>kbn-xsrf</code> header. - false. Disables xsrf protection.<!-- -->Set to true by default |

Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [RouteConfigOptions](./kibana-plugin-core-server.routeconfigoptions.md) &gt; [timeout](./kibana-plugin-core-server.routeconfigoptions.timeout.md)

## RouteConfigOptions.timeout property

Timeouts for processing durations. Response timeout is in milliseconds. Default value: 2 minutes

<b>Signature:</b>

```typescript
timeout?: number;
```
Binary file modified docs/images/lens_data_info.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/lens_drag_drop.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/lens_suggestions.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/lens_tutorial_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/lens_tutorial_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/lens_tutorial_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/lens_viz_types.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions docs/redirects.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,13 @@ This page was deleted. See <<development-visualize-index>>.
== Developing Visualizations

This page was deleted. See <<development-visualize-index>>.

[role="exclude",id="errors-alerts-with-watcher"]
== Error reports with Watcher

deprecated::[7.9.0]

Watcher error reports have been removed and replaced with Kibana's <<apm-alerts,alerting and actions>> feature.
To create error alerts with new tool, select **Alerts** - **Create threshold alert** - **Error rate**.

More information on this new feature is available in <<apm-alerts>>.
2 changes: 1 addition & 1 deletion docs/settings/reporting-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ You can configure `xpack.reporting` settings in your `kibana.yml` to:
| Set to `false` to disable the {report-features}.

| `xpack.reporting.encryptionKey`
| Set to any text string. By default, {kib} will generate a random key when it
| Set to an alphanumeric, at least 32 characters long text string. By default, {kib} will generate a random key when it
starts, which will cause pending reports to fail after restart. Configure this
setting to preserve the same key across multiple restarts and multiple instances of {kib}.

Expand Down
2 changes: 1 addition & 1 deletion docs/setup/production.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ These can be used to automatically update the list of hosts as a cluster is resi
Kibana has a default maximum memory limit of 1.4 GB, and in most cases, we recommend leaving this unconfigured. In some scenarios, such as large reporting jobs,
it may make sense to tweak limits to meet more specific requirements.

You can modify this limit by setting `--max-old-space-size` in the `node.options` config file that can be found inside `kibana/config` folder or any other configured with the environment variable `KIBANA_PATH_CONF` (for example in debian based system would be `/etc/kibana`).
You can modify this limit by setting `--max-old-space-size` in the `node.options` config file that can be found inside `kibana/config` folder or any other configured with the environment variable `KBN_PATH_CONF` (for example in debian based system would be `/etc/kibana`).

The option accepts a limit in MB:
--------
Expand Down
5 changes: 4 additions & 1 deletion docs/user/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ include::getting-started.asciidoc[]

include::setup.asciidoc[]

include::monitoring/configuring-monitoring.asciidoc[]
include::monitoring/configuring-monitoring.asciidoc[leveloffset=+1]
include::monitoring/monitoring-metricbeat.asciidoc[leveloffset=+2]
include::monitoring/viewing-metrics.asciidoc[leveloffset=+2]
include::monitoring/monitoring-kibana.asciidoc[leveloffset=+2]

include::security/securing-kibana.asciidoc[]

Expand Down
2 changes: 1 addition & 1 deletion docs/user/monitoring/beats-details.asciidoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[role="xpack"]
[[beats-page]]
== Beats Monitoring Metrics
= Beats Monitoring Metrics
++++
<titleabbrev>Beats Metrics</titleabbrev>
++++
Expand Down
2 changes: 0 additions & 2 deletions docs/user/monitoring/cluster-alerts-license.asciidoc

This file was deleted.

7 changes: 4 additions & 3 deletions docs/user/monitoring/cluster-alerts.asciidoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[role="xpack"]
[[cluster-alerts]]
== Cluster Alerts
= Cluster Alerts

The *Stack Monitoring > Clusters* page in {kib} summarizes the status of your
{stack}. You can drill down into the metrics to view more information about your
Expand Down Expand Up @@ -39,11 +39,12 @@ valid for 30 days.
The {monitor-features} check the cluster alert conditions every minute. Cluster
alerts are automatically dismissed when the condition is resolved.

include::cluster-alerts-license.asciidoc[]
NOTE: {watcher} must be enabled to view cluster alerts. If you have a Basic
license, Top Cluster Alerts are not displayed.

[float]
[[cluster-alert-email-notifications]]
==== Email Notifications
== Email Notifications
To receive email notifications for the Cluster Alerts:

1. Configure an email account as described in
Expand Down
6 changes: 1 addition & 5 deletions docs/user/monitoring/configuring-monitoring.asciidoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[role="xpack"]
[[configuring-monitoring]]
== Configure monitoring in {kib}
= Configure monitoring in {kib}
++++
<titleabbrev>Configure monitoring</titleabbrev>
++++
Expand All @@ -16,7 +16,3 @@ You can also use {kib} to

To learn about monitoring in general, see
{ref}/monitor-elasticsearch-cluster.html[Monitor a cluster].

include::monitoring-metricbeat.asciidoc[]
include::viewing-metrics.asciidoc[]
include::monitoring-kibana.asciidoc[]
67 changes: 0 additions & 67 deletions docs/user/monitoring/dashboards.asciidoc

This file was deleted.

Loading

0 comments on commit eb573df

Please sign in to comment.