Page 1 of 1

[SOLVED] compile only cmd.c

Posted: Wed Nov 14, 2012 5:43 am
by V3xX
Hello everyone,

I'm tired of click checkboxes if I acknowledge a service in Nagios.
So I wan't du modify the prechecked checkboxes.
I found this lines in cmd.cgi, so this is a compiled .c file.
I downloaded source-code of installed version and copied out the cmd.c
so my problem:
if I want to compile this cmd.c - file, it gives a lot of errors.
how can I compile this file?

I tried with "gcc cmd.c -o cmd.cgi",
this throws a lot of errors like "error: âOKâ undeclared (first use in this function)"

Can someone please help me?


Thanks a lot and kind regards
V3xX

Re: compile only cmd.c

Posted: Thu Nov 15, 2012 2:29 pm
by agriffin
You should really recompile all of Nagios. The CGIs are not separate executables.

Re: compile only cmd.c

Posted: Fri Nov 16, 2012 3:14 am
by V3xX
Thanks for your answer.

Didn't get it how to compile whole nagios under RHEL 5.8.
can someone assist me?



Thanks and kind regards

Re: compile only cmd.c

Posted: Fri Nov 16, 2012 2:24 pm
by agriffin
I think this document will help you a lot with that.

Re: compile only cmd.c

Posted: Thu Nov 22, 2012 3:51 am
by V3xX
hello,

every time i try to run

Code: Select all

./configure --with-command-group=nagcmd
following error occures:

Code: Select all

[root@ch10mgm9001 nagios-3.2.3]# ./configure --with-command-group=nagcmd
-bash: ./configure: Permission denied

here is the group:

Code: Select all

nagcmd:x:501:nagios
here is user nagios:

Code: Select all

nagios:x:101:102:nagios:/var/log/nagios:/bin/sh
i'm logged in with root



where is my fault?


Thanks for your help and kind regards
V3xX

Re: compile only cmd.c

Posted: Fri Nov 23, 2012 3:50 am
by V3xX
oh, i got it.
the file permission was the problem.
edit it with chmod cleared that error.


thanks anyway

V3xX

Re: [SOLVED] compile only cmd.c

Posted: Mon Nov 26, 2012 1:58 pm
by slansing
If this is related to your other "cmd.cgi" thread please let us know so that we may check that one as solved as well.

Re: [SOLVED] compile only cmd.c

Posted: Tue Nov 27, 2012 4:38 am
by V3xX
hi, this is only a few related. after i could compile the .c - file i'm unable to replace the .cgi - file.
but for this case i opened a new thread.