use_https = false,
use_gzip = true,
allow_local = false,
+ user = nil,
+ password = nil,
+ no_ssl_verify = false,
}
local clickhouse_schema = {
gzip = settings.use_gzip,
mime_type = 'text/plain',
timeout = settings['timeout'],
+ no_ssl_verify = settings.no_ssl_verify,
+ user = settings.user,
+ password = settings.password,
}) then
rspamd_logger.errx(task, "cannot send data to clickhouse server %s: cannot make request",
settings['server'])
callback = gen_http_cb('attachments data', #attachment_rows),
mime_type = 'text/plain',
timeout = settings['timeout'],
+ no_ssl_verify = settings.no_ssl_verify,
+ user = settings.user,
+ password = settings.password,
}) then
rspamd_logger.errx(task, "cannot send attachments to clickhouse server %s: cannot make request",
settings['server'])
callback = gen_http_cb('urls data', #urls_rows),
mime_type = 'text/plain',
timeout = settings['timeout'],
+ no_ssl_verify = settings.no_ssl_verify,
+ user = settings.user,
+ password = settings.password,
}) then
rspamd_logger.errx(task, "cannot send urls to clickhouse server %s: cannot make request",
settings['server'])
callback = gen_http_cb('emails data', #emails_rows),
mime_type = 'text/plain',
timeout = settings['timeout'],
+ no_ssl_verify = settings.no_ssl_verify,
+ user = settings.user,
+ password = settings.password,
}) then
rspamd_logger.errx(task, "cannot send emails to clickhouse server %s: cannot make request",
settings['server'])
callback = gen_http_cb('asn data', #asn_rows),
mime_type = 'text/plain',
timeout = settings['timeout'],
+ no_ssl_verify = settings.no_ssl_verify,
+ user = settings.user,
+ password = settings.password,
}) then
rspamd_logger.errx(task, "cannot send asn info to clickhouse server %s: cannot make request",
settings['server'])
callback = gen_http_cb('symbols data', #symbols_rows),
mime_type = 'text/plain',
timeout = settings['timeout'],
+ no_ssl_verify = settings.no_ssl_verify,
+ user = settings.user,
+ password = settings.password,
}) then
rspamd_logger.errx(task, "cannot send symbols info to clickhouse server %s: cannot make request",
settings['server'])
callback = gen_http_cb('domain specific data ('..k..')', #specific),
mime_type = 'text/plain',
timeout = settings['timeout'],
+ no_ssl_verify = settings.no_ssl_verify,
+ user = settings.user,
+ password = settings.password,
}) then
rspamd_logger.errx(task, "cannot send data for domain %s to clickhouse server %s: cannot make request",
k, settings['server'])
callback = http_cb,
mime_type = 'text/plain',
timeout = settings['timeout'],
+ no_ssl_verify = settings.no_ssl_verify,
+ user = settings.user,
+ password = settings.password,
}) then
rspamd_logger.errx(rspamd_config, "cannot create table %s in clickhouse server %s: cannot make request",
elt, ip_addr)
kibana_file = rspamd_paths['PLUGINSDIR'] ..'/elastic/kibana.json',
key_prefix = 'elastic-',
expire = 3600,
+ timeout = 5.0,
failover = false,
import_kibana = false,
use_https = false,
use_gzip = true,
allow_local = false,
+ user = nil,
+ password = nil,
+ no_ssl_verify = false,
}
local function read_file(path)
task = task,
method = 'post',
gzip = settings.use_gzip,
- callback = http_index_data_callback
+ no_ssl_verify = settings.no_ssl_verify,
+ user = settings.user,
+ password = settings.password,
+ callback = http_index_data_callback,
+ timeout = settings.timeout,
})
end
ev_base = ev_base,
config = cfg,
method = 'get',
- callback = http_callback
+ callback = http_callback,
+ no_ssl_verify = settings.no_ssl_verify,
+ user = settings.user,
+ password = settings.password,
+ timeout = settings.timeout,
})
end
body = table.concat(tbl, "\n"),
method = 'post',
gzip = settings.use_gzip,
- callback = kibana_template_callback
+ callback = kibana_template_callback,
+ no_ssl_verify = settings.no_ssl_verify,
+ user = settings.user,
+ password = settings.password,
+ timeout = settings.timeout,
})
else
rspamd_logger.infox(rspamd_config, 'kibana template file %s not found', settings['kibana_file'])
gzip = settings.use_gzip,
body = ucl.to_format(template, 'json-compact'),
method = 'put',
+ no_ssl_verify = settings.no_ssl_verify,
+ user = settings.user,
+ password = settings.password,
+ timeout = settings.timeout,
})
-- create template mappings if not exist
local template_url = connect_prefix .. ip_addr ..'/_template/rspamd'
},
gzip = settings.use_gzip,
callback = http_template_put_callback,
+ no_ssl_verify = settings.no_ssl_verify,
+ user = settings.user,
+ password = settings.password,
+ timeout = settings.timeout,
})
else
push_kibana_template()
ev_base = ev_base,
config = cfg,
method = 'head',
- callback = http_template_exist_callback
+ callback = http_template_exist_callback,
+ no_ssl_verify = settings.no_ssl_verify,
+ user = settings.user,
+ password = settings.password,
+ timeout = settings.timeout,
})
end