Skip to content

Add Apache HTTP Server status OpenTelemetry input package - #16970

Merged
mrodm merged 15 commits into
elastic:mainfrom
perk:add-apache-web-server-status-input-package
Feb 16, 2026
Merged

Add Apache HTTP Server status OpenTelemetry input package#16970
mrodm merged 15 commits into
elastic:mainfrom
perk:add-apache-web-server-status-input-package

Conversation

@perk

@perk perk commented Jan 15, 2026

Copy link
Copy Markdown
Member

This package implements an Apache input using the OpenTelemetry Collector's Apache Receiver, following the pattern established in PR #15739

Key features:

  • Type: integration with otelcol input (not content package)
  • Configurable collection interval, endpoint
  • Comprehensive field definitions for container metrics
  • Full documentation and system and test policies added

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Author's Checklist

  • Content package is installed when there are documents ingested into apachereceiver.otel dataset.

How to test this PR locally

Related issues

Screenshots

integrations tiles view content package installed

Using the server name from the system test svc-apache_input_otel:
dashboards


Generated with Claude Code
Logo generated also with the assistance of copilot.

@perk perk changed the title [wip] Add Apache HTTP Server status OpenTelemetry input package Jan 28, 2026
@perk
perk marked this pull request as ready for review January 28, 2026 14:08
@perk
perk requested a review from a team as a code owner January 28, 2026 14:08
@andrewkroh andrewkroh added New Integration Issue or pull request for creating a new integration package. documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. labels Jan 28, 2026
@elastic elastic deleted a comment from github-actions Bot Jan 29, 2026
@strawgate

Copy link
Copy Markdown
Contributor

@claude please do a thorough review -- pay careful attention to the receiver upstream and at our other input packages

@elastic elastic deleted a comment from github-actions Bot Jan 29, 2026
@github-actions

github-actions Bot commented Jan 29, 2026

Copy link
Copy Markdown
Contributor

Claude finished @strawgate's task in 5m 6s —— View job


Review Complete

I've submitted a review with request for changes.

Critical Issue Found:

  • 🔴 TLS Configuration Logic Bug - The TLS block in input.yml.hbs is wrapped in {{#if tls_insecure}}, but insecure: true means TLS is disabled. This inverted logic prevents users from configuring TLS certificates or skip-verification when TLS is actually enabled.

Medium Priority:

  • 🟡 Duration fields (collection_interval, initial_delay) should use type: duration instead of type: text to match the pattern in nginx_input_otel

What looks good:

  • Endpoint default matches upstream exactly
  • Docker test setup properly configures mod_status
  • Documentation is comprehensive
  • Correct CODEOWNERS assignment

See the review for detailed suggestions on fixing the TLS logic.



Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TLS Configuration Logic Bug (High Priority)

The TLS configuration in agent/input/input.yml.hbs has inverted logic. Currently, the entire TLS block is wrapped in {{#if tls_insecure}}, meaning TLS settings (including ca_file, cert_file, key_file, insecure_skip_verify, server_name_override) are only rendered when tls_insecure=true.

However, insecure: true in OTel configuration means TLS is disabled (plain HTTP). So when users want to use TLS with custom certificates or skip verification, they would set tls_insecure=false, but then none of the TLS settings would be rendered.

Expected behavior: The TLS block should be rendered when TLS settings are provided, not when tls_insecure is true. The insecure field controls whether to use TLS at all, while other TLS fields configure how TLS works when enabled.

Suggested fix for input.yml.hbs lines 31-49:

{{#if tls_ca_file}}
    tls:
      ca_file: {{tls_ca_file}}
{{#if tls_cert_file}}
      cert_file: {{tls_cert_file}}
{{/if}}
{{#if tls_key_file}}
      key_file: {{tls_key_file}}
{{/if}}
{{#if tls_insecure_skip_verify}}
      insecure_skip_verify: {{tls_insecure_skip_verify}}
{{/if}}
{{#if tls_server_name_override}}
      server_name_override: {{tls_server_name_override}}
{{/if}}
{{else if tls_insecure_skip_verify}}
    tls:
      insecure_skip_verify: {{tls_insecure_skip_verify}}
{{/if}}

Additionally, the tls_insecure variable as a way to "disable TLS" is confusing - consider removing it since the upstream receiver doesn't have this field directly; TLS is controlled by protocol in the endpoint URL (http:// vs https://).


Medium Priority Issues

1. Duration fields should use type: duration not type: text

The reference package nginx_input_otel correctly uses type: duration for collection_interval and initial_delay. This PR uses type: text which doesn't provide the same validation benefits.

Files affected: manifest.yml lines 47, 54

2. Missing TLS settings from test policy

The test-default.yml includes tls_insecure: false and tls_insecure_skip_verify: false but the expected output in test-default.expected doesn't show any TLS configuration, which is correct given the current (broken) logic, but should be updated once TLS logic is fixed.


Low Priority / Nitpicks

1. Consider consistency with nginx_input_otel naming

The nginx package uses nginx_otel_input as the directory name, while this uses apache_otel_input. While both are valid, consistency across packages improves discoverability.

2. Documentation mentions "container metrics"

In the PR description: "Comprehensive field definitions for container metrics" - but this package doesn't include field definitions (no fields/ directory) and Apache server-status metrics are not container metrics. Consider updating the PR description.

3. Package type consistency

The nginx_input_otel package has the internal name nginx_otel_input (manifest line 2), matching the PR's naming. Good consistency here.


What Looks Good

  • The endpoint default http://localhost:8080/server-status?auto matches the upstream default exactly
  • Docker test setup correctly enables mod_status with ExtendedStatus On
  • CODEOWNERS entry correctly assigns to @elastic/obs-infraobs-integrations
  • Documentation is comprehensive with configuration tables
  • Reference to upstream metrics documentation is appropriate
  • The httpd.conf test configuration is complete with proper server-status endpoint setup

The TLS logic bug is the critical issue that should be addressed before merge, as it would prevent users from configuring TLS properly.

@kpollich kpollich linked an issue Jan 29, 2026 that may be closed by this pull request
12 tasks
Comment thread .github/CODEOWNERS Outdated
Comment thread packages/apache_otel_input/manifest.yml Outdated
Comment thread packages/apache_input_otel/img/logo_apache.svg Outdated
Comment thread packages/apache_otel_input/manifest.yml Outdated
Comment thread .github/CODEOWNERS Outdated
- The `mod_status` module must be enabled and accessible


## Configuration Options

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For configuration options, we're currently pointing to the upstream config page to maintain a single source of truth. Otherwise, we'd need to ensure consistency across both documentation sources. Assuming the config parameters are the same in the input packages and upstream receivers, I'd recommend referencing the upstream config directly.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation has been updated as in other input packages with a reference to the upstream documentation.

{{/if}}
processors:
resourcedetection/system:
detectors: ["system"]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to provide a yaml box after this to get in the other non default resource attributes enabled if required.
Or do we need this process or at all here ?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any suggestion here @ishleenk17 , should then this processor be removed ? Or should we add a new variable to be able to customize the attributes like it was done in hostmetrics_input_otel package ?

@mrodm mrodm Feb 12, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now, this PR follows the same approach as the nginx_input_otel package, adding just the resource detection system

processors:
resourcedetection/system:
detectors: ["system"]
service:
pipelines:
metrics:
receivers: [nginx]
processors: [resourcedetection/system]

Should we leave it as it is defined in the nginx_input_otel for now?

@mrodm mrodm self-assigned this Feb 10, 2026
@mrodm
mrodm marked this pull request as draft February 10, 2026 17:19
@mrodm

mrodm commented Feb 10, 2026

Copy link
Copy Markdown
Collaborator

Converting to draft this PR for now to apply some changes.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package structure looks good and follows the established pattern from nginx_input_otel.

Existing unresolved review threads address the key issues:

  • Logo needs OTel branding to match other input packages
  • Resource attribute configuration question at line 70 of input.yml.hbs
  • Documentation configuration discussion

The TLS configuration template handles various combinations correctly, and the package passes elastic-package validation.


Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Comment thread packages/apache_input_otel/LICENSE.txt Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two existing unresolved threads need to be addressed:

  1. _dev/build/docs/README.md:17 - Configuration options documentation approach
  2. agent/input/input.yml.hbs:70 - Resource attributes handling

Additionally:

Minor: The PR description references "Comprehensive field definitions for container metrics" which appears to be copy-pasted from a different package. This is an Apache HTTP Server status package, not a container metrics package.


Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Comment thread packages/apache_input_otel/_dev/test/system/test-default-config.yml Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The package structure follows the established OTel input package pattern. A few items to consider:

  1. Missing TLS policy test (medium): There's no policy test to validate the TLS configuration template renders correctly. Similar packages (prometheus_input_otel) include a test-tls.yml test case.

  2. Unresolved question: There's an existing thread about whether the resourcedetection processor should be configurable via a YAML variable (similar to system_config in hostmetrics_input_otel). This decision affects users who need non-default resource attributes.


Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Comment thread packages/apache_input_otel/_dev/test/policy/test-default.yml

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test-tls-config.expected file has incorrect values that don't match the test-tls-config.yml input:

  1. Endpoint mismatch: Input specifies https://localhost:8080/server-status?auto but expected shows http://localhost:8080/server-status?auto
  2. TLS insecure mismatch: Input specifies tls_insecure: false but expected shows insecure: true

These discrepancies suggest the expected file was not regenerated after updating the test input, or there's a bug in the template rendering. Please regenerate the expected file using elastic-package test policy to ensure it matches the actual output.


Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Comment thread packages/apache_input_otel/_dev/test/policy/test-tls-config.expected Outdated
Comment thread packages/apache_input_otel/_dev/test/policy/test-tls-config.expected Outdated
Comment thread packages/apache_input_otel/_dev/test/policy/test-tls-config.yml
@mrodm

mrodm commented Feb 12, 2026

Copy link
Copy Markdown
Collaborator

@claude related to this #16970 , is the comment related to the documentation still applicable with the latest changes?

@github-actions

github-actions Bot commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

Claude finished @mrodm's task in 42s —— View job


Checking Documentation Review Comment

  • Gather repository context
  • Review the referenced review comment (PR review #3786160629)
  • Check the current state of documentation files
  • Determine if the comment is still applicable

Answer

No, the documentation comment is no longer applicable - it has been addressed.

The referenced review comment from ishleenk17 suggested:

"For configuration options, we're currently pointing to the upstream config page to maintain a single source of truth. Otherwise, we'd need to ensure consistency across both documentation sources. Assuming the config parameters are the same in the input packages and upstream receivers, I'd recommend referencing the upstream config directly."

Looking at the current state of packages/apache_input_otel/_dev/build/docs/README.md (lines 17-19), the documentation now follows this recommendation:

## Configuration

For the full list of settings exposed for the receiver and examples, refer to the [configuration](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/apachereceiver#configuration) section.

This approach:

  1. ✅ Points directly to the upstream configuration documentation
  2. ✅ Maintains a single source of truth
  3. ✅ Follows the same pattern as the nginx_input_otel package (which doesn't have a separate Configuration section at all)

The documentation is appropriately referencing the upstream Apache Receiver configuration page rather than duplicating configuration details locally.


Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@mrodm
mrodm marked this pull request as ready for review February 12, 2026 17:21
@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

cc @mrodm

@teresaromero teresaromero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻 lgtm

- context: datapoint
statements:
- set(attributes["data_stream.type"], "metrics")
- set(attributes["data_stream.dataset"], "apache_input_otel.apachereceiver")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will be updated after elastic/elastic-package#3285

@mrodm
mrodm merged commit a37dd8f into elastic:main Feb 16, 2026
12 checks passed
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Package apache_input_otel - 0.1.0 containing this change is available at https://epr.elastic.co/package/apache_input_otel/0.1.0/

@andrewkroh andrewkroh added the Integration:apache_input_otel Apache HTTP Server (OpenTelemetry) label Feb 17, 2026
jakubgalecki0 pushed a commit to jakubgalecki0/integrations that referenced this pull request Feb 19, 2026
)

This PR adds a new OTel input package that uses the OpenTelemetry
Collector's Apache Receiver through the EDOT (Elastic Distribution
of OpenTelemetry).

---------

Co-authored-by: Marcin "Perk" Stożek <perk@elastic.co>
Co-authored-by: Bill Easton <bill.easton@elastic.co>
Co-authored-by: Mario Rodriguez Molins <mario.rodriguez@elastic.co>
navnit-elastic pushed a commit to navnit-elastic/integrations that referenced this pull request Mar 2, 2026
)

This PR adds a new OTel input package that uses the OpenTelemetry
Collector's Apache Receiver through the EDOT (Elastic Distribution
of OpenTelemetry).

---------

Co-authored-by: Marcin "Perk" Stożek <perk@elastic.co>
Co-authored-by: Bill Easton <bill.easton@elastic.co>
Co-authored-by: Mario Rodriguez Molins <mario.rodriguez@elastic.co>
@perk
perk deleted the add-apache-web-server-status-input-package branch March 6, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-plz-triage documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. Integration:apache_input_otel Apache HTTP Server (OpenTelemetry) New Integration Issue or pull request for creating a new integration package.

7 participants