-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the need for SQL-type backend connector in query/ingest proces…
…sors and pipelines (#861) Previously, the user always had to provide two backend connectors to the query/ingest processor: Elastic connector and SQL-type connector (aka ClickHouse/Hydrolix). Remove that requirement - now only the Elastic connector is mandatory (for Kibana internal queries) and the user doesn't need to have SQL-type backend connector in the pipeline (in such case they won't be able to use it in `indexes` configuration, thus only targeting queries/ingest to Elastic). However, this doesn't yet solve the more tricky scenario of completely removing SQL-type backend connector from the entire configuration (it's possible in transparent proxy mode, but not yet in dual pipeline mode). Put another way: ClickHouse/Hydrolix is still required in the `backendConnectors` section (except in no-op transparent proxy), but you can now omit it from `pipelines`/`processors` sections. The more tricky scenario is tested by (currently skipped) `TestQuesmaTransparentProxyWithoutNoopConfiguration`.
- Loading branch information
1 parent
e3ca75a
commit 792408f
Showing
4 changed files
with
187 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
quesma/quesma/config/test_configs/ingest_with_single_connector.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Similar to quesma_adding_two_hydrolix_tables.yaml, | ||
# but the ingest processor has only a single backend connector. | ||
|
||
logging: | ||
level: info | ||
frontendConnectors: | ||
- name: elastic-ingest | ||
type: elasticsearch-fe-ingest | ||
config: | ||
listenPort: 8080 | ||
- name: elastic-query | ||
type: elasticsearch-fe-query | ||
config: | ||
listenPort: 8080 | ||
backendConnectors: | ||
- name: my-minimal-elasticsearch | ||
type: elasticsearch | ||
config: | ||
url: "http://elasticsearch:9200" | ||
user: elastic | ||
password: quesmaquesma | ||
- name: my-hydrolix-instance | ||
type: hydrolix | ||
config: | ||
url: "clickhouse://localhost:9000" | ||
user: "u" | ||
password: "p" | ||
database: "d" | ||
ingestStatistics: true | ||
processors: | ||
- name: my-query-processor | ||
type: quesma-v1-processor-query | ||
config: | ||
indexes: | ||
siem: | ||
target: [my-hydrolix-instance] | ||
logs: | ||
target: [my-hydrolix-instance] | ||
"*": | ||
target: [ my-minimal-elasticsearch ] | ||
- name: my-ingest-processor | ||
type: quesma-v1-processor-ingest | ||
config: | ||
indexes: | ||
siem: | ||
target: [ my-minimal-elasticsearch ] | ||
logs: | ||
target: [ my-minimal-elasticsearch ] | ||
"*": | ||
target: [ my-minimal-elasticsearch ] | ||
pipelines: | ||
- name: my-elasticsearch-proxy-read | ||
frontendConnectors: [ elastic-query ] | ||
processors: [ my-query-processor ] | ||
backendConnectors: [ my-minimal-elasticsearch, my-hydrolix-instance ] | ||
- name: my-elasticsearch-proxy-write | ||
frontendConnectors: [ elastic-ingest ] | ||
processors: [ my-ingest-processor ] | ||
backendConnectors: [ my-minimal-elasticsearch ] # my-hydrolix-instance is not needed here, as we don't ingest to it |
56 changes: 56 additions & 0 deletions
56
quesma/quesma/config/test_configs/quesma_as_transparent_proxy_without_noop.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# The recommended way to start Quesma in transparent proxy | ||
# is to use the noop processor. However, the user can achieve | ||
# the same thing by specifying query/ingest processors without | ||
# routing anything to ClickHouse/Hydrolix - that should be supported, | ||
# even if not recommended. | ||
|
||
logging: | ||
level: info | ||
frontendConnectors: | ||
- name: elastic-ingest | ||
type: elasticsearch-fe-ingest | ||
config: | ||
listenPort: 8080 | ||
- name: elastic-query | ||
type: elasticsearch-fe-query | ||
config: | ||
listenPort: 8080 | ||
backendConnectors: | ||
- name: my-minimal-elasticsearch | ||
type: elasticsearch | ||
config: | ||
url: "http://elasticsearch:9200" | ||
user: elastic | ||
password: quesmaquesma | ||
# No ClickHouse, Hydrolix connector needed! | ||
ingestStatistics: true | ||
processors: | ||
- name: my-query-processor | ||
type: quesma-v1-processor-query | ||
config: | ||
indexes: | ||
siem: | ||
target: [ my-minimal-elasticsearch ] | ||
logs: | ||
target: [ my-minimal-elasticsearch ] | ||
"*": | ||
target: [ my-minimal-elasticsearch ] | ||
- name: my-ingest-processor | ||
type: quesma-v1-processor-ingest | ||
config: | ||
indexes: | ||
siem: | ||
target: [ my-minimal-elasticsearch ] | ||
logs: | ||
target: [ my-minimal-elasticsearch ] | ||
"*": | ||
target: [ my-minimal-elasticsearch ] | ||
pipelines: | ||
- name: my-elasticsearch-transparent-proxy-read | ||
frontendConnectors: [ elastic-query ] | ||
processors: [ my-query-processor ] | ||
backendConnectors: [ my-minimal-elasticsearch ] | ||
- name: my-elasticsearch-transparent-proxy-write | ||
frontendConnectors: [ elastic-ingest ] | ||
processors: [ my-ingest-processor ] | ||
backendConnectors: [ my-minimal-elasticsearch ] |