-
Notifications
You must be signed in to change notification settings - Fork 525
feat: add Agentless Hello World integration #15729
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
071873c
feat: add Agentless Hello World integration
nkvoll 062af80
fix: update pull request link in changelog for initial release
nkvoll 48a3802
fix ecs reference
nkvoll c8daacf
add pipeline test
nkvoll 0d69977
add pipeline and system tests
nkvoll 4a8bdf2
Update packages/agentless_hello_world/data_stream/generic/elasticsear…
nkvoll 8b39cac
Update packages/agentless_hello_world/_dev/build/build.yml
nkvoll ac4b894
only store the status code
nkvoll 0c4599e
remove message field
nkvoll 62fdfe8
Use external:ecs in packages/agentless_hello_world/data_stream/generi…
nkvoll 4067de0
use http.response.status_code directly
nkvoll 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
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,3 @@ | ||
| dependencies: | ||
| ecs: | ||
| reference: [email protected] | ||
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,5 @@ | ||
| - version: "0.1.0" | ||
| changes: | ||
| - description: Initial release. | ||
| type: enhancement | ||
| link: https://github.com/elastic/integrations/pull/15729 |
36 changes: 36 additions & 0 deletions
36
packages/agentless_hello_world/data_stream/generic/agent/stream/cel.yml.hbs
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,36 @@ | ||
| config_version: 2 | ||
| interval: 1m | ||
| resource.url: https://epr.elastic.co | ||
| program: | | ||
| request("GET", "https://epr.elastic.co") | ||
| .do_request() | ||
| .as(resp, resp.StatusCode == 200 ? | ||
| { | ||
| "events": [{ | ||
| "message": { | ||
| "state": "ok", | ||
| "result": bytes(resp.Body).decode_json() | ||
| }.encode_json() | ||
| }] | ||
| } | ||
| : | ||
| { | ||
| "events": [{ | ||
| "message": { | ||
| "state": "error", | ||
| "error": { | ||
| "code": string(resp.StatusCode), | ||
| "message": "GET: https://epr.elastic.co - " + ( | ||
| size(resp.Body) != 0 ? | ||
| string(resp.Body) | ||
| : | ||
| string(resp.Status) + " (" + string(resp.StatusCode) + ")" | ||
| ) | ||
| } | ||
| }.encode_json() | ||
| }] | ||
| } | ||
| ) | ||
| tags: | ||
| - agentless-hello-world | ||
| publisher_pipeline.disable_host: true |
72 changes: 72 additions & 0 deletions
72
packages/agentless_hello_world/data_stream/generic/elasticsearch/ingest_pipeline/default.yml
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,72 @@ | ||
| --- | ||
| description: Pipeline for processing Agentless Hello World generic logs. | ||
| processors: | ||
| - set: | ||
| field: ecs.version | ||
| value: '8.11.0' | ||
nkvoll marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - rename: | ||
nkvoll marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| field: message | ||
| target_field: event.original | ||
| ignore_missing: true | ||
| if: ctx.event?.original == null | ||
| - json: | ||
| field: event.original | ||
| target_field: json | ||
| ignore_failure: true | ||
| - rename: | ||
| field: json.state | ||
| target_field: agentless_hello_world.generic.state | ||
| ignore_missing: true | ||
| - rename: | ||
| field: json.result | ||
| target_field: agentless_hello_world.generic.result | ||
| ignore_missing: true | ||
| - set: | ||
| field: event.kind | ||
| value: event | ||
| - set: | ||
| field: event.type | ||
| value: [info] | ||
| - set: | ||
| field: event.category | ||
| value: [web] | ||
| - remove: | ||
| field: json | ||
| ignore_missing: true | ||
| - remove: | ||
| field: message | ||
| if: ctx.event?.original != null | ||
| ignore_missing: true | ||
| - remove: | ||
| field: event.original | ||
| if: ctx.tags == null || !(ctx.tags.contains('preserve_original_event')) | ||
| ignore_failure: true | ||
| ignore_missing: true | ||
| - script: | ||
| lang: painless | ||
| description: This script processor iterates over the whole document to remove fields with null values. | ||
| source: | | ||
| void handleMap(Map map) { | ||
| for (def x : map.values()) { | ||
| if (x instanceof Map) { | ||
| handleMap(x); | ||
| } else if (x instanceof List) { | ||
| handleList(x); | ||
| } | ||
| } | ||
| map.values().removeIf(v -> v == null); | ||
| } | ||
| void handleList(List list) { | ||
| for (def x : list) { | ||
| if (x instanceof Map) { | ||
| handleMap(x); | ||
| } else if (x instanceof List) { | ||
| handleList(x); | ||
| } | ||
| } | ||
| } | ||
| handleMap(ctx); | ||
| on_failure: | ||
| - set: | ||
| field: error.message | ||
| value: '{{ _ingest.on_failure_message }}' | ||
nkvoll marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
20 changes: 20 additions & 0 deletions
20
packages/agentless_hello_world/data_stream/generic/fields/base-fields.yml
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,20 @@ | ||
| - name: data_stream.type | ||
| type: constant_keyword | ||
| description: Data stream type. | ||
| - name: data_stream.dataset | ||
| type: constant_keyword | ||
| description: Data stream dataset. | ||
| - name: data_stream.namespace | ||
| type: constant_keyword | ||
| description: Data stream namespace. | ||
| - name: event.module | ||
| type: constant_keyword | ||
| description: Event module | ||
| value: agentless_hello_world | ||
| - name: event.dataset | ||
| type: constant_keyword | ||
| description: Event dataset | ||
| value: agentless_hello_world.generic | ||
| - name: '@timestamp' | ||
| type: date | ||
| description: Event timestamp. | ||
nkvoll marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
10 changes: 10 additions & 0 deletions
10
packages/agentless_hello_world/data_stream/generic/fields/fields.yml
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,10 @@ | ||
| - name: agentless_hello_world.generic | ||
| type: group | ||
| fields: | ||
| - name: state | ||
| type: keyword | ||
| description: State of the request (always "ok"). | ||
| - name: result | ||
| type: object | ||
| object_type: keyword | ||
| description: The JSON response from the EPR endpoint. |
7 changes: 7 additions & 0 deletions
7
packages/agentless_hello_world/data_stream/generic/manifest.yml
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,7 @@ | ||
| title: Generic logs | ||
| type: logs | ||
| streams: | ||
| - input: cel | ||
| title: Generic logs | ||
| description: Collect generic logs from EPR endpoint. | ||
| template_path: cel.yml.hbs |
4 changes: 4 additions & 0 deletions
4
packages/agentless_hello_world/data_stream/generic/sample_event.json
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,4 @@ | ||
| { | ||
| "message": "{\"state\":\"ok\",\"result\":{\"service\":\"package-registry\",\"version\":\"1.0.0\"}}", | ||
| "@timestamp": "2025-10-22T12:00:00.000Z" | ||
| } |
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,55 @@ | ||
| # Agentless Hello World | ||
|
|
||
| This is a sample integration designed to exercise the Agentless infrastructure. It periodically fetches data from `https://epr.elastic.co` every minute to demonstrate basic agentless functionality. | ||
|
|
||
| ## Overview | ||
|
|
||
| The Agentless Hello World integration is a minimal example that: | ||
| - Fetches data from the Elastic Package Registry (EPR) endpoint | ||
| - Runs every 1 minute | ||
| - Requires no user configuration | ||
|
|
||
| ## Configuration | ||
|
|
||
| This integration requires no configuration from the user. All settings are pre-configured: | ||
| - **Endpoint**: `https://epr.elastic.co` | ||
| - **Interval**: 1 minute | ||
| - **Deployment mode**: Agentless by default | ||
|
|
||
| ## Data Collection | ||
|
|
||
| The integration makes HTTP GET requests to `https://epr.elastic.co` and stores: | ||
| - **state**: Always set to "ok" for successful requests | ||
| - **result**: The JSON response body from the EPR endpoint | ||
|
|
||
| ## Requirements | ||
|
|
||
| ### Agentless-enabled integration | ||
|
|
||
| Agentless integrations allow you to collect data without having to manage Elastic Agent in your cloud. They make manual agent deployment unnecessary, so you can 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 the [Agentless integrations FAQ](https://www.elastic.co/guide/en/serverless/current/agentless-integration-troubleshooting.html). | ||
|
|
||
| Agentless deployments are only supported in Elastic Serverless and Elastic Cloud environments. This functionality is in beta and is subject to change. Beta features are not subject to the support SLA of official GA features. | ||
|
|
||
| ## Logs | ||
|
|
||
| ### Generic | ||
|
|
||
| The generic data stream collects responses from the EPR endpoint. | ||
|
|
||
| **ECS Field Reference** | ||
|
|
||
| Please refer to the following document for detailed information on ECS fields: | ||
| - [Elastic Common Schema](https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html) | ||
|
|
||
| **Exported fields** | ||
|
|
||
| | Field | Description | Type | | ||
| |---|---|---| | ||
| | @timestamp | Event timestamp. | date | | ||
| | agentless_hello_world.generic.result | The JSON response from the EPR endpoint. | object | | ||
| | agentless_hello_world.generic.state | State of the request (always "ok"). | keyword | | ||
| | data_stream.dataset | Data stream dataset. | constant_keyword | | ||
| | data_stream.namespace | Data stream namespace. | constant_keyword | | ||
| | data_stream.type | Data stream type. | constant_keyword | | ||
| | event.dataset | Event dataset | constant_keyword | | ||
| | event.module | Event module | constant_keyword | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,39 @@ | ||
| format_version: 3.3.2 | ||
| name: agentless_hello_world | ||
| title: Agentless Hello World | ||
| version: "0.1.0" | ||
| description: A sample integration to exercise the Agentless infrastructure by fetching https://epr.elastic.co every minute. | ||
| type: integration | ||
| categories: | ||
| - observability | ||
| conditions: | ||
| kibana: | ||
| version: "^8.18.0 || ^9.0.0" | ||
| elastic: | ||
| subscription: "basic" | ||
| icons: | ||
| - src: /img/icon.svg | ||
| title: Agentless Hello World | ||
| size: 32x32 | ||
| type: image/svg+xml | ||
| policy_templates: | ||
| - name: agentless_hello_world | ||
| title: Agentless Hello World | ||
| description: Collect data from EPR endpoint every minute. | ||
| deployment_modes: | ||
| default: | ||
| enabled: true | ||
| agentless: | ||
| enabled: true | ||
| is_default: true | ||
| organization: observability | ||
| division: engineering | ||
| team: agentless-team | ||
| inputs: | ||
| - type: cel | ||
| title: Collect data from EPR endpoint | ||
| description: Fetches https://epr.elastic.co every minute. | ||
| vars: [] | ||
| owner: | ||
| github: elastic/agentless-team | ||
| type: elastic |
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.
Uh oh!
There was an error while loading. Please reload this page.