Skip to content

Commit

Permalink
Fix Logstash integration type checking issue (#9556)
Browse files Browse the repository at this point in the history
An update to the cel-go library added stricter type checking, and made drop invalid.
This is a work-around to "hide" the type in an array, until a better fix is available.

Closes: #9546,#9319
  • Loading branch information
robbavey authored Apr 17, 2024
1 parent f90d977 commit ff95860
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/logstash/_dev/deploy/docker/config/logstash.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
http.host: "0.0.0.0"
config.reload.automatic: true
path.logs: /usr/share/logstash/logs
log.format: json
log.format: plain
slowlog.threshold.warn: 1nanos
slowlog.threshold.info: 1nanos
slowlog.threshold.debug: 1nanos
Expand Down
2 changes: 1 addition & 1 deletion packages/logstash/_dev/deploy/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "2.3"
services:
logstash:
user: root
image: "docker.elastic.co/logstash/logstash:${ELASTIC_VERSION:-8.7.0}"
image: "docker.elastic.co/logstash/logstash:${ELASTIC_VERSION:-8.12.2}"
healthcheck:
test: ["CMD", "curl", "-f", "-u", "elastic:changeme", "http://127.0.0.1:9600/"]
retries: 300
Expand Down
7 changes: 4 additions & 3 deletions packages/logstash/_dev/deploy/variants.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
variants:
logstash_8.7.0:
ELASTIC_VERSION: 8.7.0
default: logstash_8.7.0
logstash_8.12.2:
ELASTIC_VERSION: 8.12.2

default: logstash_8.12.2
5 changes: 5 additions & 0 deletions packages/logstash/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# newer versions go on top
- version: "2.4.4"
changes:
- description: Fix type checking issue with latest version of beats/cel-go
type: bugfix
link: https://github.com/elastic/integrations/pull/9556
- version: "2.4.3"
changes:
- description: Add missing queue.capacity.* mappings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ input: logfile
data_stream:
vars:
paths:
- "{{SERVICE_LOGS_DIR}}/logstash-json.log"
- "{{SERVICE_LOGS_DIR}}/logstash-plain.log"
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ program: |
"events":body.events,
"jvm":{
"uptime_in_millis":body.jvm.uptime_in_millis,
"mem":body.jvm['mem'].drop("pools"),
"mem":[body.jvm['mem']].drop("pools")[0],
"threads":body.jvm.threads
},
"queue":body.queue,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ input: logfile
data_stream:
vars:
paths:
- "{{SERVICE_LOGS_DIR}}/logstash-slowlog-json.log"
- "{{SERVICE_LOGS_DIR}}/logstash-slowlog-plain.log"
2 changes: 1 addition & 1 deletion packages/logstash/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: logstash
title: Logstash
version: 2.4.3
version: 2.4.4
description: Collect logs and metrics from Logstash with Elastic Agent.
type: integration
icons:
Expand Down

0 comments on commit ff95860

Please sign in to comment.