Dashboards & Visualizations

Why does my Simple XML dashboard display HTML content from another app?

splunk_svc
Path Finder

Hi Splunkers.
If an application running on a SH is set to not share it's objects with other apps, is there any reason an app can reference a .html file with the same name from another application?

For example.

Application "A" has a view that references a .html file called App_html_file.html.
This is located in $SPLUNK_HOME/etc/apps/App_A/appserver/static/ and is displayed with the following view:

<dashboard>
  <label>Welcome to Application A</label>
  <row>
    <panel>
      <html src="App_html_file.html"/>
    </panel>
  </row>
</dashboard>

Application "B" has a view that references the same .html filename but in it's own directory.
i.e. in $SPLUNK_HOME/etc/apps/App_B/appserver/static/ (with a file called App_html_file.html).
It is displayed with the following view:

<dashboard>
  <label>Welcome to Application B</label>
  <row>
    <panel>
      <html src="App_html_file.html"/>
    </panel>
  </row>
</dashboard>

Note that although both .html filenames are the same they have different content and are each in the appserver/static directory of their respective app.
I would expect these to operate independently of each other.
( I have permissions set on each app to not share objects with other apps)

What I am seeing however, is when the content of App B's html file is changed, the content displayed in Application A changes.
If I move App B's .html file out of the way, App A complains that it can no longer find it's .html file.

Why is App A displaying .html files from App B and not looking within its own appserver/static directory?
I need App A and App B to have .html files that can be displayed (and edited) independently or each other.

I have used the Freshmaker app to refresh the views and have also restarted Splunk on the SH these apps are running on but still have the same symptoms.

Thanks.

0 Karma
1 Solution

splunk_svc
Path Finder

Found the issue.
There were two different apps running, one with the directory in upper case, the other with it in lower case.

Application 1 : $SPLUNK_HOME$/etc/apps/appdir
Application 2 : $SPLUNK_HOME$/etc/apps/APPDIR

Despite the SearchHead running on Linux (i.e. a case-sensitive filesystem), App 1 seemed to only be looking in the Upper-case directory for the one .html file (every other file for Application 1 was read from the correct directory).

Moving Application 1 into a directory with a completely different name fixed it.
i.e. one that was not identical to Application 2's directory if ignoring case-sensitivity.

Not sure if it is a bug in Splunk but certainly a subtle problem to isolate given it only seemed to happen for the one file.
Did a quick search and didn't see anything about Splunk being case-insensitive when looking for files.

View solution in original post

0 Karma

splunk_svc
Path Finder

Found the issue.
There were two different apps running, one with the directory in upper case, the other with it in lower case.

Application 1 : $SPLUNK_HOME$/etc/apps/appdir
Application 2 : $SPLUNK_HOME$/etc/apps/APPDIR

Despite the SearchHead running on Linux (i.e. a case-sensitive filesystem), App 1 seemed to only be looking in the Upper-case directory for the one .html file (every other file for Application 1 was read from the correct directory).

Moving Application 1 into a directory with a completely different name fixed it.
i.e. one that was not identical to Application 2's directory if ignoring case-sensitivity.

Not sure if it is a bug in Splunk but certainly a subtle problem to isolate given it only seemed to happen for the one file.
Did a quick search and didn't see anything about Splunk being case-insensitive when looking for files.

0 Karma

bshuler_splunk
Splunk Employee
Splunk Employee

Have you tried http://localhost:8000/debug/refresh

or

./splunk restart

0 Karma

splunk_svc
Path Finder

Hi bshuler.
I've used the Sideview/Freshmaker apps to refresh the views and navs etc.
This should be the equivalent of your first command above.
I've also already tried restarting Splunk on the SH on which the apps are running.
None of these seemed to resolve the problem.

If I move the App A's .html file back into the {App A}/appserver/static from the equivalent location for App B, the dashboard complains that it can't find the .html file.
If I move it back into App B's appserver/static directory the dashboard from App A then displays correctly.

This would confirm that App A is definitely looking for the .html file in App B's /appserver/static directory.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...