From c12feeec61c6797c499b5691d41f0b19e28fcff0 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Tue, 28 Oct 2025 13:19:47 +0100 Subject: [PATCH 1/4] New httpcheck OTel package --- packages/httpcheck/LICENSE.txt | 93 ++++++++++++++++ packages/httpcheck/_dev/build/docs/README.md | 102 ++++++++++++++++++ .../_dev/deploy/docker/docker-compose.yml | 6 ++ .../_dev/test/policy/test-eprcheck.expected | 51 +++++++++ .../_dev/test/policy/test-eprcheck.yml | 3 + .../_dev/test/system/test-local-config.yml | 7 ++ packages/httpcheck/agent/input/input.yml.hbs | 20 ++++ packages/httpcheck/changelog.yml | 6 ++ packages/httpcheck/docs/README.md | 85 +++++++++++++++ packages/httpcheck/img/http-logo.svg | 1 + packages/httpcheck/manifest.yml | 67 ++++++++++++ packages/httpcheck/sample_event.json | 28 +++++ 12 files changed, 469 insertions(+) create mode 100644 packages/httpcheck/LICENSE.txt create mode 100644 packages/httpcheck/_dev/build/docs/README.md create mode 100644 packages/httpcheck/_dev/deploy/docker/docker-compose.yml create mode 100644 packages/httpcheck/_dev/test/policy/test-eprcheck.expected create mode 100644 packages/httpcheck/_dev/test/policy/test-eprcheck.yml create mode 100644 packages/httpcheck/_dev/test/system/test-local-config.yml create mode 100644 packages/httpcheck/agent/input/input.yml.hbs create mode 100644 packages/httpcheck/changelog.yml create mode 100644 packages/httpcheck/docs/README.md create mode 100644 packages/httpcheck/img/http-logo.svg create mode 100644 packages/httpcheck/manifest.yml create mode 100644 packages/httpcheck/sample_event.json diff --git a/packages/httpcheck/LICENSE.txt b/packages/httpcheck/LICENSE.txt new file mode 100644 index 00000000000..809108b857f --- /dev/null +++ b/packages/httpcheck/LICENSE.txt @@ -0,0 +1,93 @@ +Elastic License 2.0 + +URL: https://www.elastic.co/licensing/elastic-license + +## Acceptance + +By using the software, you agree to all of the terms and conditions below. + +## Copyright License + +The licensor grants you a non-exclusive, royalty-free, worldwide, +non-sublicensable, non-transferable license to use, copy, distribute, make +available, and prepare derivative works of the software, in each case subject to +the limitations and conditions below. + +## Limitations + +You may not provide the software to third parties as a hosted or managed +service, where the service provides users with access to any substantial set of +the features or functionality of the software. + +You may not move, change, disable, or circumvent the license key functionality +in the software, and you may not remove or obscure any functionality in the +software that is protected by the license key. + +You may not alter, remove, or obscure any licensing, copyright, or other notices +of the licensor in the software. Any use of the licensor’s trademarks is subject +to applicable law. + +## Patents + +The licensor grants you a license, under any patent claims the licensor can +license, or becomes able to license, to make, have made, use, sell, offer for +sale, import and have imported the software, in each case subject to the +limitations and conditions in this license. This license does not cover any +patent claims that you cause to be infringed by modifications or additions to +the software. If you or your company make any written claim that the software +infringes or contributes to infringement of any patent, your patent license for +the software granted under these terms ends immediately. If your company makes +such a claim, your patent license ends immediately for work on behalf of your +company. + +## Notices + +You must ensure that anyone who gets a copy of any part of the software from you +also gets a copy of these terms. + +If you modify the software, you must include in any modified copies of the +software prominent notices stating that you have modified the software. + +## No Other Rights + +These terms do not imply any licenses other than those expressly granted in +these terms. + +## Termination + +If you use the software in violation of these terms, such use is not licensed, +and your licenses will automatically terminate. If the licensor provides you +with a notice of your violation, and you cease all violation of this license no +later than 30 days after you receive that notice, your licenses will be +reinstated retroactively. However, if you violate these terms after such +reinstatement, any additional violation of these terms will cause your licenses +to terminate automatically and permanently. + +## No Liability + +*As far as the law allows, the software comes as is, without any warranty or +condition, and the licensor will not be liable to you for any damages arising +out of these terms or the use or nature of the software, under any kind of +legal claim.* + +## Definitions + +The **licensor** is the entity offering these terms, and the **software** is the +software the licensor makes available under these terms, including any portion +of it. + +**you** refers to the individual or entity agreeing to these terms. + +**your company** is any legal entity, sole proprietorship, or other kind of +organization that you work for, plus all organizations that have control over, +are under the control of, or are under common control with that +organization. **control** means ownership of substantially all the assets of an +entity, or the power to direct its management and policies by vote, contract, or +otherwise. Control can be direct or indirect. + +**your licenses** are all the licenses granted to you for the software under +these terms. + +**use** means anything you do with the software requiring one of your licenses. + +**trademark** means trademarks, service marks, and similar rights. diff --git a/packages/httpcheck/_dev/build/docs/README.md b/packages/httpcheck/_dev/build/docs/README.md new file mode 100644 index 00000000000..5b43f9731fe --- /dev/null +++ b/packages/httpcheck/_dev/build/docs/README.md @@ -0,0 +1,102 @@ +{{- generatedHeader }} +{{/* +This template can be used as a starting point for writing documentation for your new integration. For each section, fill in the details +described in the comments. + +Find more detailed documentation guidelines in https://www.elastic.co/docs/extend/integrations/documentation-guidelines +*/}} +# HTTP Check Integration for Elastic + +## Overview +{{/* Complete this section with a short summary of what data this integration collects and what use cases it enables */}} +The HTTP Check integration for Elastic performs HTTP checks using the [HTTP check +receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/httpcheckreceiver/README.md) of the OTel Collector. + +This integration can be used to monitor the availability of HTTP endpoints. + +### How it works +{{/* Add a high level overview on how this integration works. For example, does it collect data from API calls or recieving data from a network or file.*/}} +This integration performs periodic HTTP checks to the configured endpoints. + +Apart from the endpoints, it is also possible to select the HTTP method and +headers to use in the requests. + +## What data does this integration collect? +{{/* Complete this section with information on what types of data the integration collects, and link to reference documentation if available */}} +This integration collects metrics with information about the +availability of the HTTP endpoints, and the status codes returned by requests. + +Key metrics are stored under the metrics object, and they include: +| Metric Name | Description | Type | +|-------------|-------------|------| +| httpcheck.status | For each status class (1xx, 2xx, 3xx, 4xx or 5xx), it is set to 1 if the check returned an status of this class, to 0 otherwise. | Gauge | +| httpcheck.duration | Total duration of the request in milliseconds. | Gauge | + +Documents for these metrics include attributes that follow [Semantic Conventions +for HTTP data](https://opentelemetry.io/docs/specs/semconv/http/). + +### Supported use cases +{{/* Add details on the use cases that can be enabled by using this integration. Explain why a user would want to install and use this integration. */}} +This integration can be used to monitor the availability of HTTP endpoints. In a +more general sense, it can be used to perform requests to specific endpoints. + +## How do I deploy this integration? + +### Agent-based deployment + +Elastic Agent must be installed. For more details, check the Elastic Agent [installation instructions](docs-content://reference/fleet/install-elastic-agents.md). You can install only one Elastic Agent per host. + +Elastic Agent is required to have network connectivity with the monitored +endpoints. + +{{/* If agentless is available for this integration, we'll want to include that here as well. +### Agentless deployment + +Agentless deployments are only supported in Elastic Serverless and Elastic Cloud environments. Agentless deployments provide a means to ingest data while avoiding the orchestration, management, and maintenance needs associated with standard ingest infrastructure. Using an agentless deployment makes manual agent deployment unnecessary, allowing you to focus on your data instead of the agent that collects it. + +For more information, refer to [Agentless integrations](https://www.elastic.co/guide/en/serverless/current/security-agentless-integrations.html) and [Agentless integrations FAQ](https://www.elastic.co/guide/en/serverless/current/agentless-integration-troubleshooting.html) +*/}} + +### Onboard / configure +{{/* List the steps that will need to be followed in order to completely set up a working integration. +For integrations that support multiple input types, be sure to add steps for all inputs. +*/}} +This integration needs to be configured with the list of endpoints to monitor, +and the HTTP method and headers that should be used on the requests. + +With each policy you can monitor multiple endpoints that require the same method +and headers. For example you can use a single policy to monitor multiple +endpoints if you only need to check its availability with the `GET` method. + +In cases where different headers or methods are required, multiple policies must +be created, one for each combination of configurations. + +### Validation +{{/* How can the user test whether the integration is working? Including example commands or test files if applicable */}} +Once configured, you can find documents with information about the status code +of the requests done to the configured endpoints. + +## Troubleshooting + +For help with Elastic ingest tools, check [Common problems](https://www.elastic.co/docs/troubleshoot/ingest/fleet/common-problems). +{{/* +Add any vendor specific troubleshooting here. + +Are there common issues or “gotchas” for deploying this integration? If so, how can they be resolved? +If applicable, links to the third-party software’s troubleshooting documentation. +*/}} + +## Scaling + +For more information on architectures that can be used for scaling this integration, check the [Ingest Architectures](https://www.elastic.co/docs/manage-data/ingest/ingest-reference-architectures) documentation. +{{/* Add any vendor specific scaling information here */}} + +## Reference + +### Inputs used + +This package uses the [HTTP Check Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/httpcheckreceiver/README.md) of the OTel collector. + +{{/* All inputs used by this package will be automatically listed here. */}} +{{ inputDocs }} + diff --git a/packages/httpcheck/_dev/deploy/docker/docker-compose.yml b/packages/httpcheck/_dev/deploy/docker/docker-compose.yml new file mode 100644 index 00000000000..61ae2ded6a9 --- /dev/null +++ b/packages/httpcheck/_dev/deploy/docker/docker-compose.yml @@ -0,0 +1,6 @@ +version: '2.3' +services: + web: + image: nginx:1.29.0-alpine-slim + ports: + - 80 diff --git a/packages/httpcheck/_dev/test/policy/test-eprcheck.expected b/packages/httpcheck/_dev/test/policy/test-eprcheck.expected new file mode 100644 index 00000000000..9ac9ac20d71 --- /dev/null +++ b/packages/httpcheck/_dev/test/policy/test-eprcheck.expected @@ -0,0 +1,51 @@ +connectors: + forward: {} +exporters: + elasticsearch/componentid-0: + endpoints: + - https://elasticsearch:9200 +inputs: [] +output_permissions: + default: + _elastic_agent_checks: + cluster: + - monitor + _elastic_agent_monitoring: + indices: [] + uuid-for-permissions-on-related-indices: + indices: + - names: + - metrics-*-* + privileges: + - auto_configure + - create_doc +processors: + transform/componentid-0: + metric_statements: + - context: datapoint + statements: + - set(attributes["data_stream.type"], "metrics") + - set(attributes["data_stream.dataset"], "httpcheck.httpcheckreceiver") + - set(attributes["data_stream.namespace"], "ep") +receivers: + httpcheck/componentid-0: + collection_interval: 1m + targets: + - endpoints: + - https://epr.elastic.co + method: GET +secret_references: [] +service: + pipelines: + metrics: + exporters: + - elasticsearch/componentid-0 + receivers: + - forward + metrics/componentid-0: + exporters: + - forward + processors: + - transform/componentid-0 + receivers: + - httpcheck/componentid-0 diff --git a/packages/httpcheck/_dev/test/policy/test-eprcheck.yml b/packages/httpcheck/_dev/test/policy/test-eprcheck.yml new file mode 100644 index 00000000000..25fa4992fba --- /dev/null +++ b/packages/httpcheck/_dev/test/policy/test-eprcheck.yml @@ -0,0 +1,3 @@ +vars: + endpoints: + - https://epr.elastic.co diff --git a/packages/httpcheck/_dev/test/system/test-local-config.yml b/packages/httpcheck/_dev/test/system/test-local-config.yml new file mode 100644 index 00000000000..1f6e5306f21 --- /dev/null +++ b/packages/httpcheck/_dev/test/system/test-local-config.yml @@ -0,0 +1,7 @@ +service: web +vars: + period: 1s + endpoints: + - http://{{Hostname}}:{{Port}} +assert: + min_count: 50 diff --git a/packages/httpcheck/agent/input/input.yml.hbs b/packages/httpcheck/agent/input/input.yml.hbs new file mode 100644 index 00000000000..a127b79176f --- /dev/null +++ b/packages/httpcheck/agent/input/input.yml.hbs @@ -0,0 +1,20 @@ +receivers: + httpcheck: + collection_interval: {{period}} + targets: + - method: {{method}} + endpoints: +{{#each endpoints}} + - {{this}} +{{/each}} +{{#if headers }} + headers: +{{#each headers}} + {{this}} +{{/each}} +{{/if}} + +service: + pipelines: + metrics: + receivers: [httpcheck] diff --git a/packages/httpcheck/changelog.yml b/packages/httpcheck/changelog.yml new file mode 100644 index 00000000000..edc9c85ef4a --- /dev/null +++ b/packages/httpcheck/changelog.yml @@ -0,0 +1,6 @@ +# newer versions go on top +- version: "0.1.0" + changes: + - description: Initial version of the package + type: enhancement + link: https://github.com/elastic/integrations/pull/15785 diff --git a/packages/httpcheck/docs/README.md b/packages/httpcheck/docs/README.md new file mode 100644 index 00000000000..1c930aef1bd --- /dev/null +++ b/packages/httpcheck/docs/README.md @@ -0,0 +1,85 @@ + + + +# HTTP Check Integration for Elastic + +## Overview + +The HTTP Check integration for Elastic performs HTTP checks using the [HTTP check +receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/httpcheckreceiver/README.md) of the OTel Collector. + +This integration can be used to monitor the availability of HTTP endpoints. + +### How it works + +This integration performs periodic HTTP checks to the configured endpoints. + +Apart from the endpoints, it is also possible to select the HTTP method and +headers to use in the requests. + +## What data does this integration collect? + +This integration collects metrics with information about the +availability of the HTTP endpoints, and the status codes returned by requests. + +Key metrics are stored under the metrics object, and they include: +| Metric Name | Description | Type | +|-------------|-------------|------| +| httpcheck.status | For each status class (1xx, 2xx, 3xx, 4xx or 5xx), it is set to 1 if the check returned an status of this class, to 0 otherwise. | Gauge | +| httpcheck.duration | Total duration of the request in milliseconds. | Gauge | + +Documents for these metrics include attributes that follow [Semantic Conventions +for HTTP data](https://opentelemetry.io/docs/specs/semconv/http/). + +### Supported use cases + +This integration can be used to monitor the availability of HTTP endpoints. In a +more general sense, it can be used to perform requests to specific endpoints. + +## How do I deploy this integration? + +### Agent-based deployment + +Elastic Agent must be installed. For more details, check the Elastic Agent [installation instructions](docs-content://reference/fleet/install-elastic-agents.md). You can install only one Elastic Agent per host. + +Elastic Agent is required to have network connectivity with the monitored +endpoints. + + + +### Onboard / configure + +This integration needs to be configured with the list of endpoints to monitor, +and the HTTP method and headers that should be used on the requests. + +With each policy you can monitor multiple endpoints that require the same method +and headers. For example you can use a single policy to monitor multiple +endpoints if you only need to check its availability with the `GET` method. + +In cases where different headers or methods are required, multiple policies must +be created, one for each combination of configurations. + +### Validation + +Once configured, you can find documents with information about the status code +of the requests done to the configured endpoints. + +## Troubleshooting + +For help with Elastic ingest tools, check [Common problems](https://www.elastic.co/docs/troubleshoot/ingest/fleet/common-problems). + + +## Scaling + +For more information on architectures that can be used for scaling this integration, check the [Ingest Architectures](https://www.elastic.co/docs/manage-data/ingest/ingest-reference-architectures) documentation. + + +## Reference + +### Inputs used + +This package uses the [HTTP Check Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/httpcheckreceiver/README.md) of the OTel collector. + + + + diff --git a/packages/httpcheck/img/http-logo.svg b/packages/httpcheck/img/http-logo.svg new file mode 100644 index 00000000000..b495ddf1989 --- /dev/null +++ b/packages/httpcheck/img/http-logo.svg @@ -0,0 +1 @@ +IETF-Badge-HTTP \ No newline at end of file diff --git a/packages/httpcheck/manifest.yml b/packages/httpcheck/manifest.yml new file mode 100644 index 00000000000..cc9645f52e3 --- /dev/null +++ b/packages/httpcheck/manifest.yml @@ -0,0 +1,67 @@ +format_version: 3.5.0 +name: httpcheck +title: "Simple HTTP Check" +version: 0.1.0 +source: + license: "Elastic-2.0" +description: "Perform HTTP checks using the HTTP Check receiver of the OTel Collector." +type: input +categories: + - monitoring + - network + - web +conditions: + kibana: + version: "^9.2.0" + elastic: + subscription: "basic" +icons: + - src: /img/http-logo.svg + title: HTTP logo + size: 32x32 + type: image/svg+xml +policy_templates: + - name: httpcheckreceiver + type: metrics + title: HTTP Check + description: Perform HTTP checks and collect its results. + input: otelcol + template_path: input.yml.hbs + vars: + - name: period + type: text + title: Collection Interval + multi: false + required: true + show_user: true + default: 1m + - name: method + type: select + title: "HTTP method to use" + multi: false + options: + - value: GET + text: GET + - value: HEAD + text: HEAD + - value: POST + text: POST + required: true + show_user: true + default: GET + - name: endpoints + type: text + title: HTTP endpoints to check + multi: true + required: true + show_user: true + - name: headers + type: text + title: HTTP headers + description: HTTP headers, defined as YAML key-values. + multi: true + required: false + show_user: false +owner: + github: elastic/ecosystem + type: elastic diff --git a/packages/httpcheck/sample_event.json b/packages/httpcheck/sample_event.json new file mode 100644 index 00000000000..ef9baae8610 --- /dev/null +++ b/packages/httpcheck/sample_event.json @@ -0,0 +1,28 @@ +{ + "@timestamp": 1761653610755, + "_metric_names_hash": "dbc9255cf6baf03b", + "attributes": { + "http.method": "GET", + "http.status_class": "2xx", + "http.url": "http://svc-web:80" + }, + "data_stream": { + "dataset": "httpcheck.httpcheckreceiver.otel", + "namespace": "73467", + "type": "metrics" + }, + "event": { + "agent_id_status": "missing", + "ingested": "2025-10-28T12:13:39Z" + }, + "metrics": { + "httpcheck.status": 1 + }, + "resource": {}, + "scope": { + "name": "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/httpcheckreceiver", + "version": "9.2.0" + }, + "start_timestamp": 1761653609747, + "unit": "1" +} From c08dd936d98dc3d1071bdfd88f3110b9c318fd91 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Tue, 28 Oct 2025 13:56:14 +0100 Subject: [PATCH 2/4] Add CODEOWNERS --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0eb2986bbfc..08797445917 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -272,6 +272,7 @@ /packages/hpe_aruba_cx @elastic/integration-experience /packages/hta @elastic/sec-applied-ml /packages/http_endpoint @elastic/security-service-integrations +/packages/httpcheck @elastic/ecosystem /packages/httpjson @elastic/security-service-integrations /packages/ibm_qradar @elastic/security-service-integrations /packages/ibmmq @elastic/obs-infraobs-integrations From 209e7cffa1d4ccf97bc49fc50d1daca2d879b8e9 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Wed, 29 Oct 2025 18:21:49 +0100 Subject: [PATCH 3/4] Add opentelemetry category --- packages/httpcheck/manifest.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/httpcheck/manifest.yml b/packages/httpcheck/manifest.yml index cc9645f52e3..b5130dd8584 100644 --- a/packages/httpcheck/manifest.yml +++ b/packages/httpcheck/manifest.yml @@ -9,6 +9,7 @@ type: input categories: - monitoring - network + - opentelemetry - web conditions: kibana: From fb90af266c7703e867652cee2809c7cbf8a900ec Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Wed, 29 Oct 2025 20:15:51 +0100 Subject: [PATCH 4/4] Set default dataset --- packages/httpcheck/sample_event.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/httpcheck/sample_event.json b/packages/httpcheck/sample_event.json index ef9baae8610..eb3c7b3072a 100644 --- a/packages/httpcheck/sample_event.json +++ b/packages/httpcheck/sample_event.json @@ -7,7 +7,7 @@ "http.url": "http://svc-web:80" }, "data_stream": { - "dataset": "httpcheck.httpcheckreceiver.otel", + "dataset": "httpcheckreceiver.otel", "namespace": "73467", "type": "metrics" },