From d4cd1e0137e5c593a80226b51d104cd2b9a936f9 Mon Sep 17 00:00:00 2001 From: Juan Date: Tue, 15 Dec 2020 17:33:29 +0100 Subject: [PATCH 1/3] add host and secret token settings to the UI --- .../apm/0.1.0/agent/input/template.yml.hbs | 2 ++ apmpackage/apm/0.1.0/docs/README.md | 19 +++++++++++-------- apmpackage/apm/0.1.0/manifest.yml | 11 +++++++++++ apmpackage/docs/README.template.md | 19 +++++++++++-------- 4 files changed, 35 insertions(+), 16 deletions(-) diff --git a/apmpackage/apm/0.1.0/agent/input/template.yml.hbs b/apmpackage/apm/0.1.0/agent/input/template.yml.hbs index fa5083b93a0..082497b05cf 100644 --- a/apmpackage/apm/0.1.0/agent/input/template.yml.hbs +++ b/apmpackage/apm/0.1.0/agent/input/template.yml.hbs @@ -1,2 +1,4 @@ apm-server: + host: {{host}} + secret_token: {{secret_token}} rum.enabled: {{enable_rum}} diff --git a/apmpackage/apm/0.1.0/docs/README.md b/apmpackage/apm/0.1.0/docs/README.md index 3b44d60cbd1..8c9d1b7d617 100644 --- a/apmpackage/apm/0.1.0/docs/README.md +++ b/apmpackage/apm/0.1.0/docs/README.md @@ -7,6 +7,7 @@ The APM integration installs Elasticsearch templates and Ingest Node pipelines f When you add an APM integration to a policy, that policy will contain an `apm` input. If a policy contains an `apm` input, any Elastic Agent(s) set up with that policy will run locally an APM Server binary. You must configure your APM Agents to communicate with that APM Server. +If you run Elastic Agent in Docker, make sure to configure the APM Server `host` accordingly if it needs to be accessed from outside. If you have RUM enabled, you must run APM Server centrally. Otherwise, you can run it at the edge machines. To do so, download and enroll an Elastic Agent in the same machines where your instrumented services run. @@ -47,7 +48,7 @@ and you will be recommended to use the environment as namespace. This version doesn't automatically use the service name, so the recommendation instead is to use both the service name and the environment as the namespace. -### Compatibility and limitations +## Compatibility and limitations The APM integration requires Kibana 7.11 and Elasticsearch with basic license. This version is experimental and has some limitations, listed bellow: @@ -59,12 +60,14 @@ You must update the policy with any changes you need and restart the APM Server IMPORTANT: If you run APM Server with Elastic Agent manually in standalone mode, you must install the APM integration before ingestion starts. -### Configuration parameters +## Configuration parameters -- `RUM`: Enables support for RUM monitoring. See the [documentation](https://www.elastic.co/guide/en/apm/server/current/configuration-rum.html) for details. +- `Host`: APM Server host and port to listen on. +- `Secret token`: Authorization token for sending data to APM Server. See the [documentation](https://www.elastic.co/guide/en/apm/server/current/configuration-rum.html) for details. +- `Enable RUM`: Enables support for RUM monitoring. See the [documentation](https://www.elastic.co/guide/en/apm/server/current/configuration-rum.html) for details. -### Traces +## Traces Traces are comprised of [spans and transactions](https://www.elastic.co/guide/en/apm/get-started/current/apm-data-model.html). Traces are written to `traces-apm.*` indices. @@ -418,7 +421,7 @@ Traces are written to `traces-apm.*` indices. ``` -### Metrics +## Metrics Metrics include application-based metrics and some basic system metrics. Metrics are written to `metrics-apm.*`, `metrics-apm.internal.*` and `metrics-apm.profiling.*` indices. @@ -507,7 +510,7 @@ Metrics are written to `metrics-apm.*`, `metrics-apm.internal.*` and `metrics-ap |user_agent.version|Version of the user agent.|keyword| ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-yes.png) | -#### Example +### Example ```json { @@ -570,7 +573,7 @@ Metrics are written to `metrics-apm.*`, `metrics-apm.internal.*` and `metrics-ap } ``` -### Logs +## Logs Logs are application error events. Logs are written to `logs-apm.error.*` indices. @@ -687,7 +690,7 @@ Logs are written to `logs-apm.error.*` indices. |user_agent.version|Version of the user agent.|keyword| ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-yes.png) | -#### Example +### Example ```json { diff --git a/apmpackage/apm/0.1.0/manifest.yml b/apmpackage/apm/0.1.0/manifest.yml index 803dd6735a7..310c31db133 100644 --- a/apmpackage/apm/0.1.0/manifest.yml +++ b/apmpackage/apm/0.1.0/manifest.yml @@ -19,6 +19,17 @@ policy_templates: title: Collect application traces description: Collect application traces vars: + - name: host + type: string + title: Host + required: true + show_user: true + default: localhost:8200 + - name: secret_token + type: bool + title: Secret token + required: false + show_user: true - name: enable_rum type: bool title: Enable RUM diff --git a/apmpackage/docs/README.template.md b/apmpackage/docs/README.template.md index 61f9c928028..aced79bd5ba 100644 --- a/apmpackage/docs/README.template.md +++ b/apmpackage/docs/README.template.md @@ -7,6 +7,7 @@ The APM integration installs Elasticsearch templates and Ingest Node pipelines f When you add an APM integration to a policy, that policy will contain an `apm` input. If a policy contains an `apm` input, any Elastic Agent(s) set up with that policy will run locally an APM Server binary. You must configure your APM Agents to communicate with that APM Server. +If you run Elastic Agent in Docker, make sure to configure the APM Server `host` accordingly if it needs to be accessed from outside. If you have RUM enabled, you must run APM Server centrally. Otherwise, you can run it at the edge machines. To do so, download and enroll an Elastic Agent in the same machines where your instrumented services run. @@ -47,7 +48,7 @@ and you will be recommended to use the environment as namespace. This version doesn't automatically use the service name, so the recommendation instead is to use both the service name and the environment as the namespace. -### Compatibility and limitations +## Compatibility and limitations The APM integration requires Kibana 7.11 and Elasticsearch with basic license. This version is experimental and has some limitations, listed bellow: @@ -59,12 +60,14 @@ You must update the policy with any changes you need and restart the APM Server IMPORTANT: If you run APM Server with Elastic Agent manually in standalone mode, you must install the APM integration before ingestion starts. -### Configuration parameters +## Configuration parameters -- `RUM`: Enables support for RUM monitoring. See the [documentation](https://www.elastic.co/guide/en/apm/server/current/configuration-rum.html) for details. +- `Host`: APM Server host and port to listen on. +- `Secret token`: Authorization token for sending data to APM Server. See the [documentation](https://www.elastic.co/guide/en/apm/server/current/configuration-rum.html) for details. +- `Enable RUM`: Enables support for RUM monitoring. See the [documentation](https://www.elastic.co/guide/en/apm/server/current/configuration-rum.html) for details. -### Traces +## Traces Traces are comprised of [spans and transactions](https://www.elastic.co/guide/en/apm/get-started/current/apm-data-model.html). Traces are written to `traces-apm.*` indices. @@ -88,7 +91,7 @@ Traces are written to `traces-apm.*` indices. ``` -### Metrics +## Metrics Metrics include application-based metrics and some basic system metrics. Metrics are written to `metrics-apm.*`, `metrics-apm.internal.*` and `metrics-apm.profiling.*` indices. @@ -101,13 +104,13 @@ Metrics are written to `metrics-apm.*`, `metrics-apm.internal.*` and `metrics-ap | {{- Trim .Name -}} | {{- Trim .Description -}} | {{- Trim .Type -}} | {{if .IsECS}} ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-yes.png) {{else}} ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-no.png) {{end}} | {{end}} -#### Example +### Example ```json {{.MetricsExample}} ``` -### Logs +## Logs Logs are application error events. Logs are written to `logs-apm.error.*` indices. @@ -120,7 +123,7 @@ Logs are written to `logs-apm.error.*` indices. | {{- Trim .Name -}} | {{- Trim .Description -}} | {{- Trim .Type -}} | {{if .IsECS}} ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-yes.png) {{else}} ![](https://doc-icons.s3.us-east-2.amazonaws.com/icon-no.png) {{end}} | {{end}} -#### Example +### Example ```json {{.ErrorExample}} From 3088a1e9b510e52c0c37bc91d49453bc9cda32b6 Mon Sep 17 00:00:00 2001 From: Juan Date: Tue, 15 Dec 2020 17:38:12 +0100 Subject: [PATCH 2/3] add apm logo --- apmpackage/apm/0.1.0/img/logo_apm.svg | 5 +++++ apmpackage/apm/0.1.0/manifest.yml | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 apmpackage/apm/0.1.0/img/logo_apm.svg diff --git a/apmpackage/apm/0.1.0/img/logo_apm.svg b/apmpackage/apm/0.1.0/img/logo_apm.svg new file mode 100644 index 00000000000..d0b9786431b --- /dev/null +++ b/apmpackage/apm/0.1.0/img/logo_apm.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/apmpackage/apm/0.1.0/manifest.yml b/apmpackage/apm/0.1.0/manifest.yml index 310c31db133..c4943775f08 100644 --- a/apmpackage/apm/0.1.0/manifest.yml +++ b/apmpackage/apm/0.1.0/manifest.yml @@ -10,6 +10,11 @@ categories: release: experimental # experimental / beta / ga conditions: kibana.version: '^7.11.0' +icons: + - src: /img/logo_apm.svg + title: APM Logo + size: 32x32 + type: image/svg+xml policy_templates: - name: apmserver title: Elastic APM Integration From d2d2cc6681adff8a6363015386d27f0e9045b835 Mon Sep 17 00:00:00 2001 From: Juan Date: Tue, 15 Dec 2020 19:51:22 +0100 Subject: [PATCH 3/3] code review --- apmpackage/apm/0.1.0/docs/README.md | 2 +- apmpackage/docs/README.template.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apmpackage/apm/0.1.0/docs/README.md b/apmpackage/apm/0.1.0/docs/README.md index 8c9d1b7d617..723d5aea984 100644 --- a/apmpackage/apm/0.1.0/docs/README.md +++ b/apmpackage/apm/0.1.0/docs/README.md @@ -7,7 +7,7 @@ The APM integration installs Elasticsearch templates and Ingest Node pipelines f When you add an APM integration to a policy, that policy will contain an `apm` input. If a policy contains an `apm` input, any Elastic Agent(s) set up with that policy will run locally an APM Server binary. You must configure your APM Agents to communicate with that APM Server. -If you run Elastic Agent in Docker, make sure to configure the APM Server `host` accordingly if it needs to be accessed from outside. +Make sure to configure the APM Server `host` if it needs to be accessed from outside (eg. when running in Docker). If you have RUM enabled, you must run APM Server centrally. Otherwise, you can run it at the edge machines. To do so, download and enroll an Elastic Agent in the same machines where your instrumented services run. diff --git a/apmpackage/docs/README.template.md b/apmpackage/docs/README.template.md index aced79bd5ba..9abafb929dc 100644 --- a/apmpackage/docs/README.template.md +++ b/apmpackage/docs/README.template.md @@ -7,7 +7,7 @@ The APM integration installs Elasticsearch templates and Ingest Node pipelines f When you add an APM integration to a policy, that policy will contain an `apm` input. If a policy contains an `apm` input, any Elastic Agent(s) set up with that policy will run locally an APM Server binary. You must configure your APM Agents to communicate with that APM Server. -If you run Elastic Agent in Docker, make sure to configure the APM Server `host` accordingly if it needs to be accessed from outside. +Make sure to configure the APM Server `host` if it needs to be accessed from outside (eg. when running in Docker). If you have RUM enabled, you must run APM Server centrally. Otherwise, you can run it at the edge machines. To do so, download and enroll an Elastic Agent in the same machines where your instrumented services run.