-
Notifications
You must be signed in to change notification settings - Fork 240
troubleshoot(otel): add generic.otel index template troubleshooting page (#6974) #7081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
alexandra5000
wants to merge
1
commit into
elastic:main
Choose a base branch
from
alexandra5000:6974-otel-index-template
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+94
−0
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
90 changes: 90 additions & 0 deletions
90
troubleshoot/ingest/opentelemetry/edot-collector/missing-otel-index-template.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| --- | ||
| navigation_title: generic.otel template missing | ||
| description: Troubleshoot silent ingest failure when the `generic.otel` index template is missing or misconfigured in Elasticsearch. | ||
| applies_to: | ||
| stack: ga | ||
| serverless: | ||
| observability: ga | ||
| product: | ||
| edot_collector: ga | ||
| products: | ||
| - id: cloud-serverless | ||
| - id: observability | ||
| - id: edot-collector | ||
| --- | ||
|
|
||
| # {{es}} `generic.otel` index template missing or misconfigured [missing-otel-index-template] | ||
|
|
||
| When using the `elasticsearch` exporter with `mapping.mode: otel`, telemetry is written to the `generic.otel` data streams. If the backing index template is absent or misconfigured, ingest silently fails, which means that the Collector pipeline reports success, but no data appears in {{kib}}. | ||
|
|
||
| ## Symptoms | ||
|
|
||
| * The Collector reports successful telemetry export with no errors in logs | ||
| * No data appears in {{kib}} {{product.apm}} or Discover | ||
| * The `logs-generic.otel-*`, `metrics-generic.otel-*`, or `traces-generic.otel-*` data streams are empty or absent | ||
| * {{es}} returns mapping errors on direct data stream queries | ||
|
|
||
| ## Causes | ||
|
|
||
| <!-- TODO: SME confirmation needed — who installs the generic.otel templates (EDOT Collector on first run? {{fleet}}? ES itself?) and what triggers reinstallation? --> | ||
| * The template is not installed yet. On a fresh {{es}} installation where EDOT has not yet run successfully, the `generic.otel` templates might be missing. | ||
| * If the `elasticsearch` exporter is configured without `mapping.mode: otel`, data is written to the default {{es}} templates instead of the `generic.otel` ones. This can cause mapping conflicts or route data to unexpected indices. | ||
|
|
||
| ## Resolution | ||
|
|
||
| ::::{stepper} | ||
|
|
||
| :::{step} Verify the index template is installed | ||
|
|
||
| Run the following queries in {{kib}} **Dev Tools** or in the {{es}} API: | ||
|
|
||
| ```bash | ||
| GET _index_template/logs-generic.otel | ||
| GET _component_template/generic.otel@mappings | ||
| ``` | ||
|
|
||
| If either one returns a 404, it means that the template is missing. Continue to [Reinstall the index template](#reinstall-the-index-template). | ||
|
|
||
| If both return results, the template is present. You can skip to [Verify `mapping.mode: otel` is set on the exporter](#verify-mappingmode-otel-is-set-on-the-exporter). | ||
| ::: | ||
|
|
||
| :::{step} Reinstall the index template | ||
|
|
||
| <!-- TODO: SME confirmation needed — what are the exact steps to reinstall or repair the generic.otel template? Is it a Collector restart, a Fleet policy push, or a manual ES API call? --> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @gregkalapos @axw And this one please 🙏 |
||
|
|
||
| Restart the EDOT Collector to trigger template bootstrapping. If the Collector connects to {{es}} successfully on startup, it installs the required templates automatically. | ||
|
|
||
| If the template is still missing after a restart, contact [Elastic Support](https://www.elastic.co/support) to get help with manual template installation. | ||
| ::: | ||
|
|
||
| :::{step} Verify `mapping.mode: otel` is set on the exporter | ||
|
|
||
| Check your Collector configuration and confirm the `elasticsearch` exporter includes `mapping.mode: otel`: | ||
|
|
||
| ```yaml | ||
| exporters: | ||
| elasticsearch/otel: | ||
| endpoints: | ||
| - ${env:ELASTIC_ENDPOINT} | ||
| api_key: ${env:ELASTIC_API_KEY} | ||
| mapping: | ||
| mode: otel | ||
| ``` | ||
|
|
||
| Without this setting, the exporter writes to the default {{es}} templates, bypassing `generic.otel` entirely. Data might appear in unexpected indices or fail silently due to mapping conflicts. | ||
| ::: | ||
|
|
||
| :::{step} Confirm data is flowing | ||
|
|
||
| After verifying the template and exporter configuration, check for incoming data: | ||
|
|
||
| ```bash | ||
| GET logs-generic.otel-default/_count | ||
| GET metrics-generic.otel-default/_count | ||
| GET traces-generic.otel-default/_count | ||
| ``` | ||
|
|
||
| A non-zero count confirms that data is reaching {{es}}. If counts remain zero, refer to [No logs, metrics, or traces visible in {{kib}}](/troubleshoot/ingest/opentelemetry/no-data-in-kibana.md) for further diagnostics. | ||
| ::: | ||
|
|
||
| :::: | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gregkalapos @axw Could you help with this one?