Skip to content

Commit

Permalink
Support Graylog 6 (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
irgendwr authored May 16, 2024
1 parent 1787677 commit 212cd72
Show file tree
Hide file tree
Showing 14 changed files with 3,786 additions and 3,136 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,16 @@ jobs:
echo "Checking out Graylog ${{ env.GRAYLOG_VERSION }}"
git clone --depth 1 --branch "${{ env.GRAYLOG_VERSION }}" https://github.com/Graylog2/graylog2-server.git ../graylog2-server
pushd ../graylog2-server
mvn generate-resources -pl graylog2-server -B -V
pushd graylog2-web-interface
yarn install
env disable_plugins=true ./node_modules/.bin/webpack --config webpack.vendor.js
popd; popd
./mvnw compile
popd
- name: Build
run: mvn -B package --file pom.xml
run: ../graylog2-server/mvnw -B package --file pom.xml
- name: Package deb
if: startsWith(github.ref, 'refs/tags/v')
run: mvn jdeb:jdeb
run: ../graylog2-server/mvnw jdeb:jdeb
- name: Package rpm
if: startsWith(github.ref, 'refs/tags/v')
run: mvn rpm:rpm
run: ../graylog2-server/mvnw rpm:rpm
- name: Cleanup
if: startsWith(github.ref, 'refs/tags/v')
run: rm -f target/original-*.jar
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ jobs:
echo "Checking out Graylog ${{ env.GRAYLOG_VERSION }}"
git clone --depth 1 --branch "${{ env.GRAYLOG_VERSION }}" https://github.com/Graylog2/graylog2-server.git ../graylog2-server
pushd ../graylog2-server
mvn generate-resources -pl graylog2-server -B -V
pushd graylog2-web-interface
yarn install
env disable_plugins=true ./node_modules/.bin/webpack --config webpack.vendor.js
popd; popd
./mvnw compile
popd
- name: Build
run: mvn -B package --file pom.xml
run: ../graylog2-server/mvnw -B package --file pom.xml
10 changes: 10 additions & 0 deletions .mvn/jvm.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

[![Build status](https://github.com/irgendwr/TelegramAlert/workflows/build/badge.svg)](https://github.com/irgendwr/TelegramAlert/actions?query=workflow%3Abuild)
[![GitHub Release](https://img.shields.io/github/release/irgendwr/TelegramAlert.svg)](https://github.com/irgendwr/TelegramAlert/releases)
[![Graylog Marketplace](https://img.shields.io/badge/Graylog-Marketplace-blue.svg)](https://marketplace.graylog.org/addons/8a67cfdf-8c1c-4d17-87bf-db38e79015f1)

TelegramNotification allows you to send [Graylog](https://www.graylog.org) alert messages to a specified [Telegram](https://telegram.org) chat.

## Requirements

Requires Graylog 5 or later. It's recommended to use the [latest Graylog release](https://www.graylog.org/products/latestversion).
Requires Graylog 6. Check the release notes for details.

## Installation

Expand Down
22 changes: 12 additions & 10 deletions docs/development/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@ echo "Checking out Graylog ${GRAYLOG_VERSION}"
git clone --depth 1 --branch "${GRAYLOG_VERSION}" https://github.com/Graylog2/graylog2-server.git ../graylog2-server
# Build Graylog web interface
pushd ../graylog2-server
mvn generate-resources -pl graylog2-server -B -V
pushd graylog2-web-interface
yarn install
env disable_plugins=true ./node_modules/.bin/webpack --config webpack.vendor.js
popd; popd
mvn compile
popd
```

## Build

Run `mvn clean package` to build a JAR file.

Note: You may need to define the correct Java version for Maven, eg. via `export JAVA_HOME=/usr/lib/jvm/java-17-openjdk`
Note: You may need to define the correct Java version for Maven, eg. via

```bash
export JAVA_HOME="/usr/lib/jvm/java-17-openjdk"
export PATH="/usr/lib/jvm/java-17-openjdk/bin/:$PATH"
```

*Alternatively, the [Graylog documentation](https://go2docs.graylog.org/5-0/what_more_can_graylog_do_for_me/plugins.html?tocpath=What%20More%20Can%20Graylog%20Do%20for%20Me%253F%7CPlugins%7C_____0#WritingPlugins) describes how to create a convenient setup with hot reloading.*

Expand Down Expand Up @@ -56,7 +58,7 @@ echo "Checking out Graylog ${GRAYLOG_VERSION}"
git clone --depth 1 --branch "${GRAYLOG_VERSION}" https://github.com/Graylog2/graylog2-server.git ../graylog2-server
# Build Graylog web interface
pushd ../graylog2-server
mvn generate-resources -pl graylog2-server -B -V
mvn compile
popd
```

Expand All @@ -65,7 +67,7 @@ or update your graylog-project setup:
```bash
# adjust the path below
cd graylog-project
# replace <VERSION> with the Graylog version (e.g. 5.0.1)
# replace <VERSION> with the Graylog version (e.g. 6.0.1)
graylog-project graylog-version --force-https-repos --set <VERSION>
```

Expand Down Expand Up @@ -105,11 +107,11 @@ Ensure that Maven uses the correct Java version by setting the `JAVA_HOME` envir

```bash
pushd ../graylog2-server
mvn generate-resources -pl graylog2-server -B -V
mvn compile
pushd graylog2-web-interface
# Build Vendor Manifest:
yarn install
env disable_plugins=true ./node_modules/.bin/webpack --config webpack.vendor.js
yarn run build
popd; popd
```

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"license": "MIT",
"dependencies": {
"lodash": "^4.17.21",
"react-select": "^4.3.0",
"react-select": "5.8.0",
"styled-components": "^5.2.1"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 212cd72

Please sign in to comment.