Hi Guys,
I was building a dashboard for my company and needed to get Splunk information. Right now, I use the JavaScript SDK like this:
$(document).ready(function() {
$('#searchButton').on('click', displayApps);
});
function displayApps(event) {
var http = new splunkjs.ProxyHttp("/proxy");
// Create a Service instance and log in
var service = new splunkjs.Service(http, {
username:"username",
password:"password",
scheme:"https",
host:"hostname.com",
port:"correctport#",
version:"5.0"
});
// Verify we logged in
// Print installed apps to the console to verify login
service.apps().fetch(function(err, apps) {
if (err) {
console.log(err);
return;
}
var myapps = "";
var appsList = apps.list();
for(var i = 0; i < appsList.length; i++) {
}
});
}
The thing is, I am getting a 404 error.
POST http://localhost:3000/proxy/services/auth/login?output_mode=json 404 (Not Found) jquery.min.js:4
Object {response: Object, status: 404, data: "<!DOCTYPE html><html><head><title></title><link re…ss\lib\router\index.js:46:12)</pre></body></html>", error: "Not Found"} splunkSession.js:23
I apologize as I am new to web dev, so I am trying to hack this together as best as I can.
Thanks again
... View more