要先安装 python3.10 ,因为是用python写的,用到python3.10去创建虚拟环境
cd到你自己管理的地方
cd xxx
克隆 connectors
git clone https://github.com/elastic/connectors
修改config.yml
connectors:
-
connector_id: "7V37Do8Bjfz0jsfahzL3"
service_type: "mongodb"
elasticsearch:
host: "https://192.168.0.3:9200"
api_key: "N2asdassssssssssssssssssssssssssssssssssssssssssssssssshPUQ=="
ssl: true
username: "elastic"
password: "VDMlz5QnM_0g-349fFq7"
ca_certs: "/usr/share/certs/http_ca.crt"
api_key 是从Kibana生成的apikey
地址:
http://localhost:5601/app/enterprise_search/content/connectors/sssssssssssssss/configuration
sssssssssssssss是生成的id,表示你的连接器id
connector_id、host、username、password、ca_certs相应修改
拷贝elasticsearch的证书
elasticsearch-8.13.2/config/certs/http_ca.crt
一定要跟上版本
https://github.com/elastic/connectors
这个是地址,可以看到有很多版本,如果要切换8.14的话就checkout
git checkout -b origin/8.14
安装命令
来源:https://www.elastic.co/guide/en/enterprise-search/8.13/connectors-run-from-source.html
make install
make run
控制台输出运行状态
保持不掉
nohup /home/xxx/connectors/bin/elastic-ingest > /home/xxx/connectors/elastic-ingest-runoob.log 2>&1 &
ps -ef | grep elastic-ingest