Skip to content

Commit

Permalink
Merge branch 'stale-filters' of https://github.com/shahzad31/kibana i…
Browse files Browse the repository at this point in the history
…nto stale-filters
  • Loading branch information
shahzad31 committed May 11, 2020
2 parents 14667f2 + d28eaba commit bc6e7fe
Show file tree
Hide file tree
Showing 825 changed files with 14,246 additions and 6,709 deletions.
2 changes: 1 addition & 1 deletion .backportrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
],
"targetPRLabels": ["backport"],
"branchLabelMapping": {
"^v7.8.0$": "7.x",
"^v7.9.0$": "7.x",
"^v(\\d+).(\\d+).\\d+$": "$1.$2"
}
}
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ module.exports = {
files: ['x-pack/plugins/lens/**/*.{js,ts,tsx}'],
rules: {
'react-hooks/exhaustive-deps': 'off',
'react-hooks/rules-of-hooks': 'off',
},
},
{
Expand Down Expand Up @@ -238,6 +237,7 @@ module.exports = {
],
from: [
'(src|x-pack)/plugins/**/(public|server)/**/*',
'!(src|x-pack)/plugins/**/(public|server)/mocks/index.{js,ts}',
'!(src|x-pack)/plugins/**/(public|server)/(index|mocks).{js,ts,tsx}',
],
allowSameFolder: true,
Expand Down
4 changes: 2 additions & 2 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"kibana_utils": "src/plugins/kibana_utils",
"navigation": "src/plugins/navigation",
"newsfeed": "src/plugins/newsfeed",
"regionMap": "src/legacy/core_plugins/region_map",
"regionMap": "src/plugins/region_map",
"savedObjects": "src/plugins/saved_objects",
"savedObjectsManagement": "src/plugins/saved_objects_management",
"server": "src/legacy/server",
Expand All @@ -43,7 +43,7 @@
"src/plugins/telemetry",
"src/plugins/telemetry_management_section"
],
"tileMap": "src/legacy/core_plugins/tile_map",
"tileMap": "src/plugins/tile_map",
"timelion": ["src/legacy/core_plugins/timelion", "src/plugins/vis_type_timelion"],
"uiActions": "src/plugins/ui_actions",
"visDefaultEditor": "src/plugins/vis_default_editor",
Expand Down
Binary file added docs/apm/images/apm-service-map-anomaly.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 added docs/apm/images/green-service.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 added docs/apm/images/red-service.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/apm/images/service-maps.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 added docs/apm/images/yellow-service.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 14 additions & 5 deletions docs/apm/machine-learning.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,31 @@
<titleabbrev>Integrate with machine learning</titleabbrev>
++++

The Machine Learning integration will initiate a new job predefined to calculate anomaly scores on transaction response times.
The response time graph will show the expected bounds and add an annotation when the anomaly score is 75 or above.
Jobs can be created per transaction type, and based on the average response time.
Manage jobs in the *Machine Learning jobs management*.
The Machine Learning integration initiates a new job predefined to calculate anomaly scores on APM transaction durations.
Jobs can be created per transaction type, and are based on the service's average response time.

After a machine learning job is created, results are shown in two places:

The transaction duration graph will show the expected bounds and add an annotation when the anomaly score is 75 or above.

[role="screenshot"]
image::apm/images/apm-ml-integration.png[Example view of anomaly scores on response times in the APM app]

Service maps will display a color-coded anomaly indicator based on the detected anomaly score.

[role="screenshot"]
image::apm/images/apm-ml-integration.png[Example view of anomaly scores on response times in APM app in Kibana]
image::apm/images/apm-service-map-anomaly.png[Example view of anomaly scores on service maps in the APM app]

[float]
[[create-ml-integration]]
=== Create a new machine learning job

To enable machine learning anomaly detection, first choose a service to monitor.
Then, select **Integrations** > **Enable ML anomaly detection** and click **Create job**.

That's it! After a few minutes, the job will begin calculating results;
it might take additional time for results to appear on your graph.
Jobs can be managed in *Machine Learning jobs management*.

APM specific anomaly detection wizards are also available for certain Agents.
See the machine learning {ml-docs}/ootb-ml-jobs-apm.html[APM anomaly detection configurations] for more information.
24 changes: 23 additions & 1 deletion docs/apm/service-maps.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ Please use Chrome or Firefox if available.

A service map is a real-time visual representation of the instrumented services in your application's architecture.
It shows you how these services are connected, along with high-level metrics like average transaction duration,
requests per minute, and errors per minute, that allow you to quickly assess the status of your services.
requests per minute, and errors per minute.
If enabled, service maps also integrate with machine learning--for real time health indicators based on anomaly detection scores.
All of these features can help you to quickly and visually assess the status and health of your services.

We currently surface two types of service maps:

Expand Down Expand Up @@ -52,6 +54,26 @@ Additional filters are not currently available for service maps.
[role="screenshot"]
image::apm/images/service-maps-java.png[Example view of service maps with Java highlighted in the APM app in Kibana]

[float]
[[service-map-anomaly-detection]]
=== Anomaly detection with machine learning

Machine learning jobs can be created to calculate anomaly scores on APM transaction durations within the selected service.
When these jobs are active, service maps will display a color-coded anomaly indicator based on the detected anomaly score:

[horizontal]
image:apm/images/green-service.png[APM green service]:: Max anomaly score **<=25**. Service is healthy.
image:apm/images/yellow-service.png[APM yellow service]:: Max anomaly score **26-74**. Anomalous activity detected. Service may be degraded.
image:apm/images/red-service.png[APM red service]:: Max anomaly score **>=75**. Anomalous activity detected. Service is unhealthy.

[role="screenshot"]
image::apm/images/apm-service-map-anomaly.png[Example view of anomaly scores on service maps in the APM app]

If an anomaly has been detected, click *view anomalies* to view the anomaly detection metric viewier in the Machine learning app.
This time series analysis will display additional details on the severity and time of the detected anomalies.

To learn how to create a machine learning job, see <<machine-learning-integration,machine learning integration>>.

[float]
[[service-maps-legend]]
=== Legend
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- 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; [SavedObjectsMigrationLogger](./kibana-plugin-core-server.savedobjectsmigrationlogger.md) &gt; [error](./kibana-plugin-core-server.savedobjectsmigrationlogger.error.md)

## SavedObjectsMigrationLogger.error property

<b>Signature:</b>

```typescript
error: (msg: string, meta: LogMeta) => void;
```
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export interface SavedObjectsMigrationLogger
| Property | Type | Description |
| --- | --- | --- |
| [debug](./kibana-plugin-core-server.savedobjectsmigrationlogger.debug.md) | <code>(msg: string) =&gt; void</code> | |
| [error](./kibana-plugin-core-server.savedobjectsmigrationlogger.error.md) | <code>(msg: string, meta: LogMeta) =&gt; void</code> | |
| [info](./kibana-plugin-core-server.savedobjectsmigrationlogger.info.md) | <code>(msg: string) =&gt; void</code> | |
| [warn](./kibana-plugin-core-server.savedobjectsmigrationlogger.warn.md) | <code>(msg: string) =&gt; void</code> | |
| [warning](./kibana-plugin-core-server.savedobjectsmigrationlogger.warning.md) | <code>(msg: string) =&gt; void</code> | |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export declare class IndexPattern implements IIndexPattern
| [formatHit](./kibana-plugin-plugins-data-public.indexpattern.formathit.md) | | <code>any</code> | |
| [id](./kibana-plugin-plugins-data-public.indexpattern.id.md) | | <code>string</code> | |
| [metaFields](./kibana-plugin-plugins-data-public.indexpattern.metafields.md) | | <code>string[]</code> | |
| [routes](./kibana-plugin-plugins-data-public.indexpattern.routes.md) | | <code>{</code><br/><code> edit: string;</code><br/><code> addField: string;</code><br/><code> indexedFields: string;</code><br/><code> scriptedFields: string;</code><br/><code> sourceFilters: string;</code><br/><code> }</code> | |
| [timeFieldName](./kibana-plugin-plugins-data-public.indexpattern.timefieldname.md) | | <code>string &#124; undefined</code> | |
| [title](./kibana-plugin-plugins-data-public.indexpattern.title.md) | | <code>string</code> | |
| [type](./kibana-plugin-plugins-data-public.indexpattern.type.md) | | <code>string</code> | |
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ indexPatterns: {
validate: typeof validateIndexPattern;
getFromSavedObject: typeof getFromSavedObject;
flattenHitWrapper: typeof flattenHitWrapper;
getRoutes: typeof getRoutes;
formatHitProvider: typeof formatHitProvider;
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-plugins-data-server](./kibana-plugin-plugins-data-server.md) &gt; [IIndexPattern](./kibana-plugin-plugins-data-server.iindexpattern.md) &gt; [getTimeField](./kibana-plugin-plugins-data-server.iindexpattern.gettimefield.md)

## IIndexPattern.getTimeField() method

<b>Signature:</b>

```typescript
getTimeField?(): IFieldType | undefined;
```
<b>Returns:</b>
`IFieldType | undefined`
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@ export interface IIndexPattern
| [title](./kibana-plugin-plugins-data-server.iindexpattern.title.md) | <code>string</code> | |
| [type](./kibana-plugin-plugins-data-server.iindexpattern.type.md) | <code>string</code> | |

## Methods

| Method | Description |
| --- | --- |
| [getTimeField()](./kibana-plugin-plugins-data-server.iindexpattern.gettimefield.md) | |

Binary file modified docs/management/alerting/images/alerts-and-actions-ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/management/alerting/images/alerts-details-muting.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/management/alerting/images/alerts-filter-by-action-type.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/management/alerting/images/alerts-filter-by-type.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/management/alerting/images/individual-mute-disable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 2 additions & 4 deletions docs/user/alerting/action-types.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@ see https://www.elastic.co/subscriptions[the subscription page].
[[create-connectors]]
=== Preconfigured connectors and action types

You can create connectors for actions in <<managing-alerts-and-actions, Alerts and Actions>> or via the action API.
For out-of-the-box and standardized connectors, you can <<pre-configured-connectors, preconfigure connectors>>
For out-of-the-box and standardized connectors, you can <<preconfigured-connector-example, preconfigure connectors>>
before {kib} starts.

Action type with only preconfigured connectors could be specified as a <<pre-configured-action-types, preconfigured action type>>.
If you preconfigure a connector, you can also <<preconfigured-action-type-example, preconfigure its action type>>.

include::action-types/email.asciidoc[]
include::action-types/index.asciidoc[]
Expand All @@ -56,4 +55,3 @@ include::action-types/server-log.asciidoc[]
include::action-types/slack.asciidoc[]
include::action-types/webhook.asciidoc[]
include::pre-configured-connectors.asciidoc[]
include::pre-configured-action-types.asciidoc[]
31 changes: 31 additions & 0 deletions docs/user/alerting/action-types/email.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,37 @@ Username:: username for 'login' type authentication.
Password:: password for 'login' type authentication.

[float]
[[Preconfigured-email-configuration]]
==== Preconfigured action type

[source,text]
--
my-email:
name: preconfigured-email-action-type
actionTypeId: .email
config:
from: testsender@test.com <1.1>
host: validhostname <1.2>
port: 8080 <1.3>
secure: false <1.4>
secrets:
user: testuser <2.1>
password: passwordkeystorevalue <2.2>
--

`config` defines the action type specific to the configuration and contains the following properties:

<1.1> `from:` is an email address and correspond to *Sender*.
<1.2> `host:` is a string and correspond to *Host*.
<1.3> `port:` is a number and correspond to *Port*.
<1.4> `secure:` is a boolean and correspond to *Secure*.

`secrets` defines action type sensitive configuration:

<2.1> `user:` is a string and correspond to *User*.
<2.2> `password:` is a string and correspond to *Password*. Should be stored in the <<creating-keystore, {kib} keystore>>.


[[email-action-configuration]]
==== Action configuration

Expand Down
22 changes: 22 additions & 0 deletions docs/user/alerting/action-types/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,28 @@ Index:: The {es} index to be written to.
Refresh:: Setting for the {ref}/docs-refresh.html[refresh] policy for the write request.
Execution time field:: This field will be automatically set to the time the alert condition was detected.

[float]
[[Preconfigured-index-configuration]]
==== Preconfigured action type

[source,text]
--
my-index:
name: action-type-index
actionTypeId: .index
config:
index: .kibana <1>
refresh: true <2>
executionTimeField: somedate <3>
--

`config` defines the action type specific to the configuration and contains the following properties:

<1> `index:` is a string and correspond to *Index*.
<2> `refresh:` is a boolean and correspond to *Refresh*.
<3> `executionTimeField:` is a string and correspond to *Execution time field*.


[float]
[[index-action-configuration]]
==== Action configuration
Expand Down
23 changes: 23 additions & 0 deletions docs/user/alerting/action-types/pagerduty.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,29 @@ Name:: The name of the connector. The name is used to identify a connector
API URL:: An optional PagerDuty event URL. Defaults to `https://events.pagerduty.com/v2/enqueue`. If you are using the <<action-settings, `xpack.actions.whitelistedHosts`>> setting, make sure the hostname is whitelisted.
Integration Key:: A 32 character PagerDuty Integration Key for an integration on a service, also referred to as the routing key.

[float]
[[Preconfigured-pagerduty-configuration]]
==== Preconfigured action type

[source,text]
--
my-pagerduty:
name: preconfigured-pagerduty-action-type
actionTypeId: .pagerduty
config:
apiUrl: https://test.host <1.1>
secrets:
routingKey: testroutingkey <2.1>
--

`config` defines the action type specific to the configuration and contains the following properties:

<1.1> `apiUrl:` is URL string and correspond to *API URL*.

`secrets` defines action type sensitive configuration:

<2.1> `routingKey:` is a string and correspond to *Integration Key*.

[float]
[[pagerduty-action-configuration]]
==== Action configuration
Expand Down
11 changes: 11 additions & 0 deletions docs/user/alerting/action-types/server-log.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ Server log connectors have the following configuration properties:

Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.

[float]
[[Preconfigured-server-log-configuration]]
==== Preconfigured action type

[source,text]
--
my-server-log:
name: test
actionTypeId: .server-log
--

[float]
[[server-log-action-configuration]]
==== Action configuration
Expand Down
18 changes: 18 additions & 0 deletions docs/user/alerting/action-types/slack.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,24 @@ Slack connectors have the following configuration properties:
Name:: The name of the connector. The name is used to identify a connector in the management UI connector listing, or in the connector list when configuring an action.
Webhook URL:: The URL of the incoming webhook. See https://api.slack.com/messaging/webhooks#getting_started[Slack Incoming Webhooks] for instructions on generating this URL. If you are using the <<action-settings, `xpack.actions.whitelistedHosts`>> setting, make sure the hostname is whitelisted.

[float]
[[Preconfigured-slack-configuration]]
==== Preconfigured action type

[source,text]
--
my-slack:
name: preconfigured-slack-action-type
actionTypeId: .slack
config:
webhookUrl: 'https://hooks.slack.com/services/abcd/efgh/ijklmnopqrstuvwxyz' <1>
--

`config` defines the action type specific to the configuration and contains the following properties:

<1> `webhookUrl:` is URL string and correspond to *Webhook URL*.


[float]
[[slack-action-configuration]]
==== Action configuration
Expand Down
30 changes: 30 additions & 0 deletions docs/user/alerting/action-types/webhook.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,36 @@ Headers:: A set of key-value pairs sent as headers with the request
User:: An optional username. If set, HTTP basic authentication is used. Currently only basic authentication is supported.
Password:: An optional password. If set, HTTP basic authentication is used. Currently only basic authentication is supported.

[float]
[[Preconfigured-webhook-configuration]]
==== Preconfigured action type

[source,text]
--
my-webhook:
name: preconfigured-webhook-action-type
actionTypeId: .webhook
config:
url: https://test.host <1.1>
method: POST <1.2>
headers: <1.3>
testheader: testvalue
secrets:
user: testuser <2.1>
password: passwordkeystorevalue <2.2>
--

`config` defines the action type specific to the configuration and contains the following properties:

<1.1> `url:` is URL string and correspond to *URL*.
<1.2> `method:` is a string and correspond to *Method*.
<1.3> `headers:` is Record<String, String> and correspond to *Headers*.

`secrets` defines action type sensitive configuration:

<2.1> `user:` is a string and correspond to *User*.
<2.2> `password:` is a string and correspond to *Password*. Should be stored in the <<creating-keystore, {kib} keystore>>.

[float]
[[webhook-action-configuration]]
==== Action configuration
Expand Down
Loading

0 comments on commit bc6e7fe

Please sign in to comment.