[Rspamd-Users] Need some help with click house
lists at mlserv.org
lists at mlserv.org
Wed Feb 17 19:11:19 UTC 2021
Hi,
I am fallen in love with the clickhouse module (and redash) :) I want to extend the fields and tried something like this:
```
extra_columns = {
QueueID = {
selector = "queueid";
type = "String";
default_value = "none";
comment = "Postfix queue ID";
}
Received.ByHostname = {
selector = "received('by_hostname')";
type = "Array(String)";
comment = "Received header by hostname";
}
Received.FromHostname = {
selector = "received('from_hostname')";
type = "Array(String)";
comment = "Received header from hostname";
}
Received.RealHostname = {
selector = "received('real_hostname')";
type = "Array(String)";
comment = "Received header real hostname";
}
Received.RealIP = {
selector = "received('real_ip')";
type = "Array(String)";
comment = "Received header real IP address";
}
Received.For = {
selector = "received('for')";
type = "Array(String)";
comment = "Received header for e-mail address";
}
}
```
That does not work for the Received fields. I get this error:
2021-02-17 16:46:17.01180 #1906076(rspamd_proxy) <c7ac92>; lua; clickhouse.lua:401: cannot send 1 rows of generic data data to clickhouse server 127.0.0.1:8123: Code: 190, e.displayText() = DB::Exception: Elements 'Received.ByHostname' and 'Received.
For' of Nested data structure 'Received' (Array columns) have different array sizes. (version 21.2.3.15 (official build))\0a;
started as final collection
To be honest, I even do not understand the error message ;-)
I already use other fields like Symbols.Names and Symbols.Scores that come directly from Rspamd. Then I use arrayZip in redash to combine array information. I wanted to achieve the same for received headers.
Thanks in advance
Christian Rößner
--
Rößner-Network-Solutions
Zertifizierter ITSiBe / CISO
Karl-Bröger-Str. 10, 36304 Alsfeld
Fax: +49 6631 78823409, Mobil: +49 171 9905345
USt-IdNr.: DE225643613, https://roessner.website
PGP fingerprint: 658D 1342 B762 F484 2DDF 1E88 38A5 4346 D727 94E5
More information about the Users
mailing list