If you just want to show the contents of the file on a dashboard, you could use jQuery ajax. Here is an example:
Simple XML dashboard:
<dashboard script="external_display.js">
<label>Test External Content</label>
<row>
<panel>
<html>
<div id="my_content"></div>
</html>
</panel>
</row>
</dashboard>
external_display.js:
require(["jquery", "splunkjs/mvc/simplexml/ready!"], function($) {
$.ajax({
url: 'http://localhost:8000/en-US/static/app/search/my_file.txt',
success: function(data) {
$('#my_content').html(data)
}
});
});
Note: external_display.js and my_file.txt reside in $SPLUNK_HOME/etc/apps/search/appserver/static. You could use any URL that is accessible by the Splunk web server (even file system paths).
... View more