Tag: elasticsearch

docker群与弹性群集

我是弹性和docker群的初学者。 我花了两个星期的时间学习,并尝试准备一个有弹性的docker群。 我想准备一个有Docker群的弹性群。 我们可以轻松地使用缩放比例。 我认为我们需要swarm来做到这一点,并且弹性集群保持swarm节点之间的数据同步。 我也想为完整的自动化我想使用容器主机名configuration禅。 由于群体轮Rubin“elasticsearch”主机名应该返回所有的ip。 docker版本是:17.06.2-ce elastic docker image版本是:elasticsearch:latest docker – 撰写版本> = 3 首先,我试图遵循这个指令:sematext.com/blog/2016/12/12/docker-elasticsearch-swarm 这里nginx-proxy不是作为一个服务(docker-compose文件的一部分)工作的,但是它是作为容器工作的。 (docker运行)。 我不知道有什么区别。 但是这个想法本身已经准备好了docker的早期版本,并且不适合我。 这条指令背后的主要思想是,discovery.zen.ping.unicast.hosts具有容器名称。 Docker群体本身负载平衡,然后弹性可以find另一个节点。 因为nginx-proxy不能用作服务,所以我试着按照这个指令去做:derpturkey.com/elasticsearch-cluster-with-docker-engine-swarm-mode/ 我已经定义了nginx服务来连接弹性,我在这里configuration了所有的参数。 version: '3' services: elasticsearch: image: 'elasticsearch:5' command: [ elasticsearch, -E, network.host=0.0.0.0, -E, discovery.zen.ping.unicast.hosts=elasticsearch, -E, discovery.zen.minimum_master_nodes=1 ] nginx: image: 'nginx:1' ports: – '9200:9200' command: | /bin/bash -c "echo ' server { […]

无法在docker中运行metricbeat

我想在Windows机器上使用docker运行metricbeat,并根据我的要求更改了metricbeat.yml。 docker run -v /c/Users/someuser/docker/metricbeat.yml:/usr/share/metricbeat/metricbeat.yml docker.elastic.co/beats/metricbeat:5.6.0 但得到这些错误 metricbeat2017 / 09/17 10:13:19.285547 beat.go:346:CRIT退出:错误加载configuration文件:configuration文件(“metricbeat.yml”)只能由拥有者写入,但权限为“-rwxrwxrwx”修复权限使用:'chmod go -w /usr/share/metricbeat/metricbeat.yml')退出:错误加载configuration文件:configuration文件(“metricbeat.yml”)只能由拥有者写入,但权限是“ -rwxrwxrwx“(修复使用权限:'chmod go-w / usr / share / metricbeat / metricbeat.yml') 为什么我得到这个? 什么是正确的方法来永久性的改变docker容器中的文件内容(因为我不想每次容器启动时都改变configuration文件) 编辑:容器不意味着被编辑/改变。如有必要,docker卷pipe理可用于外部化所有configuration相关的作品。谢谢

如何使用docker-compose.yml为elasticsearch.yaml文件设置network.publish_host

我想在docker-compose.yml文件中为network.publish_host设置环境variables。 在这里,我不能设置docker-compose.yml文件中的network.publish_host在我的例子中,我运行一个elasticsearch集群在不同的docker主机。但是当我试图设置network.publish_host环境iam无法设置。它需要默认值为172.18.0.2,但我的期望是得到像192.168.1.22 这是我的docker-compose.yml文件 version: '2' services: elasticsearch1: image: bitnami/elasticsearch:latest environment: – ELASTICSEARCH_CLUSTER_NAME=docker-cluster – network.publish_host=192.168.1.22 – discovery.zen.ping.multicast.enabled=false – ELASTICSEARCH_CLUSTER_HOSTS=192.168.1.23 – discovery.zen.ping.timeout=3s – ELASTICSEARCH_NODE_NAME=elastic-node1 volumes: – ~/elasticsearch/data:/bitnami ports: – '9200:9200' – '9300:9300' 请帮忙解决这个问题enter code here

当es被安装在不同的端口上时,fluentd无法/显着地连接到elasticsearch

在我的docker环境中,弹性search(ES-1)暴露于端口9200,这是维护数据库数据的主要ES,所以为了logging日志,我们使用在端口9700上运行的新弹性search的fluentd-elasticsearch-kibna堆栈(ES-2)。 我无法连接fluentd到这个新的弹性search(ES-2)端口9700.让我知道如何连接fluentd以外的端口“9200” 下面是用于FEK的dockerconfiguration细节 fluentd.config : <source> @type forward port 24224 bind 0.0.0.0 </source> <match *.**> @type copy <store> @type elasticsearch host elasticsearchkibana port 9200 logstash_format true logstash_prefix fluentd logstash_dateformat %Y%m%d include_tag_key true type_name access_log tag_key @log_name flush_interval 1s </store> <store> @type stdout </store> </match> docker-compose.yml : version: '2' services: web: image: httpd ports: – "80:80" […]

马拉松docker集装箱无法访问外部服务

我从下面的JSON启动马拉松的docker集装箱 { "id": "logupdate", "cpus": 1, "mem": 125.0, "instances": 1, "container": { "type": "DOCKER", "docker": { "image": "logupdate", "network": "BRIDGE", "forcePullImage": true, "portMappings": [ { "containerPort": 9007, "hostPort": 0, "protocol": "tcp", "servicePort": 9007 } ] } } } 它工作正常,我可以访问容器外的服务。 但是服务在调用可通过传输客户端访问的弹性searchURL时内部失败。 客户端URL通过IP_OF_ELASTIC_SEARCH访问:9200。 当我通过普通的docker命令运行它时,我的服务工作正常。 docker run -p 9007:9007 logupdate 只有当我试图通过马拉松运行我面临这个问题。 我是否需要发布端口9200(弹性search端口)?

如何将github上的插件安装到在Container上运行的Kibana

我想安装以下插件到容器上运行的Kibana。 https://github.com/istresearch/kibana-object-format 但是,因为我是Kibana的新手,我不知道如何安装它。 其自述页面说,我应该参考下面的官方指导页面,但它根本没有帮助我。 https://www.elastic.co/guide/en/kibana/current/_installing_plugins.html 。 该插件没有列在已知的插件列表中。 所以我想它应该从github下载并安装它。 但我不知道如何。 我正在testing的图像如下。 docker.elastic.co/kibana/kibana:5.6.2 kibana:5.5.2 任何build议或意见将是帮助。 谢谢,

如何捆绑弹性search模板与docker的形象?

我目前正在build立一个自定义的docker镜像用于集成testing。 我的要求是使用默认的ingesterpipe道和模板映射的自定义configuration来设置它。 Dockerfile: FROM docker.elastic.co/elasticsearch/elasticsearch:5.6.2 ADD config /usr/share/elasticsearch/config/ USER root RUN chown -R elasticsearch:elasticsearch config RUN chmod +x config/setup.sh USER elasticsearch RUN elasticsearch-plugin remove x-pack EXPOSE 9200 EXPOSE 9300 其中config是一个包含以下内容的目录: > elasticsearch.yml for the configuration > templates in the form of json files > setup.sh – script which executes curl to es in order to […]

如何修改弹性search实例的群集名称?

我已经从官方版本移到了现在不推荐的docker hub版本的elasticsearch 版本5.5.2 。 在官方版本中,build议设置集群名称的方式是将其作为环境variables传递- cluster.name=docker-cluster 。 此方法在Docker中心版本中不起作用。 尽pipe环境variables,它使用默认名称“elasticsearch”。 引用前面的问题 ,我command: [ "elasticsearch", "-Des.cluster.name=another-name" ] -compose文件中覆盖命令来command: [ "elasticsearch", "-Des.cluster.name=another-name" ]但是这会导致容器根本无法启动。 有没有办法来覆盖群集名称,而不使用自定义configuration文件?

如何安装在docker上运行的elasticsearch的xpack?

我正在尝试在ELK-Stack上安装xpack。 我会用3个Dockerfiles来做这个。 在这个时候,我的Dockerfile看起来像这样: # Orginal Image von elasticsearch laden FROM docker.marksys.de/elasticsearch:latest USER root ADD ./x-pack-5.5.2.zip /usr/share/elasticsearch/plugins RUN bin/elasticsearch-plugin install file:///usr/share/elasticsearch/plugins/x-pack-5.5.2.zip/ RUN elasticsearch 每一次,当我build立一个图像的Dockerfile,生成过程停在这里: Exception in thread "main" java.lang.IllegalStateException: Could not load plugin descriptor for existing plugin [x-pack-5.5.2.zip]. Was the plugin built before 2.0? at org.elasticsearch.plugins.PluginsService.getPluginBundles(PluginsService.java:334) at org.elasticsearch.plugins.InstallPluginCommand.jarHellCheck(InstallPluginCommand.java:518) at org.elasticsearch.plugins.InstallPluginCommand.verify(InstallPluginCommand.java:500) at org.elasticsearch.plugins.InstallPluginCommand.install(InstallPluginCommand.java:543) at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:217) at org.elasticsearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:201) […]

不能在kibana中获取索引相关数据

我能够使用logstash.conf创build索引。 我的inputtypes是gelf。 我正在发送logstash日志到kibana。 这是我的logstash.conf input { gelf { } } output { stdout { codec => rubydebug } elasticsearch { hosts => ["elk.lera.com:80"] index => "templeton-math-%{+YYYY.MM.dd}" } elasticsearch { hosts => ["elk.lera.com:80"] index => "templeton-science-%{+YYYY.MM.dd}" } elasticsearch { hosts => ["elk.lera.com:80"] index => "templeton-bio-%{+YYYY.MM.dd}" } elasticsearch { hosts => ["elk.lera.com:80"] index => "templeton-lang-%{+YYYY.MM.dd}" } } […]