Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/elastic/kibana into add-d…
Browse files Browse the repository at this point in the history
…efault-inventory-view
  • Loading branch information
phillipb committed Jun 29, 2020
2 parents 11a7a5a + 9c965fe commit d1dda40
Show file tree
Hide file tree
Showing 954 changed files with 21,939 additions and 10,524 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ module.exports = {
{
// typescript only for front and back end
files: [
'x-pack/{,legacy/}plugins/{alerting,alerting_builtins,actions,task_manager,event_log}/**/*.{ts,tsx}',
'x-pack/{,legacy/}plugins/{alerts,alerting_builtins,actions,task_manager,event_log}/**/*.{ts,tsx}',
],
rules: {
'@typescript-eslint/no-explicit-any': 'error',
Expand Down
6 changes: 6 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,19 @@

# Kibana Telemetry
/packages/kbn-analytics/ @elastic/kibana-telemetry
/packages/kbn-telemetry-tools/ @elastic/kibana-telemetry
/src/plugins/kibana_usage_collection/ @elastic/kibana-telemetry
/src/plugins/newsfeed/ @elastic/kibana-telemetry
/src/plugins/telemetry/ @elastic/kibana-telemetry
/src/plugins/telemetry_collection_manager/ @elastic/kibana-telemetry
/src/plugins/telemetry_management_section/ @elastic/kibana-telemetry
/src/plugins/usage_collection/ @elastic/kibana-telemetry
/x-pack/plugins/telemetry_collection_xpack/ @elastic/kibana-telemetry
/.telemetryrc.json @elastic/kibana-telemetry
/x-pack/.telemetryrc.json @elastic/kibana-telemetry
src/plugins/telemetry/schema/legacy_oss_plugins.json @elastic/kibana-telemetry
src/plugins/telemetry/schema/oss_plugins.json @elastic/kibana-telemetry
x-pack/plugins/telemetry_collection_xpack/schema/xpack_plugins.json @elastic/kibana-telemetry

# Kibana Alerting Services
/x-pack/plugins/alerts/ @elastic/kibana-alerting-services
Expand Down
25 changes: 25 additions & 0 deletions .telemetryrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[
{
"output": "src/plugins/telemetry/schema/legacy_oss_plugins.json",
"root": "src/legacy/core_plugins/",
"exclude": [
"src/legacy/core_plugins/testbed",
"src/legacy/core_plugins/elasticsearch",
"src/legacy/core_plugins/tests_bundle"
]
},
{
"output": "src/plugins/telemetry/schema/oss_plugins.json",
"root": "src/plugins/",
"exclude": [
"src/plugins/kibana_react/",
"src/plugins/testbed/",
"src/plugins/kibana_utils/",
"src/plugins/kibana_usage_collection/server/collectors/kibana/kibana_usage_collector.ts",
"src/plugins/kibana_usage_collection/server/collectors/application_usage/telemetry_application_usage_collector.ts",
"src/plugins/kibana_usage_collection/server/collectors/management/telemetry_management_collector.ts",
"src/plugins/kibana_usage_collection/server/collectors/ui_metric/telemetry_ui_metric_collector.ts",
"src/plugins/telemetry/server/collectors/usage/telemetry_usage_collector.ts"
]
}
]
23 changes: 21 additions & 2 deletions docs/apm/apm-alerts.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,20 @@ and enables central management of all alerts from <<management,Kibana Management
[role="screenshot"]
image::apm/images/apm-alert.png[Create an alert in the APM app]

There are two different types of threshold alerts: transaction duration, and error rate.
For a walkthrough of the alert flyout panel, including detailed information on each configurable property,
see Kibana's <<defining-alerts,defining alerts>>.

The APM app supports two different types of threshold alerts: transaction duration, and error rate.
Below, we'll create one of each.

[float]
[[apm-create-transaction-alert]]
=== Create a transaction duration alert

This guide creates an alert for the `opbeans-java` service based on the following criteria:
Transaction duration alerts trigger when the duration of a specific transaction type in a service exceeds a defined threshold.
This guide will create an alert for the `opbeans-java` service based on the following criteria:

* Environment: Production
* Transaction type: `transaction.type:request`
* Average request is above `1500ms` for the last 5 minutes
* Check every 10 minutes, and repeat the alert every 30 minutes
Expand Down Expand Up @@ -52,14 +57,22 @@ Enter a name for the connector,
and paste the webhook URL.
See Slack's webhook documentation if you need to create one.

Add a message body in markdown format.
You can use the https://mustache.github.io/[Mustache] template syntax, i.e., `{{variable}}`
to pass alert values at the time a condition is detected to an action.
A list of available variables can be accessed by selecting the
**add variable** button image:apm/images/add-variable.png[add variable button].

Select **Save**. The alert has been created and is now active!

[float]
[[apm-create-error-alert]]
=== Create an error rate alert

Error rate alerts trigger when the number of errors in a service exceeds a defined threshold.
This guide creates an alert for the `opbeans-python` service based on the following criteria:

* Environment: Production
* Error rate is above 25 for the last minute
* Check every 1 minute, and repeat the alert every 10 minutes
* Send the alert via email to the `opbeans-python` team
Expand All @@ -81,6 +94,12 @@ Based on the alert criteria, define the following alert details:
Select the **Email** action type and click **Create a connector**.
Fill out the required details: sender, host, port, etc., and click **save**.

Add a message body in markdown format.
You can use the https://mustache.github.io/[Mustache] template syntax, i.e., `{{variable}}`
to pass alert values at the time a condition is detected to an action.
A list of available variables can be accessed by selecting the
**add variable** button image:apm/images/add-variable.png[add variable button].

Select **Save**. The alert has been created and is now active!

[float]
Expand Down
Binary file added docs/apm/images/add-variable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ Public information about a registered [application](./kibana-plugin-core-public.
```typescript
export declare type PublicAppInfo = Omit<App, 'mount' | 'updater$'> & {
legacy: false;
status: AppStatus;
navLinkStatus: AppNavLinkStatus;
appRoute: string;
};
```
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ Information about a registered [legacy application](./kibana-plugin-core-public.
```typescript
export declare type PublicLegacyAppInfo = Omit<LegacyApp, 'updater$'> & {
legacy: true;
status: AppStatus;
navLinkStatus: AppNavLinkStatus;
};
```

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

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

```typescript
legacy: {
readonly createClient: (type: string, clientConfig?: Partial<ElasticsearchClientConfig>) => ICustomClusterClient;
readonly client: IClusterClient;
readonly createClient: (type: string, clientConfig?: Partial<LegacyElasticsearchClientConfig>) => ILegacyCustomClusterClient;
readonly client: ILegacyClusterClient;
};
```
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export interface ElasticsearchServiceSetup

| Property | Type | Description |
| --- | --- | --- |
| [legacy](./kibana-plugin-core-server.elasticsearchservicesetup.legacy.md) | <code>{</code><br/><code> readonly createClient: (type: string, clientConfig?: Partial&lt;ElasticsearchClientConfig&gt;) =&gt; ICustomClusterClient;</code><br/><code> readonly client: IClusterClient;</code><br/><code> }</code> | |
| [legacy](./kibana-plugin-core-server.elasticsearchservicesetup.legacy.md) | <code>{</code><br/><code> readonly createClient: (type: string, clientConfig?: Partial&lt;LegacyElasticsearchClientConfig&gt;) =&gt; ILegacyCustomClusterClient;</code><br/><code> readonly client: ILegacyClusterClient;</code><br/><code> }</code> | |

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

```typescript
legacy: {
readonly createClient: (type: string, clientConfig?: Partial<ElasticsearchClientConfig>) => ICustomClusterClient;
readonly client: IClusterClient;
readonly createClient: (type: string, clientConfig?: Partial<LegacyElasticsearchClientConfig>) => ILegacyCustomClusterClient;
readonly client: ILegacyClusterClient;
};
```
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export interface ElasticsearchServiceStart

| Property | Type | Description |
| --- | --- | --- |
| [legacy](./kibana-plugin-core-server.elasticsearchservicestart.legacy.md) | <code>{</code><br/><code> readonly createClient: (type: string, clientConfig?: Partial&lt;ElasticsearchClientConfig&gt;) =&gt; ICustomClusterClient;</code><br/><code> readonly client: IClusterClient;</code><br/><code> }</code> | |
| [legacy](./kibana-plugin-core-server.elasticsearchservicestart.legacy.md) | <code>{</code><br/><code> readonly createClient: (type: string, clientConfig?: Partial&lt;LegacyElasticsearchClientConfig&gt;) =&gt; ILegacyCustomClusterClient;</code><br/><code> readonly client: ILegacyClusterClient;</code><br/><code> }</code> | |

Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!-- 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; [IClusterClient](./kibana-plugin-core-server.iclusterclient.md)
[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [ILegacyClusterClient](./kibana-plugin-core-server.ilegacyclusterclient.md)

## IClusterClient type
## ILegacyClusterClient type

Represents an Elasticsearch cluster API client created by the platform. It allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via `asScoped(...)`<!-- -->).

See [ClusterClient](./kibana-plugin-core-server.clusterclient.md)<!-- -->.
See [LegacyClusterClient](./kibana-plugin-core-server.legacyclusterclient.md)<!-- -->.

<b>Signature:</b>

```typescript
export declare type IClusterClient = Pick<ClusterClient, 'callAsInternalUser' | 'asScoped'>;
export declare type ILegacyClusterClient = Pick<LegacyClusterClient, 'callAsInternalUser' | 'asScoped'>;
```
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!-- 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; [ICustomClusterClient](./kibana-plugin-core-server.icustomclusterclient.md)
[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [ILegacyCustomClusterClient](./kibana-plugin-core-server.ilegacycustomclusterclient.md)

## ICustomClusterClient type
## ILegacyCustomClusterClient type

Represents an Elasticsearch cluster API client created by a plugin. It allows to call API on behalf of the internal Kibana user and the actual user that is derived from the request headers (via `asScoped(...)`<!-- -->).

See [ClusterClient](./kibana-plugin-core-server.clusterclient.md)<!-- -->.
See [LegacyClusterClient](./kibana-plugin-core-server.legacyclusterclient.md)<!-- -->.

<b>Signature:</b>

```typescript
export declare type ICustomClusterClient = Pick<ClusterClient, 'callAsInternalUser' | 'close' | 'asScoped'>;
export declare type ILegacyCustomClusterClient = Pick<LegacyClusterClient, 'callAsInternalUser' | 'close' | 'asScoped'>;
```
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!-- 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; [IScopedClusterClient](./kibana-plugin-core-server.iscopedclusterclient.md)
[Home](./index.md) &gt; [kibana-plugin-core-server](./kibana-plugin-core-server.md) &gt; [ILegacyScopedClusterClient](./kibana-plugin-core-server.ilegacyscopedclusterclient.md)

## IScopedClusterClient type
## ILegacyScopedClusterClient type

Serves the same purpose as "normal" `ClusterClient` but exposes additional `callAsCurrentUser` method that doesn't use credentials of the Kibana internal user (as `callAsInternalUser` does) to request Elasticsearch API, but rather passes HTTP headers extracted from the current user request to the API.

See [ScopedClusterClient](./kibana-plugin-core-server.scopedclusterclient.md)<!-- -->.
See [LegacyScopedClusterClient](./kibana-plugin-core-server.legacyscopedclusterclient.md)<!-- -->.

<b>Signature:</b>

```typescript
export declare type IScopedClusterClient = Pick<ScopedClusterClient, 'callAsCurrentUser' | 'callAsInternalUser'>;
export declare type ILegacyScopedClusterClient = Pick<LegacyScopedClusterClient, 'callAsCurrentUser' | 'callAsInternalUser'>;
```
Loading

0 comments on commit d1dda40

Please sign in to comment.