Skip to content
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.

Elasticsearch sink not working #1211

Closed
commixon opened this issue Jul 6, 2016 · 11 comments · Fixed by #1525
Closed

Elasticsearch sink not working #1211

commixon opened this issue Jul 6, 2016 · 11 comments · Fixed by #1525

Comments

@commixon
Copy link

commixon commented Jul 6, 2016

I have setup an elk stack in its own namespace, aka es. And there is a service called: elasticsearch.es.svc.cluster.local.

For the sink option I simply use: `--sink=elasticsearch:http://elasticsearch.es.svc.cluster.local:9200". This does not work and i suppose it has to do with:

    // Set the URL endpoints of the ES's nodes. Notice that when sniffing is
    // enabled, these URLs are used to initially sniff the cluster on startup.
    if len(opts["nodes"]) < 1 {
        return nil, fmt.Errorf("There is no node assigned for connecting ES cluster")
    }

In case I and the ?nodes... param, then I get:

factory.go:74] Failed to create sink: failed to create ElasticSearch client: no Elasticsearch node available

I have also tried to play with the sniff, timeouts etc options, so I'm stuck for the time being and the elasticsearch sink does not work

(Question: the nodes paramater seems to be mandatory? According to the if len(opts["nodes"]) < 1? Why is that?)

@xyuanlu
Copy link

xyuanlu commented Jul 13, 2016

I think what you should do is --sink=elasticsearch:?nodes=http://elasticsearch.es.svc.cluster.local:9200
You need to specify the "nodes" param.

@lacion
Copy link

lacion commented Jul 26, 2016

i am having the same problem

E0726 18:20:17.526386 1 factory.go:74] Failed to create sink: failed to create ElasticSearch client: no Elasticsearch node available

--sink=elasticsearch:?nodes=http://foo.bar:9200&esUserName=foo&esUserSecret=bar

@rvrignaud
Copy link

I have same problem with or without specifying scheme.

@commixon
Copy link
Author

In my case it worked by specifying the nodes parameter, but also using the latest version.

@rvrignaud
Copy link

I did succeed to send metric to elasticsearch using 1.2.beta0.
But it seems that events are not pushed and specifying index is not working.
Any clue on that ?

@rvrignaud
Copy link

Still same issue with 1.2.beta1.
Did anyone succeed in pushing events to ES and specifying index name ?

@douglasader
Copy link

Agreed with above comments, specifying index does not change it. Also metrics get pushed to index, but no events. Version 1.2.0, any progress on this issue. Also might be nice to be able to specify if you want metrics and events or only one of them.

@huangyuqi
Copy link

From v1.2.0-beta.0, the ES sink has been added to events. Any issues about this event ES sink? @douglasader

@douglasader
Copy link

Well I'm using 1.2.0, which is newer then 1.2.0-beta.0 AFAIK and events are not sent to ES, note however the index is setup on ES for events and metrics though, but only metrics gets populated with actual entries.

@piosz
Copy link
Contributor

piosz commented Oct 26, 2016

cc @AlmogBaku

@AlmogBaku
Copy link
Contributor

  1. @commixon the original issue of requiring using the ?nodes= notation was solved in Improve ES Sink: #1260 which merged
  2. @douglasader you can only run the right app if you want only metrics/events (heapster - the daemon that push metrics; eventer - the daemon that push events)
  3. I tried to debug it and it seems like the index is changed at least with Feature/elasticsearch new mapping #1313 (which refactored big parts of the ES code)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants