Coder Social home page Coder Social logo

Comments (17)

Nalum avatar Nalum commented on July 29, 2024 1

Thanks for the help I've sorted out this issue 👍

from elasticsearch_exporter.

dominikschulz avatar dominikschulz commented on July 29, 2024

Is the exporter running in the same pod as ElasticSearch? Otherwise the URI would be wrong.

from elasticsearch_exporter.

Nalum avatar Nalum commented on July 29, 2024

It is yes 👍

from elasticsearch_exporter.

Nalum avatar Nalum commented on July 29, 2024

Just checked the logs and I see a lot of the following:

level=warn ts=2017-09-12T19:18:45.114866651Z caller=cluster_health.go:261 msg="failed to fetch and decode cluster health" err="failed to get cluster health from http://localhost:9200//_cluster/health: Get http://localhost:9200/_cluster/health: dial tcp [::1]:9200: getsockopt: connection refused"

from elasticsearch_exporter.

zwopir avatar zwopir commented on July 29, 2024

this doesn't seem to be a elasticsearch_exporter issue. The exporter simply can't reach the ES on localhost:9200. Can you post your pod yaml or json?!

from elasticsearch_exporter.

Nalum avatar Nalum commented on July 29, 2024

Here is the yaml for the deployments https://hastebin.com/lifiraduxo.hs

from elasticsearch_exporter.

metalmatze avatar metalmatze commented on July 29, 2024

Are you able to kubectl exec -it -c elasticsearch-exporter {pod_name} sh into the pod and then run something like wget http://localhost:9200/_cluster/health? to double check if that url is reachable.

from elasticsearch_exporter.

Nalum avatar Nalum commented on July 29, 2024

Okay, that's the issue, localhost didn't work but the pod ip did. I'll update the elasticsearch config to allow localhost connections, I thought setting _eth0_ allowed that.

What is the best setup for this exporter, one running along side each elasticsearch node or one for the elasticsearch cluster?

from elasticsearch_exporter.

zwopir avatar zwopir commented on July 29, 2024

regarding your question for the best setup: it depends. If you just have a few nodes, running just one exporter with --es.all=true is fine and recommended. If the cluster gets larger, you would have to transfer and parse a larger json from the stats endpoint and it then makes sense to use _nodes/_local/_stats on each cluster node instead of _nodes/_stats, which is what the --es.all=true switch is about (see https://github.com/justwatchcom/elasticsearch_exporter/blob/master/collector/nodes.go#L1081).

from elasticsearch_exporter.

Nalum avatar Nalum commented on July 29, 2024

@zwopir so I should not have es.all=true if I have an instance of the exporter running against each elasticsearch node?

from elasticsearch_exporter.

zwopir avatar zwopir commented on July 29, 2024

exactly. You get lots of almost duplicate node stats metrics doing so (almost = all but the instance label)

from elasticsearch_exporter.

Nalum avatar Nalum commented on July 29, 2024

Cool thanks very much for the help 👍

from elasticsearch_exporter.

ckt114 avatar ckt114 commented on July 29, 2024

I have similar problem but error 401 instead. Full error below. My cluster requires username/password as well as CA and I provided all that like below but I still get 401 error. What could be wrong? The user I'm using is admin and have full privileges. What else could be wrong? Thanks.

./elasticsearch_exporter -es.uri "https://admin:PASSWORD@localhost:9200" -es.ca /path/to/ca.crt -es.all
level=info ts=2019-01-08T15:44:41.629723503Z caller=main.go:77 msg="starting elasticsearch_exporter" addr=:9500
level=warn ts=2019-01-08T15:44:46.192663006Z caller=cluster_health.go:258 msg="failed to fetch and decode cluster health" err="HTTP Request failed with code 401"
level=warn ts=2019-01-08T15:44:46.192844448Z caller=nodes.go:1359 msg="failed to fetch and decode node stats" err="HTTP Request failed with code 401"

from elasticsearch_exporter.

islamhamdi avatar islamhamdi commented on July 29, 2024

@trankchung did you find a way to resolve it?

from elasticsearch_exporter.

ckt114 avatar ckt114 commented on July 29, 2024

@islamhamdi
Yes I did. My problem was because of my password. It had special characters and passing it through command lines without quoting was the problem. I double quoted it and it works.

from elasticsearch_exporter.

Norbinliu avatar Norbinliu commented on July 29, 2024

@trankchung 我的密码中也有特殊字符‘@’,您能告诉你是怎么引用的吗

from elasticsearch_exporter.

Edmodo-Luo avatar Edmodo-Luo commented on July 29, 2024

@trankchung 我的密码中也有特殊字符‘@’,您能告诉你是怎么引用的吗

用个单引号包裹密码就行了

from elasticsearch_exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.