Skip to content

Commit

Permalink
Re-enable OOTB discovery for Apache Web Server (#5353)
Browse files Browse the repository at this point in the history
* Consolidate docker test image

* Re-enable Apache webserver discovery

* Update CHANGELOG.md

* Use commas on template as pattern in other templates

* Add notice about discovering containers from process on host OS
  • Loading branch information
pjanotti authored Sep 10, 2024
1 parent e0cea93 commit 84a21d6
Show file tree
Hide file tree
Showing 19 changed files with 97 additions and 571 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@

- (Splunk) Add `apachespark` receiver ([#5318](https://github.com/signalfx/splunk-otel-collector/pull/5318))

### 💡 Enhancements 💡

- (Splunk) Apache Web Server Auto Discovery: set the default discovered endpoint to match the OpenTelemetry `apachereceiver` default: `http://`endpoint`/server-status?auto` ([#5353](https://github.com/signalfx/splunk-otel-collector/pull/5353))
If the collector is running as a process on the host OS and the Apache Web Server is in a Docker container add `--set=splunk.discovery.extensions.docker_observer.config.use_host_bindings=true` to the command-line arguments for the discovery to create the correct endpoint.

## v0.108.1

This Splunk OpenTelemetry Collector release includes changes from the [opentelemetry-collector v0.108.1](https://github.com/open-telemetry/opentelemetry-collector/releases/tag/v0.108.1) and the [opentelemetry-collector-contrib v0.108.0](https://github.com/open-telemetry/opentelemetry-collector-contrib/releases/tag/v0.108.0) releases where appropriate.
Expand Down Expand Up @@ -300,7 +305,7 @@ Note: Some `core` dependencies were incorrectly still set to `v0.105.0` for this
### 💡 Enhancements 💡

- (Splunk) Auto Discovery for Linux:
- Bring Apache Web Server receiver into the discovery mode ([#5109](https://github.com/signalfx/splunk-otel-collector/pull/5109))
- Bring Apache Web Server receiver into the discovery mode ([#5116](https://github.com/signalfx/splunk-otel-collector/pull/5116))
- (Splunk) linux installer script: decouple the endpoint and protocol options ([#5164](https://github.com/signalfx/splunk-otel-collector/pull/5164))
- (Splunk) Bump version of com.signalfx.public:signalfx-commons-protoc-java to 1.0.44 ([#5186](https://github.com/signalfx/splunk-otel-collector/pull/5186))
- (Splunk) Bump version of github.com/snowflakedb/gosnowflake from to 1.11.0 ([#5176](https://github.com/signalfx/splunk-otel-collector/pull/5176))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#####################################################################################
# This file is generated by the Splunk Distribution of the OpenTelemetry Collector. #
# #
# It reflects the default configuration bundled in the Collector executable for use #
# in discovery mode (--discovery) and is provided for reference or customization. #
# Please note that any changes made to this file will need to be reconciled during #
# upgrades of the Collector. #
#####################################################################################
# apache:
# enabled: true
# rule:
# docker_observer: type == "container" and any([name, image, command], {# matches "(?i)httpd.*"}) and not (command matches "splunk.discovery")
# host_observer: type == "hostport" and command matches "(?i)httpd.*" and not (command matches "splunk.discovery")
# k8s_observer: type == "port" and pod.name matches "(?i)httpd.*"
# config:
# default:
# endpoint: "http://`endpoint`/server-status?auto"
# status:
# metrics:
# - status: successful
# strict: apache.uptime
# message: apachereceiver receiver is working!
# statements:
# - status: failed
# regexp: 'connect: network is unreachable'
# message: The container cannot be reached by the Collector. Make sure they're in the same network.
# - status: failed
# regexp: 'connect: connection refused'
# message: The container is refusing apache webserver connections.
2 changes: 1 addition & 1 deletion docker/apache/status.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ExtendedStatus on
<Location /mod_status>
<Location /server-status>
SetHandler server-status
</Location>
8 changes: 1 addition & 7 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
image: quay.io/splunko11ytest/apache:latest
profiles:
- smartagent
- integration-test-apache-discovery
build: ./apache
ports:
- "18080:80"
Expand Down Expand Up @@ -298,10 +299,3 @@ services:
interval: 10s
timeout: 5s
retries: 5
httpd-apache-discovery:
image: httpd:2.4
build: ./httpd-discovery
profiles:
- integration-test-apache-discovery
ports:
- "8080:80"
3 changes: 0 additions & 3 deletions docker/httpd-discovery/Dockerfile

This file was deleted.

Loading

0 comments on commit 84a21d6

Please sign in to comment.