Dashboards & Visualizations

Unable to make javascript examples work on remote computer

ugavnholt
Engager

Hi,

I've downloaded the javascript api, and want to test the client code, to connect to a remote splunk server.

If I run the splunk-sdk-javascript/tests/tests.browser.html to verify the connection, specify the server name, and port, nothing happends, with a sniffer attached I can see that nothing is send to the server. Same pattern with the other examples.

Port 8089 is open and accessible, I can connect to it with https in a browser.

I'm fairly new to splunk, is there something I have missed?

thank you!

Tags (1)
0 Karma

ugavnholt
Engager

Ineeman was spot-on with his answer above, thanks!

0 Karma

ugavnholt
Engager

Thanks for your help all, I'm sorry to report back on this issue so late, but I found out that I indeed missed xml2json app on the remote server.

Still though, from the page I'm building, maintaining some sort of connection state is hard, since there is no timeouts, or errors when the server for some reason dies.

Anybody have some input for this?

0 Karma

kallu
Communicator

Are you sure you have loaded test.browser.html from web server, not using your local file:// -URL? Using local files can not work because single origin policy, ie. javascript can only talk to host where it was loaded from.

See "Dependencies and cross domain communication" at

http://dev.splunk.com/view/splunk-javascript-sdk-getting-started/SP-CAAAEFM

0 Karma

terryloar
Path Finder

I'm having the same problem. I noticed that the "Run" button has no href.

Run

Have you solved this yet?

0 Karma

ineeman
Splunk Employee
Splunk Employee

Did you install the xml2json app on the remote server?

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...