Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch and HTTP authentication #396

Closed
jagardaniel opened this issue May 7, 2014 · 2 comments
Closed

Elasticsearch and HTTP authentication #396

jagardaniel opened this issue May 7, 2014 · 2 comments

Comments

@jagardaniel
Copy link

Hi!

I'm trying to setup elasticsearch which is behind a nginx proxy with HTTP authentication. It works great if I disable auth on nginx, and removes the auth-part from the link, but as soon as it is active, the elasticsearch request fails. The server responds with 401 Unauthorized and I see the same thing in the nginx error log.

grafana1

As you can see in the image, the request header Authorization: Basic is not being set at all. I guess this is the reason why I receive the 401 response.

I did a console.log(config) in vendor/elasticjs/elastic-angular-client.js, and it seems like the header is there correctly:
grafana2

config.js:
elasticsearch: "https://user:pass@graphite.domain.com/elasticsearch",

Any ideas?

/Daniel

@SkyEyes
Copy link

SkyEyes commented May 12, 2014

I have same problem but elastic works and graphite not.

@jagardaniel
Copy link
Author

Hmm, strange. Our problem actually solved itself yesterday. I moved my grafana-installation over to the same webhost (graphite.domain.com/grafana) and it started to work. The header is now added in every request both towards graphite and elasticsearch.

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

No branches or pull requests

3 participants