1{ pkgs, stdenv, fetchurl, fetchFromGitHub, unzip, graylog }:
2
3with pkgs.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 unpackPhase = "true";
18 buildInputs = [ unzip ];
19 meta = a.meta // {
20 platforms = graylog.meta.platforms;
21 maintainers = (a.meta.maintainers or []) ++ [ maintainers.fadenb ];
22 };
23 });
24in {
25 aggregates = glPlugin rec {
26 name = "graylog-aggregates-${version}";
27 pluginName = "graylog-plugin-aggregates";
28 version = "2.0.0";
29 src = fetchurl {
30 url = "https://github.com/cvtienhoven/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
31 sha256 = "0crgb49msjkvfpksbfhq2hlkc904j184wm1wp6q0x6lzhn07hm8y";
32 };
33 meta = {
34 homepage = https://github.com/cvtienhoven/graylog-plugin-aggregates;
35 description = "SSO support for Graylog through trusted HTTP headers set by load balancers or authentication proxies";
36 };
37 };
38 auth_sso = glPlugin rec {
39 name = "graylog-auth-sso-${version}";
40 pluginName = "graylog-plugin-auth-sso";
41 version = "2.3.0";
42 src = fetchurl {
43 url = "https://github.com/Graylog2/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
44 sha256 = "110ag10y0xyf3za6663vf68r5rwdi92315a37vysqvj00y7yak0l";
45 };
46 meta = {
47 homepage = https://github.com/Graylog2/graylog-plugin-auth-sso;
48 description = "SSO support for Graylog through trusted HTTP headers set by load balancers or authentication proxies";
49 };
50 };
51 dnsresolver = glPlugin rec {
52 name = "graylog-dnsresolver-${version}";
53 pluginName = "graylog-plugin-dnsresolver";
54 version = "1.1.2";
55 src = fetchurl {
56 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
57 sha256 = "01s7wm6bwcpmdrl35gjp6rrqxixs2s9km2bdgzhv8pn25j5qnw28";
58 };
59 meta = {
60 homepage = https://github.com/graylog-labs/graylog-plugin-dnsresolver;
61 description = "Message filter plugin can be used to do DNS lookups for the source field in Graylog messages";
62 };
63 };
64 filter-messagesize = glPlugin rec {
65 name = "graylog-filter-messagesize-${version}";
66 pluginName = "graylog-plugin-filter-messagesize";
67 version = "0.0.2";
68 src = fetchurl {
69 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
70 sha256 = "1vx62yikd6d3lbwsfiyf9j6kx8drvn4xhffwv27fw5jzhfqr61ji";
71 };
72 meta = {
73 homepage = https://github.com/graylog-labs/graylog-plugin-filter-messagesize;
74 description = "Prints out all messages that have an estimated size crossing a configured threshold during processing";
75 };
76 };
77 internal-logs = glPlugin rec {
78 name = "graylog-internal-logs-${version}";
79 pluginName = "graylog-plugin-internal-logs";
80 version = "2.3.0";
81 src = fetchurl {
82 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
83 sha256 = "05r4m2gf1hj1b889rmpb6b5a6q2xd0qkl1rpj107yd219j2grzf4";
84 };
85 meta = {
86 homepage = https://github.com/graylog-labs/graylog-plugin-internal-logs;
87 description = "Graylog plugin to record internal logs of Graylog efficiently instead of sending them over the network";
88 };
89 };
90 ipanonymizer = glPlugin rec {
91 name = "graylog-ipanonymizer-${version}";
92 pluginName = "graylog-plugin-ipanonymizer";
93 version = "1.1.2";
94 src = fetchurl {
95 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
96 sha256 = "0hd66751hp97ddkn29s1cmjmc2h1nrp431bq7d2wq16iyxxlygri";
97 };
98 meta = {
99 homepage = https://github.com/graylog-labs/graylog-plugin-ipanonymizer;
100 description = "A graylog-server plugin that replaces the last octet of IP addresses in messages with xxx";
101 };
102 };
103 jabber = glPlugin rec {
104 name = "graylog-jabber-${version}";
105 pluginName = "graylog-plugin-jabber";
106 version = "2.0.0";
107 src = fetchurl {
108 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
109 sha256 = "1bqj5g9zjnw08bva7379c2ar3nhmyiilj7kjxd16qvfdn2674r5h";
110 };
111 meta = {
112 homepage = https://github.com/graylog-labs/graylog-plugin-jabber;
113 description = "Jabber Alarmcallback Plugin for Graylog";
114 };
115 };
116 metrics = glPlugin rec {
117 name = "graylog-metrics-${version}";
118 pluginName = "graylog-plugin-metrics";
119 version = "1.3.0";
120 src = fetchurl {
121 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
122 sha256 = "1v1yzmqp43kxigh3fymdwki7pn21sk2ym3kk4nn4qv4zzkhz59vp";
123 };
124 meta = {
125 homepage = https://github.com/graylog-labs/graylog-plugin-metrics;
126 description = "An output plugin for integrating Graphite, Ganglia and StatsD with Graylog";
127 };
128 };
129 mongodb-profiler = glPlugin rec {
130 name = "graylog-mongodb-profiler-${version}";
131 pluginName = "graylog-plugin-mongodb-profiler";
132 version = "2.0.1";
133 src = fetchurl {
134 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
135 sha256 = "1hadxyawdz234lal3dq5cy3zppl7ixxviw96iallyav83xyi23i8";
136 };
137 meta = {
138 homepage = https://github.com/graylog-labs/graylog-plugin-mongodb-profiler;
139 description = "Graylog input plugin that reads MongoDB profiler data";
140 };
141 };
142 pagerduty = glPlugin rec {
143 name = "graylog-pagerduty-${version}";
144 pluginName = "graylog-plugin-pagerduty";
145 version = "1.3.0";
146 src = fetchurl {
147 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
148 sha256 = "1g63c6rm5pkz7f0d73wb2lmk4zm430jqnhihbyq112cm4i7ymglh";
149 };
150 meta = {
151 homepage = https://github.com/graylog-labs/graylog-plugin-pagerduty;
152 description = "An alarm callback plugin for integrating PagerDuty into Graylog";
153 };
154 };
155 redis = glPlugin rec {
156 name = "graylog-redis-${version}";
157 pluginName = "graylog-plugin-redis";
158 version = "0.1.1";
159 src = fetchurl {
160 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
161 sha256 = "0dfgh6w293ssagas5y0ixwn0vf54i5iv61r5p2q0rbv2da6xvhbw";
162 };
163 meta = {
164 homepage = https://github.com/graylog-labs/graylog-plugin-redis;
165 description = "Redis plugin for Graylog";
166 };
167 };
168 slack = glPlugin rec {
169 name = "graylog-slack-${version}";
170 pluginName = "graylog-plugin-slack";
171 version = "2.4.0";
172 src = fetchurl {
173 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
174 sha256 = "0v8ilfhs8bnx87pjxg1i3p2vxw61rwpg4k3zhga7slavx70y986p";
175 };
176 meta = {
177 homepage = https://github.com/graylog-labs/graylog-plugin-slack;
178 description = "Can notify Slack or Mattermost channels about triggered alerts in Graylog (Alarm Callback)";
179 };
180 };
181 spaceweather = glPlugin rec {
182 name = "graylog-spaceweather-${version}";
183 pluginName = "graylog-plugin-spaceweather";
184 version = "1.0";
185 src = fetchurl {
186 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/spaceweather-input.jar";
187 sha256 = "1mwqy3fhyy4zdwyrzvbr565xwf96xs9d3l70l0khmrm848xf8wz4";
188 };
189 meta = {
190 homepage = https://github.com/graylog-labs/graylog-plugin-spaceweather;
191 description = "Correlate proton density to the response time of your app and the ion temperature to your exception rate.";
192 };
193 };
194 twiliosms = glPlugin rec {
195 name = "graylog-twiliosms-${version}";
196 pluginName = "graylog-plugin-twiliosms";
197 version = "1.0.0";
198 src = fetchurl {
199 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
200 sha256 = "0kwfv1zfj0fmxh9i6413bcsaxrn1vdwrzb6dphvg3dx27wxn1j1a";
201 };
202 meta = {
203 homepage = https://github.com/graylog-labs/graylog-plugin-twiliosms;
204 description = "An alarm callback plugin for integrating the Twilio SMS API into Graylog";
205 };
206 };
207 twitter = glPlugin rec {
208 name = "graylog-twitter-${version}";
209 pluginName = "graylog-plugin-twitter";
210 version = "2.0.0";
211 src = fetchurl {
212 url = "https://github.com/graylog-labs/${pluginName}/releases/download/${version}/${pluginName}-${version}.jar";
213 sha256 = "1pi34swy9nzq35a823zzvqrjhb6wsg302z31vk2y656sw6ljjxyh";
214 };
215 meta = {
216 homepage = https://github.com/graylog-labs/graylog-plugin-twitter;
217 description = "Graylog input plugin that reads Twitter messages based on keywords in realtime";
218 };
219 };
220}