Skip to content

Commit f03cdb7

Browse files
author
Zekihan AZMAN
authored
Merge pull request #7 from atlassian/add-graylog
Add graylog plugin
2 parents 3becc01 + 1c7f891 commit f03cdb7

File tree

12 files changed

+847
-0
lines changed

12 files changed

+847
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Release Graylog Plugin
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
release-version:
6+
description: 'Version of Release'
7+
required: true
8+
jobs:
9+
maven:
10+
name: Graylog Plugin Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout project sources
14+
uses: actions/checkout@v2
15+
- name: Set up JDK 8
16+
uses: actions/setup-java@v2
17+
with:
18+
java-version: 8
19+
distribution: 'temurin'
20+
- name: Create Build Output Directory
21+
run: mkdir -p ./mvn-build/graylog-plugin
22+
- name: Copy Integration Files
23+
run: cp -R graylog-plugin/. ./mvn-build/graylog-plugin
24+
- name: Build project with Maven
25+
run: |
26+
cd ./mvn-build/graylog-plugin && \
27+
mvn -B package -Dversion=${{ github.event.inputs.release-version }} --file pom.xml
28+
- name: Compressing mvn Package
29+
run: |
30+
cd ./mvn-build/graylog-plugin/target
31+
zip -r jsm-graylog-plugin-${{ github.event.inputs.release-version }}.zip ./jsm-graylog-plugin-${{ github.event.inputs.release-version }}.jar
32+
- name: release
33+
uses: actions/create-release@v1
34+
id: create_release
35+
with:
36+
draft: false
37+
prerelease: false
38+
tag_name: jsm-graylog-plugin-${{ github.event.inputs.release-version }}
39+
release_name: jsm-graylog-plugin-${{ github.event.inputs.release-version }}
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
- name: Upload release artifacts
43+
uses: actions/upload-release-asset@v1
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
with:
47+
upload_url: ${{ steps.create_release.outputs.upload_url }}
48+
asset_path: ./mvn-build/graylog-plugin/target/jsm-graylog-plugin-${{ github.event.inputs.release-version }}.zip
49+
asset_name: jsm-graylog-plugin-${{ github.event.inputs.release-version }}.zip
50+
asset_content_type: application/zip

graylog-plugin/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Graylog integration plugin for Jira Service Management
2+
3+
Jira Service Management offers an integration plugin for Graylog. Graylog can use this plugin to send stream alerts to Jira Service Management with detailed information. Jira Service Management acts as a dispatcher for Graylog alerts, determining the right people to notify based on their on-call schedules via email, text messages (SMS), phone calls, and push notifications (both iPhone & Android), and by escalating alerts until they're acknowledged or closed.
4+
5+
:warning: _If the feature isn't available on your site, keep checking Jira Service Management for updates._
6+
7+
**Requirements**
8+
9+
This project uses Maven 3 and requires Java 7 or higher. The plugin requires Graylog 1.0.0 or higher.
10+
11+
**Steps to build the plugin**
12+
13+
1. Clone this repository.
14+
2. Run mvn package to build a JAR file.
15+
3. Optional: Run mvn jdeb:jdeb and mvn rpm:rpm to create a DEB and RPM package respectively.
16+
4. Copy the generated JAR file into a target directory within the Graylog plugin directory.
17+
5. Restart Graylog.

graylog-plugin/pom.xml

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>com.atlassian.plugin.graylog</groupId>
8+
<artifactId>jsm-graylog-plugin</artifactId>
9+
<version>${version}</version>
10+
<packaging>jar</packaging>
11+
12+
<name>${project.artifactId}</name>
13+
<description>Graylog ${project.artifactId} plugin.</description>
14+
<url>https://www.atlassian.com</url>
15+
16+
<properties>
17+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
18+
<maven.compiler.source>1.8</maven.compiler.source>
19+
<maven.compiler.target>1.8</maven.compiler.target>
20+
<maven.install.skip>true</maven.install.skip>
21+
<maven.deploy.skip>true</maven.deploy.skip>
22+
<maven.site.skip>true</maven.site.skip>
23+
<graylog.version>3.3.7</graylog.version>
24+
<graylog.plugin-dir>/usr/share/graylog-server/plugin</graylog.plugin-dir>
25+
</properties>
26+
27+
<licenses>
28+
<license>
29+
<name>GNU General Public License (GPL)</name>
30+
<url>https://www.gnu.org/licenses/gpl-2.0</url>
31+
</license>
32+
</licenses>
33+
34+
<dependencies>
35+
<dependency>
36+
<groupId>com.fasterxml.jackson.core</groupId>
37+
<artifactId>jackson-databind</artifactId>
38+
<version>2.10.5.1</version>
39+
</dependency>
40+
41+
<dependency>
42+
<groupId>com.fasterxml.jackson.dataformat</groupId>
43+
<artifactId>jackson-dataformat-cbor</artifactId>
44+
<version>2.11.4</version>
45+
</dependency>
46+
47+
<dependency>
48+
<groupId>org.graylog2</groupId>
49+
<artifactId>graylog2-server</artifactId>
50+
<version>${graylog.version}</version>
51+
<scope>provided</scope>
52+
<exclusions>
53+
<exclusion>
54+
<artifactId>lucene-queryparser</artifactId>
55+
<groupId>org.apache.lucene</groupId>
56+
</exclusion>
57+
<exclusion>
58+
<artifactId>xstream</artifactId>
59+
<groupId>com.thoughtworks.xstream</groupId>
60+
</exclusion>
61+
<exclusion>
62+
<artifactId>zookeeper</artifactId>
63+
<groupId>org.apache.zookeeper</groupId>
64+
</exclusion>
65+
<exclusion>
66+
<artifactId>commons-beanutils</artifactId>
67+
<groupId>commons-beanutils</groupId>
68+
</exclusion>
69+
<exclusion>
70+
<artifactId>*</artifactId>
71+
<groupId>io.netty</groupId>
72+
</exclusion>
73+
<exclusion>
74+
<artifactId>snakeyaml</artifactId>
75+
<groupId>org.yaml</groupId>
76+
</exclusion>
77+
<exclusion>
78+
<artifactId>*</artifactId>
79+
<groupId>org.bouncycastle</groupId>
80+
</exclusion>
81+
<exclusion>
82+
<artifactId>mongodb-driver-sync</artifactId>
83+
<groupId>org.mongodb</groupId>
84+
</exclusion>
85+
<exclusion>
86+
<artifactId>shiro-core</artifactId>
87+
<groupId>org.apache.shiro</groupId>
88+
</exclusion>
89+
<exclusion>
90+
<groupId>org.freemarker</groupId>
91+
<artifactId>freemarker</artifactId>
92+
</exclusion>
93+
<exclusion>
94+
<groupId>net.minidev</groupId>
95+
<artifactId>json-smart</artifactId>
96+
</exclusion>
97+
</exclusions>
98+
</dependency>
99+
</dependencies>
100+
101+
<build>
102+
<plugins>
103+
<plugin>
104+
<groupId>org.apache.maven.plugins</groupId>
105+
<artifactId>maven-shade-plugin</artifactId>
106+
<version>2.4.3</version>
107+
<configuration>
108+
<minimizeJar>false</minimizeJar>
109+
</configuration>
110+
<executions>
111+
<execution>
112+
<phase>package</phase>
113+
<goals>
114+
<goal>shade</goal>
115+
</goals>
116+
<configuration>
117+
<transformers>
118+
<transformer
119+
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
120+
</transformers>
121+
</configuration>
122+
</execution>
123+
</executions>
124+
</plugin>
125+
126+
<plugin>
127+
<groupId>org.apache.maven.plugins</groupId>
128+
<artifactId>maven-release-plugin</artifactId>
129+
<version>2.5.3</version>
130+
<configuration>
131+
<autoVersionSubmodules>true</autoVersionSubmodules>
132+
<mavenExecutorId>forked-path</mavenExecutorId>
133+
<tagNameFormat>@{project.version}</tagNameFormat>
134+
<preparationGoals>clean test</preparationGoals>
135+
<goals>package</goals>
136+
</configuration>
137+
</plugin>
138+
139+
<plugin>
140+
<groupId>org.vafer</groupId>
141+
<artifactId>jdeb</artifactId>
142+
<version>1.5</version>
143+
<configuration>
144+
<deb>${project.build.directory}/${project.artifactId}-${project.version}.deb</deb>
145+
<dataSet>
146+
<data>
147+
<src>${project.build.directory}/</src>
148+
<includes>${project.build.finalName}.jar</includes>
149+
<type>directory</type>
150+
<mapper>
151+
<type>perm</type>
152+
<prefix>${graylog.plugin-dir}</prefix>
153+
<filemode>644</filemode>
154+
<user>root</user>
155+
<group>root</group>
156+
</mapper>
157+
</data>
158+
</dataSet>
159+
</configuration>
160+
</plugin>
161+
162+
<plugin>
163+
<groupId>org.codehaus.mojo</groupId>
164+
<artifactId>rpm-maven-plugin</artifactId>
165+
<version>2.1.5</version>
166+
<configuration>
167+
<group>Application/Internet</group>
168+
<prefixes>
169+
<prefix>/usr</prefix>
170+
</prefixes>
171+
<defineStatements>
172+
<defineStatement>_unpackaged_files_terminate_build 0</defineStatement>
173+
<defineStatement>_binaries_in_noarch_packages_terminate_build 0</defineStatement>
174+
</defineStatements>
175+
<defaultFilemode>644</defaultFilemode>
176+
<defaultDirmode>755</defaultDirmode>
177+
<defaultUsername>root</defaultUsername>
178+
<defaultGroupname>root</defaultGroupname>
179+
<mappings>
180+
<mapping>
181+
<directory>${graylog.plugin-dir}</directory>
182+
<sources>
183+
<source>
184+
<location>${project.build.directory}/</location>
185+
<includes>
186+
<include>${project.build.finalName}.jar</include>
187+
</includes>
188+
</source>
189+
</sources>
190+
</mapping>
191+
</mappings>
192+
</configuration>
193+
</plugin>
194+
</plugins>
195+
</build>
196+
</project>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Package: [[name]]
2+
Version: [[version]]
3+
Architecture: all
4+
Maintainer: Atlassian
5+
Section: web
6+
Priority: optional
7+
Depends: graylog-server | graylog-radio
8+
Description: [[description]]

0 commit comments

Comments
 (0)