Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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:
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
That's a dangerous distro here on LQ, lots of users will tell you to contact RedHat since your paying for support (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.
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.
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.
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)
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.