But I've the alert "Error listing apps" and the error is :
"NetworkError: 404 Introuvable - http://localhost:8080/proxy/services/json/v2/services/auth/login?"; login? POST http://localhost:8080/proxy/services/json/v2/services/auth/login? 404 Introuvable
And it's say that it's in jquery.min.js that there is the error and I do'nt know why is localhost:8080 and not 8089?????
Thx by advance if you know where is come from the error.
The problem you're having is due to the browser's Single Origin Policy (http://en.wikipedia.org/wiki/Same_origin_policy). The specific issue is that your page is going to be running of yourawesomedomain.com, but Splunk will be running on some separate domain (e.g. yourawesomedomain.com:8089), and the browser does not allow communication to happen between those two.
The solution is to use a server-side proxy to relay the messages. For example, when you run the examples in the SDK, we start up a small webserver that proxies any request to the the "/proxy" endpoint to Splunk. You can similarly have a small proxy in your webserver that does the same.
If you can say a bit more about your environment (what programming language you're using server side, what webserver, etc), I can give a bit more specific advice and help.
Thx, I did it. I insert my index.html in htdocs of my apache and I add SSLProxyEngine On ProxyPass /proxy/ https://localhost:8089/ in the Apache config file and decommented all modules about proxy. So it works cery well when I doen't use tomcat but when I use tomcat and Apache, there is the error 404 so I don't result the problem with tomcat but I can connect to my spolunk so it's a good thing. Now I want to use this in a dynamic web project where I use tomcat so I search I can I do it? Do you have an idea?
Thx by advance,
You can try adding the following two lines to your Apache config file:
ProxyPass /proxy/ https://localhost:4089/
You will need to change localhost:4089 to wherever your splunkd is (the management host and port). Once you do that, any request that goes to /proxy on your server will be routed to your splunkd installation.
Thanks very much for your answer. So, if I understand, I have to add a proxy in my apache (I work with a tomcat apache) and eclipse. I program in java. So I create a proxy of my choice. Then what have I to change in my dynamic web java project? And next I just to add the proxy in my browser?
Thx by advance,