kafka-connect-elasticsearch | Kafka connector for copying data | Pub Sub library
kandi X-RAY | kafka-connect-elasticsearch Summary
kandi X-RAY | kafka-connect-elasticsearch Summary
a Kafka connector for copying data between Kafka and Elasticsearch, and create the Elasticsearch index daily
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- main is the main entry point for testing
- Create a new ES index
- Update the last date
- initSignal listens for SIGKILL SIGINT SIGINT SIGINT and SIGINT SIGINT SIGINT SIGINT SIGINT SIGINT SIGINT SIGTER SIGQUIT SIGINT SIGINT SIGTER SIGINT SIGINT SIGINT SIGINT SIGQUIT SIGINT
- createPIDFile creates the PID file
- initKafkaConsumer creates new Kafka consumer
- LoadConfYaml loads a conf yaml file
- getHostInfo gets the process id of the process
- Initialize ES client
- PrintVersion prints version
kafka-connect-elasticsearch Key Features
kafka-connect-elasticsearch Examples and Code Snippets
Community Discussions
Trending Discussions on kafka-connect-elasticsearch
QUESTION
I am trying to use Kafka Connect REST API.
Sometimes, I keep getting timeout issue for POST
/PUT
/DELETE
APIs such deploying new connectors or deleting connectors (no timeout issue for GET
).
The error looks like this:
...ANSWER
Answered 2022-Mar-22 at 00:56Instead of waiting, I found simply restarting the Kafka Connect, the issue will be gone.
QUESTION
I have some CDC data in Kafka. Now I am trying to sink from Kafka to Elasticsearch. Here is what I have done so far:
Step 1 - Deploy Elasticsearch in Kubernetes (succeed)I deployed Elasticsearch in Kubernetes by following this tutorial using Elastic Operator:
- Deploy ECK in your Kubernetes cluster: https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-deploy-eck.html
- Deploy an Elasticsearch cluster: https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-deploy-elasticsearch.html
ANSWER
Answered 2021-Dec-29 at 20:28First add more background. The way I deployed Kafka is using Strimzi:
QUESTION
We have producers that are sending the following to Kafka:
- topic=syslog, ~25,000 events per day
- topic=nginx, ~5,000 events per day
- topic=zeek.xxx.log, ~100,000 events per day (total). In this last case there are 20 distinct zeek topics, such as zeek.conn.log and zeek.http.log
kafka-connect-elasticsearch
instances function as consumers to ship data from Kafka to Elasticsearch. The hello-world Sink configuration for kafka-connect-elasticsearch
might look like this:
ANSWER
Answered 2021-Nov-08 at 20:02In distributed mode, would I still want to submit just a single elasticsearch.properties through a single API call?
It'd be a JSON file, but yes.
what dictates the number of workers?
Up to you. JVM usage is one factor that you can monitor and scale on
Not really any documentation that I am aware of
QUESTION
I have a Kubernetes cluster with Elasticsearch currently deployed.
The Elasticsearch coordinator node is accessible behind a service via a ClusterIP
over HTTPS. It uses a self-signed TLS certificate.
I can retrieve the value of the CA:
...ANSWER
Answered 2021-Oct-22 at 20:57Got this working and learned a few things in the process:
- Secret resources reside in a namespace. Secrets can only be referenced by Pods in that same namespace. (ref). Therefore, I switched to using a shared namespace for elasticsearch + kafka
- The secret can be used in a straightforward way as documented at https://kubernetes.io/docs/concepts/configuration/secret/#using-secrets. This is not a Helm-specific but rather core Kubernetes feature
In my case this looked like:
QUESTION
I have an enrichment pipeline that updates a dynamic number of fields, writes to Kafka, and then sends to Elasticsearch. We are using the Confluent Elasticsearch Connector.
E.g., if first record sent to the ES Connector is like:
...ANSWER
Answered 2021-Oct-07 at 07:34The relevant line of code is here: https://github.com/confluentinc/kafka-connect-elasticsearch/blob/master/src/main/java/io/confluent/connect/elasticsearch/DataConverter.java#L170
This basically means that the source document is sent as is to the index - no modifications.
Your best option is probably to add an SMT that reads the source document and removes any fields with null values.
QUESTION
Here's the docker-compose file I am using for kafka and ksqldb setup,
...ANSWER
Answered 2021-Aug-12 at 15:24Docker volumes are ephemeral, so this is expected behavior.
You need to mount host volumes for at least the Kafka and Zookeeper containers
e.g.
QUESTION
I am trying to do event streaming between mysql and elasticsearch, one of the issue I faced was with the JSON object in mysql when transfered to elasticsearch was in JSON string format not as an object.
I was looking for a solution using SMT, I found this,
I don't know how to install or load in my kafka or connect container
Here's my docker-compose file,
...ANSWER
Answered 2021-Jun-27 at 20:19to install SMT it just the same as installing other connector,
Copy your custom SMT JAR file (and any non-Kafka JAR files required by the transformation) into a directory that is under one of the directories listed in the plugin.path property in the Connect worker configuration –
In your case copy to /usr/share/confluent-hub-components
QUESTION
I am trying to send data from Kafka to Elasticsearch. I checked that my Kafka Broker is working because I can see the messages I produce to a topic is read by a Kafka Consumer. However, when I try to connect Kafka to Elasticsearch I get the following error.
Command:
...ANSWER
Answered 2021-May-29 at 13:09The Connect container starts Connect Distributed Server already. You should use HTTP and JSON properties to configure the Elastic connector rather than exec into the container shell and issue connect-standalone
commands which default to using a broker running in the container itself.
Similarly, the Elastic quickstart file expects Elasticsearch running within the Connect container, by default
QUESTION
I'm trying to install Elasticsearch connector to Confluent Kafka Connect. I'm following below instruction:
https://docs.confluent.io/kafka-connect-elasticsearch/current/index.html#install-the-connector-using-c-hub
after executing:
ANSWER
Answered 2021-Mar-23 at 22:53curl -s localhost:8083/connector-plugins
gives the definitive response from the worker what plugins are installed.
Per the output in your question, the Elasticsearch sink connector is now installed in your connector. I don't know why the Confluent CLI would not show this.
QUESTION
Is is possible to use a single Kafka instance with the Elasticsearch Sink Connector to write to separate Elasticsearch clusters with the same index? Documentation. The source data may be a backend database or an application. An example use-case is that one cluster may be used for real-time search and the other may be used for analytics.
If this is possible, how do I configure the sink connector? If not, I can think of a couple of options:
- Use 2 Kafka instances, each pointing to a different Elasticsearch cluster. Either write to both, or write to one and copy from it to the other.
- Use a single Kafka instance and write a stream processor which will write to both clusters.
Are there any others?
...ANSWER
Answered 2020-Nov-17 at 19:49Yes you can do this. You can use a single Kafka cluster and single Kafka Connect worker. One connector can write to one Elasticsearch instance, and so if you have multiple destination Elasticsearch you need multiple connectors configured.
The usual way to run Kafka Connect is in "distributed" mode (even on a single instance), and then you submit one—or more—connector configurations via the REST API.
You don't need a Java client to use Kafka Connect - it's configuration only. The configuration, per connector, says where to get the data from (which Kafka topic(s)) and where to write it (which Elasticsearch instance).
To learn more about Kafka Connect see this talk, this short video, and this specific tutorial on Kafka Connect and Elasticsearch
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install kafka-connect-elasticsearch
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page