Skip to content

Commit

Permalink
Merge branch 'master' into eui-22-1-1
Browse files Browse the repository at this point in the history
  • Loading branch information
chandlerprall committed Mar 31, 2020
2 parents e480fe3 + 86a70ba commit f877ea9
Show file tree
Hide file tree
Showing 1,391 changed files with 34,764 additions and 12,350 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ module.exports = {
'x-pack/dev-tools/mocha/setup_mocha.js',
'x-pack/scripts/*.js',
],
excludedFiles: ['**/integration_tests/**/*'],
rules: {
'import/no-commonjs': 'off',
'prefer-object-spread/prefer-object-spread': 'off',
Expand Down
5 changes: 1 addition & 4 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,7 @@
"visTypeVega": "src/legacy/core_plugins/vis_type_vega",
"visTypeVislib": "src/legacy/core_plugins/vis_type_vislib",
"visTypeXy": "src/legacy/core_plugins/vis_type_xy",
"visualizations": [
"src/plugins/visualizations",
"src/legacy/core_plugins/visualizations"
]
"visualizations": "src/plugins/visualizations"
},
"exclude": [
"src/legacy/ui/ui_render/ui_render_mixin.js"
Expand Down
218 changes: 218 additions & 0 deletions docs/apm/custom-links.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
[[custom-links]]
=== Custom links

Elastic's custom link feature allows you to easily create up to 500 dynamic links
based on your specific APM data.
Custom links can be filtered to only appear in the APM app for relevant services,
environments, transaction types, or transaction names.

Ready to dive in? Jump straight to the <<custom-links-examples,examples>>.

[float]
[[custom-links-create]]
=== Create a link

Each custom link consists of a label, url, and optional filter.
The easiest way to create a custom link is from within the actions dropdown in the transaction detail page.
This method will automatically apply filters, scoping the link to that specific service,
environment, transaction type, and transaction name.

Alternatively, you can create a custom link in the APM app by navigating to **Settings** > **Customize UI**,
and selecting **Create custom link**.

[float]
[[custom-links-label]]
==== Label

The name of your custom link.
This text will be shown in the actions context menu,
so keep it as short as possible.

TIP: Custom links are displayed alphabetically in the actions menu.

[float]
[[custom-links-url]]
==== URL

The URL your link points to.
URLs support dynamic field name variables, encapsulated in double curly brackets: `{{field.name}}`.
These variables will be replaced with transaction metadata when the link is clicked.

Because everyone's data is different,
you'll need to examine your own traces to see what metadata is available for use.
The easiest way to do this is to select a trace in the APM app, and click **Metadata** in the **Trace Sample** table.

[role="screenshot"]
image::apm/images/example-metadata.png[Example metadata]

[float]
[[custom-links-filters]]
==== Filters

Filter each link to only appear so it only appears for specific services or transactions.
You can filter on the following fields:

* `service.name`
* `service.env`
* `transaction.type`
* `transaction.name`

Multiple values are allowed when comma separated.

[float]
[[custom-links-examples]]
=== Custom link examples

// Relevant documentation links
:jira-query-params: https://confluence.atlassian.com/jirakb/how-to-create-issues-using-direct-html-links-in-jira-server-159474.html
:github-query-params: https://help.github.com/en/github/managing-your-work-on-github/about-automation-for-issues-and-pull-requests-with-query-parameters

Not sure where to start with custom links?
Take a look at the examples below, and customize them to your liking!

[float]
[[custom-links-examples-email]]
==== Email

Email the owner of a service.

|====
|Label |`Email <SERVICE_NAME> engineer`
|Link |`mailto:<TEAM_OR_ENGINEER>@<COMPANY_NAME>.com`
|Filters |`service.name:<SERVICE_NAME>`
|====

**Example**

This link opens an email addressed to the team or owner of `python-backend`.
It will only appear on services with the name `python-backend`.

|====
|Label |`Email python-backend engineers`
|Link |`mailto:python_team@elastic.co`
|Filters |`service.name:python-backend`
|====

[float]
[[custom-links-examples-gh]]
==== GitHub issue

Open a GitHub issue with pre-populated metadata from the selected trace sample.

|====
|Label |`Open an issue in <REPO_NAME>`
|Link |`https://github.com/<ORG>/<REPO>/issues/new?title=<TITLE>&body=<BODY>`
|Filters |`service.name:client`
|====

**Example**

This link opens a new GitHub issue in the apm-agent-rum repository.
It populates the issue body with relevant metadata from the currently active trace.
Clicking this link results in the following issue being created:

[role="screenshot"]
image::apm/images/create-github-issue.png[Example github issue]

|====
|Label |`Open an issue in apm-rum-js`
|Link |`https://github.com/elastic/apm-agent-rum-js/issues/new?title=Investigate+APM+trace&body=Investigate+the+following+APM+trace%3A%0D%0A%0D%0Aservice.name%3A+{{service.name}}%0D%0Atransaction.id%3A+{{transaction.id}}%0D%0Acontainer.id%3A+{{container.id}}%0D%0Aurl.full%3A+{{url.full}}`
|Filters |`service.name:client`
|====

See the {github-query-params}[GitHub automation documentation] for a full list of supported query parameters.

[float]
[[custom-links-examples-jira]]
==== Jira task

Create a Jira task with pre-populated metadata from the selected trace sample.

|====
|Label |`Open an issue in Jira`
|Link |`https://<JIRA_BASE_URL>/secure/CreateIssueDetails!init.jspa?<ARGUMENTS>`
|====

**Example**

This link creates a new task on the Engineering board in Jira.
It populates the issue body with relevant metadata from the currently active trace.
Clicking this link results in the following task being created in Jira:

[role="screenshot"]
image::apm/images/create-jira-issue.png[Example jira issue]

|====
|Label |`Open a task in Jira`
|Link |`https://test-site-33.atlassian.net/secure/CreateIssueDetails!init.jspa?pid=10000&issuetype=10001&summary=Created+via+APM&description=Investigate+the+following+APM+trace%3A%0D%0A%0D%0Aservice.name%3A+{{service.name}}%0D%0Atransaction.id%3A+{{transaction.id}}%0D%0Acontainer.id%3A+{{container.id}}%0D%0Aurl.full%3A+{{url.full}}`
|====

See the {jira-query-params}[Jira application administration knowledge base]
for a full list of supported query parameters.

[float]
[[custom-links-examples-kib]]
==== Kibana dashboards

Link to a custom dashboard in Kibana.

|====
|Label |`Open transaction in custom visualization`
|Link |`https://kibana-instance/app/kibana#/dashboard?_g=query:(language:kuery,query:'transaction.id:{{transaction.id}}'...`
|====

**Example**

This link opens the current `transaction.id` in a custom kibana dashboard.
There are no filters set.

|====
|Label |`Open transaction in Python drilldown viz`
|URL |`https://kibana-instance/app/kibana#/dashboard?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-24h,to:now))&_a=(description:'',filters:!(),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),panels:!((embeddableConfig:(),gridData:(h:15,i:cb79c1c0-1af8-472c-aaf7-d158a76946fb,w:24,x:0,y:0),id:c8c74b20-6a30-11ea-92ab-b5d3feff11df,panelIndex:cb79c1c0-1af8-472c-aaf7-d158a76946fb,type:visualization,version:'7.7')),query:(language:kuery,query:'transaction.id:{{transaction.id}}'),timeRestore:!f,title:'',viewMode:edit)`
|====

[float]
[[custom-links-examples-slack]]
==== Slack channel

Open a specified slack channel.

|====
|Label |`Open SLACK_CHANNEL`
|Link |`https://COMPANY_SLACK.slack.com/archives/SLACK_CHANNEL`
|Filters |`service.name` : `SERVICE_NAME`
|====

**Example**

This link opens a company slack channel, #apm-support.
It only appears when `transaction.name` is `GET user/login`.

|====
|Label |`Open #apm-user-support`
|Link |`https://microsoft.slack.com/archives/efk52kt23k`
|Filters |`transaction.name:GET user/login`
|====

[float]
[[custom-links-examples-web]]
==== Website

Open an internal or external website.

|====
|Label |`Open <WEBSITE>`
|Link |`https://<COMPANY_SLACK>.slack.com/archives/<SLACK_CHANNEL>`
|Filters |`service.name:<SERVICE_NAME>`
|====

**Example**

This link opens more data on a specific `user.email`.
It only appears on front-end transactions.

|====
|Label |`View user internally`
|Link |`https://internal-site.company.com/user/{{user.email}}`
|Filters |`service.name:client`
|====
Binary file added docs/apm/images/create-github-issue.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/create-jira-issue.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/example-metadata.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/apm/using-the-apm-ui.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ include::metrics.asciidoc[]

include::agent-configuration.asciidoc[]

include::custom-links.asciidoc[]

include::advanced-queries.asciidoc[]

include::settings.asciidoc[]
Expand Down
2 changes: 1 addition & 1 deletion docs/canvas/canvas-elements.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ By default, most of the elements you create use demo data until you change the d

* *{es} SQL* &mdash; Access your data in {es} using SQL syntax. For information about SQL syntax, refer to {ref}/sql-spec.html[SQL language].

* *{es} raw data* &mdash; Access your raw data in {es} without the use of aggregations. Use {es} raw data when you have low volume datasets, or to plot exact, non-aggregated values.
* *{es} documents* &mdash; Access your data in {es} without using aggregations. To use, select an index and fields, and optionally enter a query using the <<lucene-query,Lucene Query Syntax>>. Use the *{es} documents* data source when you have low volume datasets, to view raw documents, or to plot exact, non-aggregated values on a chart.

* *Timelion* &mdash; Access your time series data using <<timelion,Timelion>> queries. To use Timelion queries, you can enter a query using the <<lucene-query,Lucene Query Syntax>>.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
search: {
aggs: {
AggConfigs: typeof AggConfigs;
aggGroupNamesMap: () => Record<"buckets" | "metrics", string>;
aggGroupNamesMap: () => Record<"metrics" | "buckets", string>;
aggTypeFilters: import("./search/aggs/filter/agg_type_filters").AggTypeFilters;
CidrMask: typeof CidrMask;
convertDateRangeToString: typeof convertDateRangeToString;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
| Function | Description |
| --- | --- |
| [getDefaultSearchParams(config)](./kibana-plugin-plugins-data-server.getdefaultsearchparams.md) | |
| [getTotalLoaded({ total, failed, successful })](./kibana-plugin-plugins-data-server.gettotalloaded.md) | |
| [parseInterval(interval)](./kibana-plugin-plugins-data-server.parseinterval.md) | |
| [plugin(initializerContext)](./kibana-plugin-plugins-data-server.plugin.md) | Static code to be shared externally |
| [shouldReadFieldFromDocValues(aggregatable, esType)](./kibana-plugin-plugins-data-server.shouldreadfieldfromdocvalues.md) | |
Expand Down
34 changes: 34 additions & 0 deletions docs/management/alerting/alert-details.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[role="xpack"]
[[alert-details]]
=== Alert details

beta[]

The *Alert details* page tells you about the state of the alert and provides granular control over the actions it is taking.

[role="screenshot"]
image::images/alerts-details-instances-active.png[Alert details page with three alert instances]

In this example, alerts detect when a site serves more than a threshold number of bytes in a 24 hour period. Three sites are above the threshold. These are called alert instances - occurrences of the condition being detected - and the instance name, status, time of detection, and duration of the condition are shown in this view.

Upon detection, each instance can trigger one or more actions. If the condition persists, the same actions will trigger either on the next scheduled alert check, or (if defined) after the re-notify period on the alert has passed. To prevent re-notification, you can suppress future actions by clicking on the eye icon to mute an individual alert instance. Muting means that the alert checks continue to run on a schedule, but that instance will not trigger any action.

[role="screenshot"]
image::images/alerts-details-instance-muting.png[Muting an alert instance]

Alert instances will come and go from the list depending on whether they meet the alert conditions or not - unless they are muted. If a muted instance no longer meets the alert conditions, it will appear as inactive in the list. This prevents an instance from triggering actions if it reappears in the future.

[role="screenshot"]
image::images/alerts-details-instances-inactive.png[Alert details page with three inactive alert instances]

If you want to suppress actions on all current and future instances, you can mute the entire alert. Alert checks continue to run and the instance list will update as instances activate or deactivate, but no actions will be triggered.

[role="screenshot"]
image::images/alerts-details-muting.png[Use the mute toggle to suppress all action on current and future instances]

You can also disable an alert altogether. When disabled, the alert stops running checks altogether and will clear any instances it is tracking. You may want to disable alerts that are not currently needed to reduce the load on {kib} and {es}.

[role="screenshot"]
image::images/alerts-details-disabling.png[Use the disable toggle to turn off alert checks and clear instances tracked]

* For further information on alerting concepts and examples, see <<alerting-getting-started>>.
59 changes: 59 additions & 0 deletions docs/management/alerting/alert-management.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
[role="xpack"]
[[alert-management]]
=== Managing Alerts

beta[]

The *Alerts* tab provides a cross-app view of alerting. Different {kib} apps like <<xpack-infra, Metrics>>, <<xpack-apm, APM>>, <<xpack-uptime, Uptime>>, and <<xpack-siem, SIEM>> can offer their own alerts, and the *Alerts* tab provides a central place to:

* <<create-edit-alerts, Create and edit>> alerts
* <<controlling-alerts, Control alerts>> including enabling/disabling, muting/unmuting, and deleting
* Drill-down to <<alert-details, alert details>>

[role="screenshot"]
image:management/alerting/images/alerts-and-actions-ui.png[Example alert listing in the Alerts and Actions UI]

For more information on alerting concepts and the types of alerts and actions available, see <<alerting-getting-started>>.

[float]
==== Finding alerts

The *Alerts* tab lists all alerts in the current space, including summary information about their execution frequency, tags, and type.

The *search bar* can be used to quickly find alerts by name or tag.

[role="screenshot"]
image::images/alerts-filter-by-search.png[Filtering the alerts list using the search bar]

The *type* dropdown lets you filter to a subset of alert types.

[role="screenshot"]
image::images/alerts-filter-by-type.png[Filtering the alerts list by types of alert]

The *Action type* dropdown lets you filter by the type of action used in the alert.

[role="screenshot"]
image::images/alerts-filter-by-action-type.png[Filtering the alert list by type of action]

[float]
[[create-edit-alerts]]
==== Creating and editing alerts

Many alerts must be created within the context of a {kib} app like <<xpack-infra, Metrics>>, <<xpack-apm, APM>>, or <<xpack-uptime, Uptime>>, but others are generic. Generic alert types can be created in the *Alerts* management UI by clicking the *Create* button. This will launch a flyout that guides you through selecting an alert type and configuring it's properties. Refer to <<alert-types>> for details on what types of alerts are available and how to configure them.

After an alert is created, you can re-open the flyout and change an alerts properties by clicking the *Edit* button shown on each row of the alert listing.


[float]
[[controlling-alerts]]
==== Controlling alerts

The alert listing allows you to quickly mute/unmute, disable/enable, and delete individual alerts by clicking the action button at the right of each row.

[role="screenshot"]
image:management/alerting/images/individual-mute-disable.png[The actions button allows an individual alert to be muted, disabled, or deleted]

These operations can also be performed in bulk by multi-selecting alerts and clicking the *Manage alerts* button:

[role="screenshot"]
image:management/alerting/images/bulk-mute-disable.png[The Manage alerts button lets you mute/unmute, enable/disable, and delete in bulk]
25 changes: 25 additions & 0 deletions docs/management/alerting/alerts-and-actions-intro.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[role="xpack"]
[[managing-alerts-and-actions]]
== Alerts and Actions

beta[]

The *Alerts and Actions* UI lets you <<alert-management, see and control all the alerts>> in a space, and provides tools to <<connector-management, create and manage connectors>> so that alerts can trigger actions like notification, indexing, and ticketing.

To manage alerting and connectors, go to *Management > {kib} > Alerts and Actions*.

[role="screenshot"]
image:management/alerting/images/alerts-and-actions-ui.png[Example alert listing in the Alerts and Actions UI]

[NOTE]
============================================================================
Similar to dashboards, alerts and connectors reside in a <<xpack-spaces, space>>.
The *Alerts and Actions* UI only shows alerts and connectors for the current space.
============================================================================

[NOTE]
============================================================================
{es} also offers alerting capabilities through Watcher, which
can be managed through the <<watcher-ui, Watcher UI>>. See
<<alerting-concepts-differences>> for more information.
============================================================================
Loading

0 comments on commit f877ea9

Please sign in to comment.