Splunk Search

Application Icon did not appear

nlfatin
New Member

Hi everyone.

I am in the midst of creating an app and I have been wanting to upload an App Icon (logo) so that it could appear in my Home page. However, it does not work. The method I used is as such:

Manager > Apps > myApp > Edit Properties > Upload Asset

I have placed my icon in this directory:
C:\Program Files\Splunk\etc\apps\myApp\appserver\static

I have tried to reformat my icon to .png and also .jpeg file but to no avail. I have tried restarting splunk numerous times.

Anyone know what went wrong?

Thanks in advance!
Nurul.

0 Karma

Raghav2384
Motivator

Not sure if you got the answer.
With v6.2,
png should be inside
Splunkhome/etc/apps/appname/static/
Name: appIcon_2x.png
Refresh or Restart.
Hope this helps

0 Karma

TimMc
Explorer

Regarding Splunk 6.1....

The browser may not know that it received an image if Splunk doesn't set a HTTP header:

Content-Type: image/png

If there's no Content-Type header and someone is trying to prevent MIME sniffing with the following HTTP header then the image won't load in browsers like IE8:

X-Content-Type-Options: nosniff

You can test this with something like Fidder4.

CTRL+R to edit CustomRules.js, and then add some code in OnBeforeResponse:

static function OnBeforeResponse(oSession: Session) {
    if (m_Hide304s && oSession.responseCode == 304) {
        oSession["ui-hide"] = "true";
    }
// Tim added the following two lines
oSession.oResponse.headers.Remove("X-Content-Type-Options");
oSession.oResponse.headers.Add("Content-Type", "image/png");

Inspect a response. Inspectors > Raw. See what was sent back from Splunk. Also check the browser to confirm whether the image is now loading correctly.

Tim.

0 Karma

Damien_Dallimor
Ultra Champion

Are you using Splunk 6 ? There are changes to the location you have to place your app icons and logos.

http://docs.splunk.com/Documentation/Splunk/6.0/Installation/ChangesforSplunkappdevelopers#We_have_c...

fabiocaldas
Contributor

Thanks Damien !!

0 Karma

proletariat99
Communicator

That worked... we had upgraded, but I had created the app in a previous version. I created the the static folder myself ($SPLUNK_HOME$/etc/apps/<app name>/static) and then moved the appIcon.png (32x32) in there and it worked just fine.

Thanks!

0 Karma

jkat54
SplunkTrust
SplunkTrust

@proletarait99 - can you mark this as the answer please?

0 Karma

ShaneNewman
Motivator

I had the same issue, go to the main URL and type/info after 8000. At the bottom there is a cache control to force your browser to update. Doing this should make the changes appear.

fabiocaldas
Contributor

Hi ShaneNewman, the changes regarding Splunk6 folders were the problem, I just moved the icon to the correct new folder and it worked. Thanks for you help and time !!

0 Karma

ShaneNewman
Motivator

Did you make sure to reference the file name in the application.css in the appserver\static directory?

.appLogo {
height: 42px;
width: 104px;
background: url(yourlogo.png) no-repeat 0 0;
}

0 Karma

fabiocaldas
Contributor

I copied the same appIcon used by SOS (splunk on splunk), restarted server and cleared the cache, but the icon is still not appearing. Any other ideia?

0 Karma

fabiocaldas
Contributor

I'm also having the same problem. Did you solved it? My file is 36x36 png file.

0 Karma

linu1988
Champion

GIF file in Internet explorer/ PNG file in Chrome what i had tested

0 Karma

dglinder
Path Finder

Can you upload your PNG icon somewhere? It's possible the PNG file is corrupt or not quite what Splunk expects. My icons all seem to be 36x36 pixels - is it possible yours is slightly larger/smaller?

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 ...