1{ lib, stdenv, fetchurl, unzip, graylog-5_1 }:
2
3with lib;
4
5let
6 glPlugin = a@{
7 pluginName,
8 version,
9 installPhase ? ''
10 mkdir -p $out/bin
11 cp $src $out/bin/${pluginName}-${version}.jar
12 '',
13 ...
14 }:
15 stdenv.mkDerivation (a // {
16 inherit installPhase;
17 dontUnpack = true;
18 nativeBuildInputs = [ unzip ];
19 meta = a.meta // {
20 platforms = graylog-5_1.meta.platforms;
21 maintainers = (a.meta.maintainers or []) ++ [ maintainers.fadenb ];
22 sourceProvenance = with sourceTypes; [ binaryBytecode ];
23 };
24 });
25in {
26 aggregates = glPlugin rec {
27 name = "graylog-aggregates-${version}";
28 pluginName = "graylog-plugin-aggregates";
29 version = "2.4.0";
30 src = fetchurl {
31 url = "https://github.com/cvtienhoven/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
32 sha256 = "1c48almnjr0b6nvzagnb9yddqbcjs7yhrd5yc5fx9q7w3vxi50zp";
33 };
34 meta = {
35 homepage = "https://github.com/cvtienhoven/graylog-plugin-aggregates";
36 description = "A plugin that enables users to execute term searches and get notified when the given criteria are met";
37 };
38 };
39 auth_sso = glPlugin rec {
40 name = "graylog-auth-sso-${version}";
41 pluginName = "graylog-plugin-auth-sso";
42 version = "3.3.0";
43 src = fetchurl {
44 url = "https://github.com/Graylog2/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
45 sha256 = "1g47hlld8vzicd47b5i9n2816rbrhv18vjq8gp765c7mdg4a2jn8";
46 };
47 meta = {
48 homepage = "https://github.com/Graylog2/graylog-plugin-auth-sso";
49 description = "SSO support for Graylog through trusted HTTP headers set by load balancers or authentication proxies";
50 };
51 };
52 dnsresolver = glPlugin rec {
53 name = "graylog-dnsresolver-${version}";
54 pluginName = "graylog-plugin-dnsresolver";
55 version = "1.2.0";
56 src = fetchurl {
57 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
58 sha256 = "0djlyd4w4mrrqfbrs20j1xw0fygqsb81snz437v9bf80avmcyzg1";
59 };
60 meta = {
61 homepage = "https://github.com/graylog-labs/graylog-plugin-dnsresolver";
62 description = "Message filter plugin can be used to do DNS lookups for the source field in Graylog messages";
63 };
64 };
65 enterprise-integrations = glPlugin rec {
66 name = "graylog-enterprise-integrations-${version}";
67 pluginName = "graylog-plugin-enterprise-integrations";
68 version = "3.3.9";
69 src = fetchurl {
70 url = "https://downloads.graylog.org/releases/graylog-enterprise-integrations/graylog-enterprise-integrations-plugins-${version}.tgz";
71 sha256 = "0yr2lmf50w8qw5amimmym6y4jxga4d7s7cbiqs5sqzvipgsknbwj";
72 };
73 installPhase = ''
74 mkdir -p $out/bin
75 tar --strip-components=2 -xf $src
76 cp ${pluginName}-${version}.jar $out/bin/${pluginName}-${version}.jar
77 '';
78 meta = {
79 homepage = "https://docs.graylog.org/en/3.3/pages/integrations.html#enterprise";
80 description = "Integrations are tools that help Graylog work with external systems (unfree enterprise integrations)";
81 license = lib.licenses.unfree;
82 };
83 };
84 filter-messagesize = glPlugin rec {
85 name = "graylog-filter-messagesize-${version}";
86 pluginName = "graylog-plugin-filter-messagesize";
87 version = "0.0.2";
88 src = fetchurl {
89 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
90 sha256 = "1vx62yikd6d3lbwsfiyf9j6kx8drvn4xhffwv27fw5jzhfqr61ji";
91 };
92 meta = {
93 homepage = "https://github.com/graylog-labs/graylog-plugin-filter-messagesize";
94 description = "Prints out all messages that have an estimated size crossing a configured threshold during processing";
95 };
96 };
97 integrations = glPlugin rec {
98 name = "graylog-integrations-${version}";
99 pluginName = "graylog-plugin-integrations";
100 version = "3.3.9";
101 src = fetchurl {
102 url = "https://downloads.graylog.org/releases/graylog-integrations/graylog-integrations-plugins-${version}.tgz";
103 sha256 = "0q858ffmkinngyqqsaszcrx93zc4fg43ny0xb7vm0p4wd48hjyqc";
104 };
105 installPhase = ''
106 mkdir -p $out/bin
107 tar --strip-components=2 -xf $src
108 cp ${pluginName}-${version}.jar $out/bin/${pluginName}-${version}.jar
109 '';
110 meta = {
111 homepage = "https://github.com/Graylog2/graylog-plugin-integrations";
112 description = "A collection of open source Graylog integrations that will be released together";
113 };
114 };
115 internal-logs = glPlugin rec {
116 name = "graylog-internal-logs-${version}";
117 pluginName = "graylog-plugin-internal-logs";
118 version = "2.4.0";
119 src = fetchurl {
120 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
121 sha256 = "1jyy0wkjapv3xv5q957xxv2pcnd4n1yivkvkvg6cx7kv1ip75xwc";
122 };
123 meta = {
124 homepage = "https://github.com/graylog-labs/graylog-plugin-internal-logs";
125 description = "Graylog plugin to record internal logs of Graylog efficiently instead of sending them over the network";
126 };
127 };
128 ipanonymizer = glPlugin rec {
129 name = "graylog-ipanonymizer-${version}";
130 pluginName = "graylog-plugin-ipanonymizer";
131 version = "1.1.2";
132 src = fetchurl {
133 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
134 sha256 = "0hd66751hp97ddkn29s1cmjmc2h1nrp431bq7d2wq16iyxxlygri";
135 };
136 meta = {
137 homepage = "https://github.com/graylog-labs/graylog-plugin-ipanonymizer";
138 description = "A graylog-server plugin that replaces the last octet of IP addresses in messages with xxx";
139 };
140 };
141 jabber = glPlugin rec {
142 name = "graylog-jabber-${version}";
143 pluginName = "graylog-plugin-jabber";
144 version = "2.4.0";
145 src = fetchurl {
146 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
147 sha256 = "0zy27q8y0bv7i5nypsfxad4yiw121sbwzd194jsz2w08jhk3skl5";
148 };
149 meta = {
150 homepage = "https://github.com/graylog-labs/graylog-plugin-jabber";
151 description = "Jabber Alarmcallback Plugin for Graylog";
152 };
153 };
154 metrics = glPlugin rec {
155 name = "graylog-metrics-${version}";
156 pluginName = "graylog-plugin-metrics";
157 version = "1.3.0";
158 src = fetchurl {
159 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
160 sha256 = "1v1yzmqp43kxigh3fymdwki7pn21sk2ym3kk4nn4qv4zzkhz59vp";
161 };
162 meta = {
163 homepage = "https://github.com/graylog-labs/graylog-plugin-metrics";
164 description = "An output plugin for integrating Graphite, Ganglia and StatsD with Graylog";
165 };
166 };
167 mongodb-profiler = glPlugin rec {
168 name = "graylog-mongodb-profiler-${version}";
169 pluginName = "graylog-plugin-mongodb-profiler";
170 version = "2.0.1";
171 src = fetchurl {
172 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
173 sha256 = "1hadxyawdz234lal3dq5cy3zppl7ixxviw96iallyav83xyi23i8";
174 };
175 meta = {
176 homepage = "https://github.com/graylog-labs/graylog-plugin-mongodb-profiler";
177 description = "Graylog input plugin that reads MongoDB profiler data";
178 };
179 };
180 pagerduty = glPlugin rec {
181 name = "graylog-pagerduty-${version}";
182 pluginName = "graylog-plugin-pagerduty";
183 version = "2.0.0";
184 src = fetchurl {
185 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
186 sha256 = "0xhcwfwn7c77giwjilv7k7aijnj9azrjbjgd0r3p6wdrw970f27r";
187 };
188 meta = {
189 homepage = "https://github.com/graylog-labs/graylog-plugin-pagerduty";
190 description = "An alarm callback plugin for integrating PagerDuty into Graylog";
191 };
192 };
193 redis = glPlugin rec {
194 name = "graylog-redis-${version}";
195 pluginName = "graylog-plugin-redis";
196 version = "0.1.1";
197 src = fetchurl {
198 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
199 sha256 = "0dfgh6w293ssagas5y0ixwn0vf54i5iv61r5p2q0rbv2da6xvhbw";
200 };
201 meta = {
202 homepage = "https://github.com/graylog-labs/graylog-plugin-redis";
203 description = "Redis plugin for Graylog";
204 };
205 };
206 slack = glPlugin rec {
207 name = "graylog-slack-${version}";
208 pluginName = "graylog-plugin-slack";
209 version = "3.1.0";
210 src = fetchurl {
211 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
212 sha256 = "067p8g94b007gypwyyi8vb6qhwdanpk8ah57abik54vv14jxg94k";
213 };
214 meta = {
215 homepage = "https://github.com/graylog-labs/graylog-plugin-slack";
216 description = "Can notify Slack or Mattermost channels about triggered alerts in Graylog (Alarm Callback)";
217 };
218 };
219 smseagle = glPlugin rec {
220 name = "graylog-smseagle-${version}";
221 pluginName = "graylog-plugin-smseagle";
222 version = "1.0.1";
223 src = fetchurl {
224 url = "https://bitbucket.org/proximus/smseagle-graylog/raw/b99cfc349aafc7c94d4c2503f7c3c0bde67684d1/jar/graylog-plugin-smseagle-1.0.1.jar";
225 sha256 = "sha256-rvvftzPskXRGs1Z9dvd/wFbQoIoNtEQIFxMIpSuuvf0=";
226 };
227 meta = {
228 homepage = "https://bitbucket.org/proximus/smseagle-graylog/";
229 description = "Alert/notification callback plugin for integrating the SMSEagle into Graylog.";
230 license = lib.licenses.gpl3Only;
231 };
232 };
233 snmp = glPlugin rec {
234 name = "graylog-snmp-${version}";
235 pluginName = "graylog-plugin-snmp";
236 version = "0.3.0";
237 src = fetchurl {
238 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
239 sha256 = "1hkaklwzcsvqq45b98chwqxqdgnnbj4dg68agsll13yq4zx37qpp";
240 };
241 meta = {
242 homepage = "https://github.com/graylog-labs/graylog-plugin-snmp";
243 description = "Graylog plugin to receive SNMP traps";
244 };
245 };
246 spaceweather = glPlugin rec {
247 name = "graylog-spaceweather-${version}";
248 pluginName = "graylog-plugin-spaceweather";
249 version = "1.0";
250 src = fetchurl {
251 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/spaceweather-input.jar";
252 sha256 = "1mwqy3fhyy4zdwyrzvbr565xwf96xs9d3l70l0khmrm848xf8wz4";
253 };
254 meta = {
255 homepage = "https://github.com/graylog-labs/graylog-plugin-spaceweather";
256 description = "Correlate proton density to the response time of your app and the ion temperature to your exception rate.";
257 };
258 };
259 splunk = glPlugin rec {
260 name = "graylog-splunk-${version}";
261 pluginName = "graylog-plugin-splunk";
262 version = "0.5.0-rc.1";
263 src = fetchurl {
264 url = "https://github.com/graylog-labs/graylog-plugin-splunk/releases/download/0.5.0-rc.1/graylog-plugin-splunk-0.5.0-rc.1.jar";
265 sha256 = "sha256-EwF/Dc8GmMJBTxH9xGZizUIMTGSPedT4bprorN6X9Os=";
266 };
267 meta = {
268 homepage = "https://github.com/graylog-labs/graylog-plugin-splunk";
269 description = "Graylog output plugin that forwards one or more streams of data to Splunk via TCP.";
270 license = lib.licenses.gpl3Only;
271 };
272 };
273 twiliosms = glPlugin rec {
274 name = "graylog-twiliosms-${version}";
275 pluginName = "graylog-plugin-twiliosms";
276 version = "1.0.0";
277 src = fetchurl {
278 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
279 sha256 = "0kwfv1zfj0fmxh9i6413bcsaxrn1vdwrzb6dphvg3dx27wxn1j1a";
280 };
281 meta = {
282 homepage = "https://github.com/graylog-labs/graylog-plugin-twiliosms";
283 description = "An alarm callback plugin for integrating the Twilio SMS API into Graylog";
284 };
285 };
286 twitter = glPlugin rec {
287 name = "graylog-twitter-${version}";
288 pluginName = "graylog-plugin-twitter";
289 version = "2.0.0";
290 src = fetchurl {
291 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
292 sha256 = "1pi34swy9nzq35a823zzvqrjhb6wsg302z31vk2y656sw6ljjxyh";
293 };
294 meta = {
295 homepage = "https://github.com/graylog-labs/graylog-plugin-twitter";
296 description = "Graylog input plugin that reads Twitter messages based on keywords in realtime";
297 };
298 };
299}