Dashboards & Visualizations
Highlighted

Link to file:// in dashboard not working

New Member

links to url "www.google.com" works fine, but links like "file://server/folder/file.xlm" don't work in my dashboard.

Dashboard looks like:
form, row, panel, html, div
link (url and file)
for example: < a href="file://server/folder/file.xlm" target="_blank"> Name < /a>
/div, /html, /panel ,/row
.. more row's including content (tables). ..
/form

Please help
Thank you

0 Karma
Highlighted

Re: Link to file:// in dashboard not working

SplunkTrust
SplunkTrust

Hi ,

Chrome throws me this error:

Not allowed to load local resource: file://server/folder/file.xlm

This is because JavaScript does not have access to local files.

Can you please try this?

< a href="http://file://server/folder/file.xlm" target="_blank"> Name < /a>

Happy Splunking

0 Karma
Highlighted

Re: Link to file:// in dashboard not working

SplunkTrust
SplunkTrust

HI @SimonWa ,

Due to security reasons, these file links cannot be opened directly from web page (But yes we can access from It splunk server. check below suggestion).

Can you please let me know the reason or requirement of opening local files?

If you want to access files from shared location then I suggest:

1) Mount shared location at Splunk instance (because mount shared location at user machine is not preferable).

2) Create a web endpoint which read file open at client web browser. Splunk provides custom endpoints.
Please check below URL for custom endpoint example.

https://www.hurricanelabs.com/splunk-tutorials/splunk-custom-endpoints-part-1-the-basics

3) Create a javascript function which executes custom endpoint and open shared file.

I hope it will help you.

Let me know if any help required for Javascript OR custom endpoint development.

Happy Splunking

0 Karma
Highlighted

Re: Link to file:// in dashboard not working

New Member

Hi,

i tried http://file:// ...
The new chrome page have this url: file///server/folder/file.xlm
and the site shows:
alt text

Other ideas?

0 Karma