Statusmap.cgi & trends.cgi files missing

Hi All,

I’ve installed Nagios core 3.2 & Plugin 1.4.14 on RHEL5.4. Installation went smoothly & i managed to get the web interface up.
However, i have problems accessing to the MAPS & TRENDS tab on the web interface.

Errors shown are:

MAPS

The requested URL /nagios/cgi-bin/statusmap.cgi file was not found on this server.

Apache server 2.2.3 ( Red Hat ) at local host port 80

TRENDS

The requested URL /nagios/cgi-bin/trends.cgi file was not found on this server.

Apache server 2.2.3 ( Red Hat ) at local host port 80

Question:

  1. Why were these files missing in the first place? Or should they be in by default? All other files like status.cgi, config.cgi, cmd.cgi etc are all in.

  2. Where can i download them if i need to manually put it in there?

  3. What other configurations do i need to implement besides editing the httpd.conf file ( /etc/httpd/conf )?

My httpd.conf file contents for ScriptAlias & Aliases configurations were as follows:

ScriptAlias /nagios/cgi-bin/ /usr/local/nagios/sbin/
<Directory “/usr/local/nagios/sbin/”>
AllowOverride AuthConfig
Options ExecCGI
Order allow,deny
Allow from all

Alias /nagios/ /usr/local/nagios/share/
<Directory “/usr/local/nagios/share”>
Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all

I would appreciate if any experts or experienced nagios users could enlighten me on this…

Thank you.

check your configure output you are probably missing the GD libraries.

Luca

I actually have this same issue. The UI says that the statusmap.wrl(statusmap.cgi?) cannot be found. Two questions…

  1. Will re-running configure erase my files with custom data(hosts, services, etc.)?
  2. Where can I get the GD libraries?

the cfg files don’t get touched… unless you run “make config” which creates the example files so if you renamed them as you should not even that would break your config… to be safe make a backup of the cfg files…

gd libraries usually have a package of some sort in the RPM manager.

Hmmm. No dice. I grabbed the gd library and the png/jpeg libraries that it depends on, then ran configure for Nagios and still nothing. Any ideas?

try getting the -dev version too.

I’m at a loss…I grabbed the additional dev packages and still nothing. You wouldn’t happen to know of a package list for Nagios would you? A lot of the packages required are deprecated or no longer offered anywhere.

EDIT: Somehow, it worked this time…I ran ./configure --with-gd-lib=[dir] and it went through without giving me the message about lacking png/jpeg support. However, I’m still not getting any images in the UI. Do I have to do some sort of make command in addition to configure?

yes at the end of the configutre routine it tells you which make commands are available:


jake:/usr/src/nagios-3.2.1# make
Please supply a command line argument (i.e. 'make all').  Other targets are:
   nagios cgis contrib modules
   clean
   install install-base install-cgis install-html install-config install-init install-commandmode fullinstall

so first make all then make install (at least)

And make install will not destroy my config files or file permissions correct? Would I need to just run make install-cgis since all I need is the statusmaps?

i think yu can even make the single statusmap by make statusmap
anyway as long as your config files are renamed from the standard example files mak eshouldn’t touch them.

Success! Got the statusmap and the histograms working. Although another issue has arisen…the statusmap is unreadable. Is there any way to manually set the sit of the generated image, and recursively position the nodes? At the moment, I’m only getting a 200x200 pixel image with 200 devices stacked right on top of each other.

check the different map layouts default should be circular. then you may want to have a look at the hosts coordinates features (check the docs). There’s a tool i once used to modify the layout of the hosts… it was an X application which modified the cfg files… worked quite well but i seem to recall it’s called nagiosgraph which doesn’t make much sense… :slight_smile:
Should you use any kind of GUI ALWAYS BACKUP YOUR CFG files :mrgreen:

I’ve tried all of the different methods, including user defined coords, and it still overlays the hosts. I’ve tried it with as few as one and as many as 300 but the same thing happens regardless.

user defined coords should return an error if you haven’t specified them… :confused:

Apologies. I forgot to mention that I did supply coords. I put them in the ups template that I made.

Sorry if the circular layout puts the hosts one over the other i have no idea what could be up… :confused: no problems during configure/compile?

No, everything went fine. It seems to me like there should be an algorithm for placing hosts on the statusmap that would evenly spread them out. Hence my confusion. When I select the collapsed tree map, it draws a huge image, 1024px+ wide but only around 300px long. Even with that layout, it shows a few hosts on their own, then stacks the remaining N-hosts. Is the statusmap.cgi just not built to handle so many hosts, or have you seen statusmaps with several hundred hosts properly laid out?

a user of the forums (Jakkedup) had quite some big maps if i remeber right… don’t know of any limitation from there… Not sure if trying a recompile could fix (i doubt it)