Skip to content

ti_abusech: Update Fleet status message on API 402 #13718

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/tenable_io/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# newer versions go on top
- version: "3.10.1"
changes:
- description: Fix default request trace enabled behavior.
- description: Update Fleet error message on API 402.
type: bugfix
link: https://github.com/elastic/integrations/pull/13712
- version: "3.10.0"
Expand Down
5 changes: 5 additions & 0 deletions packages/ti_abusech/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "2.9.3"
changes:
- description: Avoid agent DEGRADED state on API 402.
type: bugfix
link: https://github.com/elastic/integrations/pull/13718
- version: "2.9.2"
changes:
- description: Fix default request trace enabled behavior.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@ program: |
),
"url": state.url
})
: resp.StatusCode == 402 ?
{
"events": [{
"error": {
"code": string(resp.StatusCode),
"id": string(resp.Status),
"message": "GET "+ state.url.trim_right("/") + ":" + (
size(resp.Body) != 0 ?
string(resp.Body)
:
string(resp.Status) + ' (' + string(resp.StatusCode) + ')'
) + "\n Use Auth Key (API Key) to avoid rate limiting issues. Please refer https://abuse.ch/blog/community-first/",
},
}],
"want_more": false,
}
:
{
"events": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ processors:
- set:
field: ecs.version
value: '8.11.0'
- fail:
tag: data_collection_error
if: ctx.error?.message != null && ctx.message == null && ctx.event?.original == null
message: error message set and no data to process.
- set:
field: event.kind
value: enrichment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,29 @@ program: |
"url": state.url
}
)
: resp.StatusCode == 402 ?
{
"events": {
"error": {
"code": string(resp.StatusCode),
"id": string(resp.Status),
"message": "POST "+ state.url.trim_right("/") + ":" + (
size(resp.Body) != 0 ?
string(resp.Body)
:
string(resp.Status) + ' (' + string(resp.StatusCode) + ')'
) + "\n Use Auth Key (API Key) to avoid rate limiting issues. Please refer https://abuse.ch/blog/community-first/",
},
},
"want_more": false,
}
:
{
"events": {
"error": {
"code": string(resp.StatusCode),
"id": string(resp.Status),
"message": "POST:"+(
"message": "POST "+ state.url.trim_right("/") + ":" + (
size(resp.Body) != 0 ?
string(resp.Body)
:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ processors:
- set:
field: ecs.version
value: '8.11.0'
- fail:
tag: data_collection_error
if: ctx.error?.message != null && ctx.message == null && ctx.event?.original == null
message: error message set and no data to process.
- set:
field: event.kind
value: enrichment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,22 @@ program: |
"initial_interval": state.initial_interval,
"url": state.url
})
: resp.StatusCode == 402 ?
{
"events": {
"error": {
"code": string(resp.StatusCode),
"id": string(resp.Status),
"message": "POST "+ state.url.trim_right("/") + ":" + (
size(resp.Body) != 0 ?
string(resp.Body)
:
string(resp.Status) + ' (' + string(resp.StatusCode) + ')'
) + "\n Use Auth Key (API Key) to avoid rate limiting issues. Please refer https://abuse.ch/blog/community-first/",
},
},
"want_more": false,
}
:
{
"events": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ processors:
- set:
field: ecs.version
value: '8.11.0'
- fail:
tag: data_collection_error
if: ctx.error?.message != null && ctx.message == null && ctx.event?.original == null
message: error message set and no data to process.
- set:
field: event.kind
value: enrichment
Expand Down
16 changes: 16 additions & 0 deletions packages/ti_abusech/data_stream/url/agent/stream/cel.yml.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,22 @@ program: |
"url": state.url
}
)
: resp.StatusCode == 402 ?
{
"events": {
"error": {
"code": string(resp.StatusCode),
"id": string(resp.Status),
"message": "GET "+ state.url.trim_right("/") + ":" + (
size(resp.Body) != 0 ?
string(resp.Body)
:
string(resp.Status) + ' (' + string(resp.StatusCode) + ')'
) + "\n Use Auth Key (API Key) to avoid rate limiting issues. Please refer https://abuse.ch/blog/community-first/",
},
},
"want_more": false,
}
:
{
"events": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ processors:
- set:
field: ecs.version
value: '8.11.0'
- fail:
tag: data_collection_error
if: ctx.error?.message != null && ctx.message == null && ctx.event?.original == null
message: error message set and no data to process.
- set:
field: event.kind
value: enrichment
Expand Down
2 changes: 1 addition & 1 deletion packages/ti_abusech/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ti_abusech
title: AbuseCH
version: "2.9.2"
version: "2.9.3"
description: Ingest threat intelligence indicators from URL Haus, Malware Bazaar, and Threat Fox feeds with Elastic Agent.
type: integration
format_version: "3.2.3"
Expand Down