LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Nagios, Statusmap.cgi and Trend.cgi NOT FOUND (http://www.linuxquestions.org/questions/linux-software-2/nagios-statusmap-cgi-and-trend-cgi-not-found-812138/)

edwardcode 06-04-2010 08:35 AM

Nagios, Statusmap.cgi and Trend.cgi NOT FOUND
 
I have Nagios 3.2.1 and I installed it and everything is up and running smoothly. Then I noticed that when I click on Maps or Trends I get this error

Code:

Not Found

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

So I go to my sbin ( there is an alias in the /etc/httpd/conf.d/nagios file that says sbin=cgi-bin) and I do not even see the statusmap.cgi or the trend.cgi. Then I open up the nagios install folder and I see the statusmap.c and trend.c file. I try to compile the .c file with the command
Code:

gcc statusmap.c
and I get a boat load of errors.


I have installed gd-devel and all of its dependancies.

Is there some other way I can conpile the .c file or can some one just give me the original (not modified) statusmap.cgi and/or the trend.cgi file(s). I you have any other ideas as to what it could be that would be great as well.

Thanks in advance

EricTRA 06-04-2010 11:38 AM

Hello,

If that file (statusmap.cgi) is not generated at compilation of Nagios, then most likely you're missing one or more libraries. Check if you got this library installed:
Code:

libgd2-xpm-dev
and if not install it and try again.

Kind regards,

Eric

edwardcode 06-04-2010 11:52 AM

Do you know where i can download that. I am having touble finding that

EricTRA 06-04-2010 11:53 AM

Hi,

Can you tell me what distro you're using? I know you mentioned that in another thread but my memory is only semi-photographic and that part I don't remember :D

Kind regards,

Eric

edwardcode 06-04-2010 12:02 PM

I am usign RHEL 5.5

EricTRA 06-04-2010 12:15 PM

Hello,

That's a dangerous distro here on LQ, lots of users will tell you to contact RedHat since your paying for support :D (I've got three RHEL left at work; migrating to Debian second half of this year)

The GD utils can be downloaded here:
http://www.boutell.com/gd/http/gd-2.0.33.tar.gz
but maybe you can install it using RHN or Yum so that any possible dependencies get installed automatically.

I can point you to the Debian files but that will probably not be of use to you, normally the library libgd2-xpm-dev should be available for RedHat also. You can check at this site for an RPM.

Kind regards,

Eric

edwardcode 06-04-2010 12:32 PM

I know that is a bad one but I still would rather do it myself. lol

Any ways I installed this http://www.boutell.com/gd/http/gd-2.0.33.tar.gz and then reinstalled nagios and i still do not see statusmap.cgi.

Do you have any other suggestions?

EricTRA 06-04-2010 12:55 PM

Hi,

The GD Utils I pointed to in my previous post are needed, but also the library I posted is needed. Withouth that you don't have the necessary dependencies installed. When compiling Nagios it does a lot of checking and if dependencies for some part are missing then that part doesn't get installed. You need the libgd2-xpm-dev library installed for Nagios to compile the statusmap.cgi. I could send you mine tomorrow morning but most likely it will fail because you are missing a required library.

As said before, I can point you to the correct file for Debian but don't have a clue where to start looking for a RPM.

Kind regards,

Eric

edwardcode 06-04-2010 01:35 PM

What do you think of this website? http://www.netmonitoring.org/nagios/...debian-redhat/

EricTRA 06-04-2010 01:41 PM

Hi,

Looks pretty decent but refers to Nagios version 2, so check if requirements are still the same for Nagios 3 (that's what you're using right?)

Kind regards,

Eric

edwardcode 06-07-2010 05:58 AM

ok here is a question. would it work if you sent me a coppy of your compiled status.cgi file and just work out the dependencies later? I think I have all of the dependancies.

Also what does it mean when is says it needs a dependancy like this one

Code:

libxx.so.daemon-xx.xx.xx
libxx.so-xx.xx.xx

what does the "so" mean? I can not seem to find the "libxx.so" (or what ever) file any were on the internet.

EricTRA 06-07-2010 06:05 AM

Hi,

The extension 'so' means shared object. I've uploaded my statusmap.cgi but doubt that it will help you out. If so, please let me know.

Kind regards,

Eric

edwardcode 06-07-2010 06:31 AM

You were right that did not work. Why not try it though. lol.

What does "shared object" mean/do? What is the diffrence between the 'libxx' and 'libxx.so'?


When I open up the install file I see the statusmap.c file. That means that it is written in C languadge and that need compiled. When I go to compile it I type

Code:

gcc statusmap.c
and then I get an error

Code:

statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:1: error: stray ‘##’ in program
statusmap.c:3:4: error: invalid preprocessing directive #STATUSMAP
statusmap.c:5:3: error: invalid preprocessing directive #Copyright
statusmap.c:6:3: error: invalid preprocessing directive #Last
statusmap.c:8:3: error: invalid preprocessing directive #Description
statusmap.c:10:3: error: invalid preprocessing directive #This
statusmap.c:11:3: error: invalid preprocessing directive #network
statusmap.c:13:3: error: invalid preprocessing directive #License
statusmap.c:15:3: error: invalid preprocessing directive #This
statusmap.c:16:3: error: invalid preprocessing directive #it
statusmap.c:17:3: error: invalid preprocessing directive #published
statusmap.c:19:3: error: invalid preprocessing directive #This
statusmap.c:20:3: error: invalid preprocessing directive #but
statusmap.c:21:3: error: invalid preprocessing directive #MERCHANTABILITY
statusmap.c:22:3: error: invalid preprocessing directive #GNU
statusmap.c:24:3: error: invalid preprocessing directive #You
statusmap.c:25:3: error: invalid preprocessing directive #along
statusmap.c:26:3: error: invalid preprocessing directive #Foundation
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘##’ in program
statusmap.c:27: error: stray ‘#’ in program
statusmap.c:59: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
statusmap.c:60: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
statusmap.c:220: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
statusmap.c: In function ‘main’:
statusmap.c:275: error: ‘READ_ALL_STATUS_DATA’ undeclared (first use in this function)
statusmap.c:275: error: (Each undeclared identifier is reported only once
statusmap.c:275: error: for each function it appears in.)
statusmap.c: In function ‘draw_host_links’:
statusmap.c:1438: error: ‘hoststatus’ undeclared (first use in this function)
statusmap.c:1438: error: ‘this_hoststatus’ undeclared (first use in this function)
statusmap.c:1439: error: ‘parent_hoststatus’ undeclared (first use in this function)
statusmap.c:1478: error: ‘HOST_DOWN’ undeclared (first use in this function)
statusmap.c:1478: error: ‘HOST_UNREACHABLE’ undeclared (first use in this function)
statusmap.c: In function ‘draw_hosts’:
statusmap.c:1574: error: ‘hoststatus’ undeclared (first use in this function)
statusmap.c:1574: error: ‘temp_hoststatus’ undeclared (first use in this function)
statusmap.c:1658: error: ‘HOST_DOWN’ undeclared (first use in this function)
statusmap.c:1660: error: ‘HOST_UNREACHABLE’ undeclared (first use in this function)
statusmap.c:1662: error: ‘HOST_UP’ undeclared (first use in this function)
statusmap.c:1664: error: ‘HOST_PENDING’ undeclared (first use in this function)
statusmap.c: In function ‘draw_host_text’:
statusmap.c:1853: error: ‘hoststatus’ undeclared (first use in this function)
statusmap.c:1853: error: ‘temp_hoststatus’ undeclared (first use in this function)
statusmap.c:1873: error: ‘HOST_DOWN’ undeclared (first use in this function)
statusmap.c:1877: error: ‘HOST_UNREACHABLE’ undeclared (first use in this function)
statusmap.c:1881: error: ‘HOST_UP’ undeclared (first use in this function)
statusmap.c:1885: error: ‘HOST_PENDING’ undeclared (first use in this function)
statusmap.c: In function ‘write_host_popup_text’:
statusmap.c:1906: error: ‘hoststatus’ undeclared (first use in this function)
statusmap.c:1906: error: ‘temp_status’ undeclared (first use in this function)
statusmap.c:1956: error: ‘HOST_DOWN’ undeclared (first use in this function)
statusmap.c:1963: error: ‘HOST_UNREACHABLE’ undeclared (first use in this function)
statusmap.c:1970: error: ‘HOST_UP’ undeclared (first use in this function)
statusmap.c:1973: error: ‘HOST_PENDING’ undeclared (first use in this function)
statusmap.c:2011: error: ‘SERVICE_OK’ undeclared (first use in this function)
statusmap.c:2014: error: ‘SERVICE_CRITICAL’ undeclared (first use in this function)
statusmap.c:2017: error: ‘SERVICE_WARNING’ undeclared (first use in this function)
statusmap.c:2020: error: ‘SERVICE_UNKNOWN’ undeclared (first use in this function)
statusmap.c:2023: error: ‘SERVICE_PENDING’ undeclared (first use in this function)
statusmap.c: In function ‘draw_circular_layer_markup’:
statusmap.c:2740: error: ‘hoststatus’ undeclared (first use in this function)
statusmap.c:2740: error: ‘temp_hoststatus’ undeclared (first use in this function)
statusmap.c:2834: error: ‘HOST_DOWN’ undeclared (first use in this function)
statusmap.c:2834: error: ‘HOST_UNREACHABLE’ undeclared (first use in this function)

Why can I not compile this .c file?

EricTRA 06-07-2010 06:39 AM

Hello,

You can read a very informative description on libraries on this site.

I was afraid that it wouldn't work but hey, now you know for sure, right?

The reason why you cannot compile the file is because you're missing libraries as mentioned. If you cannot find the libraries for your distro then you could try downloading the DEB equivalent (Debian) and convert them using Alien. I don't guarantee that it'll work though, but it's worth a try.

Kind regards,

Eric

edwardcode 06-07-2010 07:09 AM

ok I am trying to install a dependency (libpng3), it says I have a dependency of

Code:

  rpmlib(PayloadIsLzma) <= 4.4.2-1 is needed by libpng3-1.2.26-14.10.ppc
information on the internet is a little hazzy do you know where I can download it and what it is?


Once agian thank you for being so pacient.


All times are GMT -5. The time now is 03:11 AM.