Skip to content
Merged
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
6 changes: 4 additions & 2 deletions build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@
<antlr.version>4.9.2</antlr.version>

<!-- Defaults for integration tests -->
<elasticsearch-server.version>7.10.0</elasticsearch-server.version>
<elasticsearch.image>docker.elastic.co/elasticsearch/elasticsearch-oss:${elasticsearch-server.version}</elasticsearch.image>
<elasticsearch-server.version>7.16.3</elasticsearch-server.version>
<elasticsearch.image>docker.io/elastic/elasticsearch:${elasticsearch-server.version}</elasticsearch.image>
<logstash.image>docker.io/elastic/logstash:${elasticsearch-server.version}</logstash.image>
<kibana.image>docker.io/elastic/kibana:${elasticsearch-server.version}</kibana.image>
<elasticsearch.protocol>http</elasticsearch.protocol>
<opensearch-server.version>1.2.3</opensearch-server.version>
<opensearch.image>docker.io/opensearchproject/opensearch:${opensearch-server.version}</opensearch.image>
Expand Down
3 changes: 3 additions & 0 deletions docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2824,6 +2824,9 @@
<restassured-version>${rest-assured.version}</restassured-version>
<maven-version>${proposed-maven-version}</maven-version>
<gradle-version>${gradle-wrapper.version}</gradle-version>
<elasticsearch-image>${elasticsearch.image}</elasticsearch-image>
<logstash-image>${logstash.image}</logstash-image>
<kibana-image>${kibana.image}</kibana-image>
<keycloak-docker-image>${keycloak.docker.image}</keycloak-docker-image>

<jandex-maven-plugin-version>${jandex-maven-plugin.version}</jandex-maven-plugin-version>
Expand Down
26 changes: 16 additions & 10 deletions docs/src/main/asciidoc/centralized-log-management.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ https://github.com/quarkusio/quarkus/tree/main/docs/src/main/asciidoc
= Centralized log management (Graylog, Logstash, Fluentd)

include::./attributes.adoc[]
:es-version: 6.8.2

This guide explains how you can send your logs to a centralized log management system like Graylog, Logstash (inside the Elastic Stack or ELK - Elasticsearch, Logstash, Kibana) or
Fluentd (inside EFK - Elasticsearch, Fluentd, Kibana).
Expand Down Expand Up @@ -103,11 +102,12 @@ version: '3.2'

services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:{es-version}
image: {elasticsearch-image}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to include this attribute here:
https://github.com/quarkusio/quarkusio.github.io/blob/develop/_guides/attributes.adoc

Let's do it now so that we don't forget about it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you go: quarkusio/quarkusio.github.io#1438

I don't really know what I'm doing though; I would have expected this file to be generated. Should I remember to keep it in sync every time we upgrade to a new version of Elasticsearch?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah unfortunately it's not generated. It wasn't when I took over the role and I never took the time to think about how to do this properly.

ports:
- "9200:9200"
environment:
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
discovery.type: "single-node"
networks:
- graylog

Expand All @@ -117,13 +117,17 @@ services:
- graylog

graylog:
image: graylog/graylog:3.1
image: graylog/graylog:4.3.0
ports:
- "9000:9000"
- "12201:12201/udp"
- "1514:1514"
environment:
GRAYLOG_HTTP_EXTERNAL_URI: "http://127.0.0.1:9000/"
# CHANGE ME (must be at least 16 characters)!
GRAYLOG_PASSWORD_SECRET: "forpasswordencryption"
# Password: admin
GRAYLOG_ROOT_PASSWORD_SHA2: "8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918"
networks:
- graylog
depends_on:
Expand Down Expand Up @@ -185,17 +189,18 @@ version: '3.2'

services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:{es-version}
image: {elasticsearch-image}
ports:
- "9200:9200"
- "9300:9300"
environment:
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
discovery.type: "single-node"
networks:
- elk

logstash:
image: docker.elastic.co/logstash/logstash-oss:{es-version}
image: {logstash-image}
volumes:
- source: $HOME/pipelines
target: /usr/share/logstash/pipeline
Expand All @@ -210,7 +215,7 @@ services:
- elasticsearch

kibana:
image: docker.elastic.co/kibana/kibana-oss:{es-version}
image: {kibana-image}
ports:
- "5601:5601"
networks:
Expand Down Expand Up @@ -273,12 +278,13 @@ version: '3.2'

services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:{es-version}
image: {elasticsearch-image}
ports:
- "9200:9200"
- "9300:9300"
environment:
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
discovery.type: "single-node"
networks:
- efk

Expand All @@ -296,7 +302,7 @@ services:
- elasticsearch

kibana:
image: docker.elastic.co/kibana/kibana-oss:{es-version}
image: {kibana-image}
ports:
- "5601:5601"
networks:
Expand Down Expand Up @@ -359,7 +365,7 @@ version: '3.2'

services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:{es-version}
image: {elasticsearch-image}
ports:
- "9200:9200"
- "9300:9300"
Expand All @@ -382,7 +388,7 @@ services:
- elasticsearch

kibana:
image: docker.elastic.co/kibana/kibana-oss:{es-version}
image: {kibana-image}
ports:
- "5601:5601"
networks:
Expand Down
4 changes: 2 additions & 2 deletions docs/src/main/asciidoc/elasticsearch-dev-services.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ Note that the Elasticsearch hosts property is automatically configured with the

Dev Services for Elasticsearch only support Elasticsearch based images, Opensearch is not supported at the moment.

If you need to use a different image than the default one you can configure it via
If you need to use a different image than the default one you can configure it via:
[source, properties]
----
quarkus.elasticsearch.devservices.image-name=docker.elastic.co/elasticsearch/elasticsearch:7.17.0
quarkus.elasticsearch.devservices.image-name={elasticsearch-image}
----

== Current limitations
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/elasticsearch.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ If you want to use Docker to run an Elasticsearch instance, you can use the foll
[source,bash,subs=attributes+]
----
docker run --name elasticsearch -e "discovery.type=single-node" -e "ES_JAVA_OPTS=-Xms512m -Xmx512m"\
--rm -p 9200:9200 docker.elastic.co/elasticsearch/elasticsearch-oss:{elasticsearch-version}
--rm -p 9200:9200 {elasticsearch-image}
----

== Running the application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@
<run>
<env>
<discovery.type>single-node</discovery.type>
<xpack.security.enabled>false</xpack.security.enabled>
<ES_JAVA_OPTS>-Xms512m -Xmx512m</ES_JAVA_OPTS>
</env>
<ports>
<port>9200:9200</port>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@
<run>
<env>
<discovery.type>single-node</discovery.type>
<xpack.security.enabled>false</xpack.security.enabled>
<ES_JAVA_OPTS>-Xms512m -Xmx512m</ES_JAVA_OPTS>
</env>
<ports>
<port>9200:9200</port>
Expand Down
2 changes: 2 additions & 0 deletions integration-tests/elasticsearch-rest-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@
<run>
<env>
<discovery.type>single-node</discovery.type>
<xpack.security.enabled>false</xpack.security.enabled>
<ES_JAVA_OPTS>-Xms512m -Xmx512m</ES_JAVA_OPTS>
</env>
<ports>
<port>9200:9200</port>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@
<run>
<env>
<discovery.type>single-node</discovery.type>
<xpack.security.enabled>false</xpack.security.enabled>
<ES_JAVA_OPTS>-Xms512m -Xmx512m</ES_JAVA_OPTS>
</env>
<ports>
<port>9200:9200</port>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@
<run>
<env>
<discovery.type>single-node</discovery.type>
<xpack.security.enabled>false</xpack.security.enabled>
<ES_JAVA_OPTS>-Xms512m -Xmx512m</ES_JAVA_OPTS>
</env>
<ports>
<port>9200:9200</port>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@
<run>
<env>
<discovery.type>single-node</discovery.type>
<xpack.security.enabled>false</xpack.security.enabled>
<ES_JAVA_OPTS>-Xms512m -Xmx512m</ES_JAVA_OPTS>
</env>
<ports>
<port>9200:9200</port>
Expand Down
2 changes: 2 additions & 0 deletions integration-tests/hibernate-search-orm-elasticsearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@
<run>
<env>
<discovery.type>single-node</discovery.type>
<xpack.security.enabled>false</xpack.security.enabled>
<ES_JAVA_OPTS>-Xms512m -Xmx512m</ES_JAVA_OPTS>
</env>
<ports>
<port>9200:9200</port>
Expand Down
6 changes: 3 additions & 3 deletions integration-tests/logging-gelf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ mvn clean test -Dtest-gelf
Additionally, you can generate a native image and run the tests for this native image by adding `-Dnative`:

```
mvn clean integration-test -Dtest-gelf -Dnative
mvn clean integration-test -Dtest-containers -Dnative
```

## Testing with ELK (Elasticsearch, Logstash, Kibana) aka the Elastic Stack
Expand Down Expand Up @@ -61,7 +61,7 @@ Then you can use the following commands to run an ELK cluster using the provided
docker-compose -f src/test/resources/docker-compose-elk.yml up
```

Finally, run the test via `mvn clean install -Dtest-gelf -Dmaven.test.failure.ignore` and manually verify that the log
Finally, run the test via `mvn clean install -Dtest-containers -Dmaven.test.failure.ignore` and manually verify that the log
events has been pushed to ELK. You can use Kibana on http://localhost:5601/ to access those logs.


Expand Down Expand Up @@ -99,5 +99,5 @@ Then you can use the following commands to run an EFK cluster using the provided
docker-compose -f src/test/resources/docker-compose-efk.yml up
```

Finally, run the test via `mvn clean install -Dtest-gelf -Dmaven.test.failure.ignore` and manually verify that the log
Finally, run the test via `mvn clean install -Dtest-containers -Dmaven.test.failure.ignore` and manually verify that the log
events has been pushed to EFK. You can use Kibana on http://localhost:5601/ to access those logs.
8 changes: 5 additions & 3 deletions integration-tests/logging-gelf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
<autoCreateCustomNetworks>true</autoCreateCustomNetworks>
<images>
<image>
<name>docker.elastic.co/elasticsearch/elasticsearch-oss:7.9.3</name>
<name>${elasticsearch.image}</name>
<alias>elasticsearch</alias>
<run>
<network>
Expand All @@ -157,6 +157,8 @@
</ports>
<env>
<discovery.type>single-node</discovery.type>
<xpack.security.enabled>false</xpack.security.enabled>
<ES_JAVA_OPTS>-Xms512m -Xmx512m</ES_JAVA_OPTS>
</env>
<log>
<prefix>Elasticsearch: </prefix>
Expand All @@ -174,7 +176,7 @@
</run>
</image>
<image>
<name>docker.elastic.co/logstash/logstash-oss:7.9.3</name>
<name>${logstash.image}</name>
<alias>logstash</alias>
<run>
<network>
Expand All @@ -196,7 +198,7 @@
</log>
<volumes>
<bind>
<volume>${project.basedir}/src/test/resources/pipeline:/usr/share/logstash/pipeline</volume>
<volume>${project.basedir}/src/test/resources/pipeline:/usr/share/logstash/pipeline:Z</volume>
</bind>
</volumes>
<wait>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void test() {
//we need to await for a certain time as logstash needs to create the index template,
// then elasticsearch create the index
// then some logs being indexed.
await().atMost(10, TimeUnit.SECONDS)
await().atMost(20, TimeUnit.SECONDS)
.untilAsserted(
() -> {
RestAssured.given().when().get("/gelf-log-handler").then().statusCode(204);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ version: '3.2'

services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.2
image: docker.io/elastic/elasticsearch:7.16.3
environment:
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
discovery.type: "single-node"
xpack.security.enabled: "false"
networks:
- efk

Expand All @@ -22,7 +24,7 @@ services:
- elasticsearch

kibana:
image: docker.elastic.co/kibana/kibana-oss:6.8.2
image: docker.io/elastic/kibana:7.16.3
ports:
- "5601:5601"
networks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ version: '3.2'

services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.9.3
image: docker.io/elastic/elasticsearch:7.16.3
environment:
- ES_JAVA_OPTS=-Xms512m -Xmx512m
- "discovery.type=single-node"
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
discovery.type: "single-node"
xpack.security.enabled: "false"
networks:
- elk

logstash:
image: docker.elastic.co/logstash/logstash-oss:7.9.3
image: docker.io/elastic/logstash:7.16.3
volumes:
- source: $HOME/pipelines
target: /usr/share/logstash/pipeline
Expand All @@ -25,7 +26,7 @@ services:
- elasticsearch

kibana:
image: docker.elastic.co/kibana/kibana-oss:7.9.3
image: docker.io/elastic/kibana:7.16.3
ports:
- "5601:5601"
networks:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ version: '3.2'

services:
elasticsearch:
# Graylog 3 only works with Elasticsearch 6
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.9
image: docker.io/elastic/elasticsearch:7.16.3
environment:
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
discovery.type: "single-node"
xpack.security.enabled: "false"
networks:
- graylog

Expand All @@ -15,13 +16,16 @@ services:
- graylog

graylog:
image: graylog/graylog:3.3.8
image: graylog/graylog:4.3.0
ports:
- "9000:9000"
- "12201:12201/udp"
- "1514:1514"
environment:
GRAYLOG_HTTP_EXTERNAL_URI: "http://127.0.0.1:9000/"
# CHANGE ME (must be at least 16 characters)!
GRAYLOG_PASSWORD_SECRET: "forpasswordencryptionEXAMPLE"
# Password: admin
GRAYLOG_ROOT_PASSWORD_SHA2: "8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918"
networks:
- graylog
depends_on:
Expand Down