File tree Expand file tree Collapse file tree 3 files changed +35
-5
lines changed
src/main/java/eu/openanalytics/containerproxy/stat Expand file tree Collapse file tree 3 files changed +35
-5
lines changed Original file line number Diff line number Diff line change 227
227
<artifactId >monetdb-jdbc</artifactId >
228
228
<version >2.28</version >
229
229
</dependency >
230
+ <dependency >
231
+ <groupId >com.microsoft.sqlserver</groupId >
232
+ <artifactId >mssql-jdbc</artifactId >
233
+ </dependency >
234
+ <dependency >
235
+ <groupId >org.postgresql</groupId >
236
+ <artifactId >postgresql</artifactId >
237
+ </dependency >
238
+ <dependency >
239
+ <groupId >mysql</groupId >
240
+ <artifactId >mysql-connector-java</artifactId >
241
+ </dependency >
242
+
243
+
230
244
231
245
<!-- Kubernetes -->
232
246
<dependency >
Original file line number Diff line number Diff line change 34
34
import eu .openanalytics .containerproxy .service .EventService ;
35
35
import eu .openanalytics .containerproxy .service .EventService .Event ;
36
36
import eu .openanalytics .containerproxy .stat .impl .InfluxDBCollector ;
37
- import eu .openanalytics .containerproxy .stat .impl .MonetDBCollector ;
37
+ import eu .openanalytics .containerproxy .stat .impl .JDBCCollector ;
38
38
39
39
@ Service
40
40
public class StatCollectorRegistry implements Consumer <Event > {
@@ -76,8 +76,8 @@ private IStatCollector findCollector(String baseURL) {
76
76
if (baseURL == null || baseURL .isEmpty ()) return null ;
77
77
if (baseURL .toLowerCase ().contains ("/write?db=" )) {
78
78
return new InfluxDBCollector ();
79
- } else if (baseURL .toLowerCase ().startsWith ("jdbc:monetdb " )) {
80
- return new MonetDBCollector ();
79
+ } else if (baseURL .toLowerCase ().startsWith ("jdbc" )) {
80
+ return new JDBCCollector ();
81
81
}
82
82
return null ;
83
83
}
Original file line number Diff line number Diff line change 33
33
import eu .openanalytics .containerproxy .stat .IStatCollector ;
34
34
35
35
/**
36
- * E.g.:
36
+ *
37
+ * # MonetDB, Postgresql, MySQL/MariaDB
37
38
* usage-stats-url: jdbc:monetdb://localhost:50000/usage_stats
39
+ * usage-stats-url: jdbc:postgresql://localhost/postgres
40
+ * usage-stats-url: jdbc:mysql://localhost/shinyproxy
38
41
*
39
42
* Assumed table layout:
40
43
*
43
46
* username varchar(128),
44
47
* type varchar(128),
45
48
* data text
49
+ * );
50
+ *
51
+ *
52
+ * # MS SQL Server
53
+ * usage-stats-url: jdbc:sqlserver://localhost;databaseName=shinyproxy
54
+ *
55
+ * Assumed table layout:
56
+ *
57
+ * create table event(
58
+ * event_time datetime,
59
+ * username varchar(128),
60
+ * type varchar(128),
61
+ * data text
46
62
* );
47
63
*
48
64
*/
49
- public class MonetDBCollector implements IStatCollector {
65
+ public class JDBCCollector implements IStatCollector {
50
66
51
67
@ Override
52
68
public void accept (Event event , Environment env ) throws IOException {
You can’t perform that action at this time.
0 commit comments