Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am using hostextinfo statements in order to display icons in my map. For example:

define hostextinfo {
    hostgroup_name  apple-devices
    icon_image      base/apple.png
    icon_image_alt  Apple
    vrml_image      apple.png
    statusmap_image base/apple.gd2
}

This is working nicely.

However, when I am using the following statement in order to use images that are stored in htdocs/images/logos/symbols rather than htdocs/images/logos/base, it is not working and an interrogation point is displayed in place of the expected logo.

define hostextinfo{
    hostgroup_name  network-devices
    icon_image      symbols/switch.png
    icon_image_alt  Switch
    vrml_image      switch.png
    statusmap_image symbols/switch.gd2
}

So far, here is what I have tried:

  • I have made sure to verify that the files exists and that they have the proper permissions.
  • I also tried to display the images directly by using the addresses in the browser. I have noticed that http://obfuscated.net/nagios3/images/logos/base/ is returning 403 Forbidden but http://obfuscated.net/nagios3/images/logos/symbols/ is returning 404 Not Found.
  • I have looked into the apache2.conf and cgi.cfg files to figure out the images permissions without success.

EDIT Here are some listings to show the file permissions. I am unable to see what is different between base and symbols

/usr/share/nagios/htdocs/images/logos# ls -l .
total 64
drwxr-xr-x 2 root root 12288 Nov 25 08:38 andrade
drwxr-xr-x 2 root root  4096 Nov 25 08:38 base
drwxr-xr-x 2 root root  4096 Nov 25 08:38 bernhard
drwxr-xr-x 2 root root 12288 Nov 25 08:38 cook
drwxr-xr-x 2 root root  4096 Nov 25 08:38 didier
drwxr-xr-x 2 root root 12288 Nov 25 08:38 logos
drwxr-xr-x 2 root root  4096 Nov 25 08:38 remus
drwxr-xr-x 2 root root  4096 Nov 25 08:38 satrapa
drwxr-xr-x 2 root root  4096 Nov 25 08:38 symbols
drwxr-xr-x 2 root root  4096 Nov 25 08:38 werschler

/usr/share/nagios/htdocs/images/logos# ls -l base/switch40.png
-rw-r--r-- 1 root root 869 Dec  6  2009 base/switch40.png

/usr/share/nagios/htdocs/images/logos# ls -l symbols/router.png 
-rw-r--r-- 1 root root 169 Dec  6  2009 symbols/router.png

Do you know where the permissions for apache2 to access those images are stored?

share|improve this question
    
However, when I am using the following statement in order to use images that are stored in htdocs/images/logos/base rather than htdocs/images/logos/base --> Do you mean htdocs/images/logos/symbols? If so, please show us the permission of this folder and the image files inside? –  quanta Dec 1 '12 at 13:15
    
But wait, I'm confusing about your title: Unable to use images outside of logos/images. –  quanta Dec 1 '12 at 13:23
    
@quanta Thank you for paying attention to my question. I fixed a bunch of typos and added the information you requested. –  David Dec 3 '12 at 7:45
    
Do you use selinux? Then also post ls -Z –  Grumpy Dec 3 '12 at 7:51
    
@Peter No. I am not using selinux. –  David Dec 3 '12 at 7:58

1 Answer 1

up vote 2 down vote accepted

On ubuntu, the nagios3 package installs all the files that are served by the web interface into /usr/share/nagios3/htdocs/.

Additional images to be used for the maps can be installed via the nagios-images package and the files are installed in /usr/share/nagios/htdocs/.

You can note that one path is referring to nagios3 while the other is referring to nagios.

In addition, /usr/share/nagios3/htdocs/images/logos contains a list of symbolic links that points to sub-directories in /usr/share/nagios3/htdocs/images/logos. However, the symbols symbolic link is actually missing and this is why the maps cannot use files from that directory.

Creating the symbolic link such as below solves the problem:

/usr/share/nagios3/htdocs/images/logos# ls -l symbols
lrwxrwxrwx 1 root root 47 Dec  3 04:31 symbols -> 
  ../../../../nagios/htdocs/images/logos/symbols/
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.