Skip to content

Commit

Permalink
[APM] docs: Update setup page and remove index pat docs (#120025)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorelli25 authored Nov 30, 2021
1 parent a7556f4 commit c32a2f9
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 106 deletions.
92 changes: 7 additions & 85 deletions docs/apm/api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Some APM app features are provided via a REST API:

* <<agent-config-api>>
* <<apm-annotation-api>>
* <<kibana-api,Kibana API>>
* <<rum-sourcemap-api>>

[float]
Expand Down Expand Up @@ -71,6 +70,13 @@ curl -X POST \
}'
----

[float]
[[kibana-api]]
=== Kibana API

In addition to the APM specific API endpoints, Kibana provides its own <<api,REST API>>
which you can use to automate certain aspects of configuring and deploying Kibana.

////
*******************************************************
*******************************************************
Expand Down Expand Up @@ -474,90 +480,6 @@ curl -X POST \
*******************************************************
////

[[kibana-api]]
=== Kibana API

In addition to the APM specific API endpoints, Kibana provides its own <<api,REST API>>
which you can use to automate certain aspects of configuring and deploying Kibana.
An example is below.

[[api-create-apm-index-pattern]]
==== Customize the APM index pattern

Use Kibana's <<saved-objects-api-update,update object API>> to update the default APM index pattern on the fly.

The following example sets the default APM app index pattern to `some-other-pattern-*`:

[source,sh]
----
curl -X PUT "localhost:5601/api/saved_objects/index-pattern/apm_static_index_pattern_id" \ <1>
-H 'Content-Type: application/json' \
-H 'kbn-xsrf: true' \
-H 'Authorization: Basic ${YOUR_AUTH_TOKEN}' \
-d' {
"attributes": {
"title": "some-other-pattern-*", <2>
}
}'
----
<1> `apm_static_index_pattern_id` is the internal, hard-coded ID of the APM index pattern.
This value should not be changed
<2> Your custom index pattern matcher.

The API returns the following:

[source,json]
----
{
"id":"apm_static_index_pattern_id",
"type":"index-pattern",
"updated_at":"2020-07-06T22:55:59.555Z",
"version":"WzYsMV0=",
"attributes":{
"title":"some-other-pattern-*"
}
}
----

To view the new APM app index pattern, use the <<saved-objects-api-get,GET object API>>:

[source,sh]
----
curl -X GET "localhost:5601/api/saved_objects/index-pattern/apm_static_index_pattern_id" \ <1>
-H 'kbn-xsrf: true' \
-H 'Authorization: Basic ${YOUR_AUTH_TOKEN}'
----
<1> `apm_static_index_pattern_id` is the internal, hard-coded ID of the APM index pattern.

The API returns the following:

[source,json]
----
{
"id":"apm_static_index_pattern_id",
"type":"index-pattern",
"updated_at":"2020-07-06T22:55:59.555Z",
"version":"WzYsMV0=",
"attributes":{...}
"fieldFormatMap":"{...}
"fields":"[{...},{...},...]
"sourceFilters":"[{\"value\":\"sourcemap.sourcemap\"}]",
"timeFieldName":"@timestamp",
"title":"some-other-pattern-*"
},
...
}
----

// More examples will go here

More information on Kibana's API is available in <<api,REST API>>.

////
*******************************************************
*******************************************************
////

[role="xpack"]
[[rum-sourcemap-api]]
=== RUM source map API
Expand Down
Binary file modified docs/apm/images/apm-setup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 6 additions & 21 deletions docs/apm/set-up.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,13 @@

APM is available via the navigation sidebar in {Kib}.
If you have not already installed and configured Elastic APM,
the *Add data* page will get you started.
follow the three steps on the *Add data* page to get started:

[role="screenshot"]
image::apm/images/apm-setup.png[Installation instructions on the APM page in Kibana]

[float]
[[apm-configure-index-pattern]]
=== Load the index pattern

Index patterns tell {kib} which {es} indices you want to explore.
An APM index pattern is necessary for certain features in the APM app, like the query bar.
To set up the correct index pattern, on the *Add data* page, click *Load Kibana objects*.
. Start APM Server
. Add APM agents
. Load Kibana objects

[role="screenshot"]
image::apm/images/apm-index-pattern.png[Setup index pattern for APM in Kibana]

TIP: To use a custom index pattern,
adjust Kibana's <<apm-settings-in-kibana,settings>> or use the <<api-create-apm-index-pattern,Kibana API>>.

[float]
[[apm-getting-started-next]]
=== Next steps
image::apm/images/apm-setup.png[Installation instructions on the APM page in Kibana]

No further configuration in the APM app is required.
Install an APM Agent library in your service to begin visualizing and analyzing your data!
That's it! You're now ready to explore your data.
2 changes: 2 additions & 0 deletions docs/settings/apm-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ Changing these settings may disable features of the APM App.
| `xpack.apm.indices.sourcemap` {ess-icon}
| Matcher for all source map indices. Defaults to `apm-*`.

| `xpack.apm.autocreateApmIndexPattern` {ess-icon}
| Set to `false` to disable the automatic creation of the APM index pattern when the APM app is opened. Defaults to `true`.
|===

// end::general-apm-settings[]

0 comments on commit c32a2f9

Please sign in to comment.