Time to setup monitoring for our new Sun Fire T2000 servers running Solaris 10 and Oracle.... That being said, I began compiling the nagios plugins in the normal way, however, I discovered there a couple tweaks on Solaris 10.
Here's a way to get it done... BTW, check_disk does NOT work with ZFS zpools yet...
Log in as a normal user acount. Invoke bash shell.
bashUn-tar the archive.
gunzip nagios-plugins-1.4.11.tar.gz tar -xvf nagios-plugins-1.4.11.tarSet path as follows.
PATH=$PATH:/usr/sbin:/usr/sfw/bin:/usr/ccs/binMysql libraries are compiled using Sun's C compiler and have incompatible flags. Skip the mysql package in configure. If you absolutely need check_mysql, then consider using Sun Studio to compile the plugins.
./configure --without-mysqlRun gmake instead of make.
gmakeSu to root. set path, run gmake install
suPATH=$PATH:/usr/sbin:/usr/sfw/bin:/usr/ccs/bingmake installDone. Now you can navigate to /usr/local/nagios/libexec to test them out. You should be able to tar them up and place them on any Solaris 10 sparc server and they should work. They will need to be re-compiled for Solaris 9 however.
Now here is what not to do...
-bash-3.00$ PATH=$PATH:/usr/sbin-bash-3.00$ ./configurechecking for a BSD-compatible install... build-aux/install-sh -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... no
checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
-bash-3.00$ PATH=$PATH:/usr/sfw/bin
-bash-3.00$ ./configure
... Sucess (or so I think...)
-bash-3.00$ find / -name make 2>&1 | grep -v cannot/usr/share/lib/make
/usr/ccs/bin/make
/usr/xpg4/bin/make
-bash-3.00$ /usr/xpg4/bin/makemake all-recursive
bash: make: command not found
*** Error code 127
make: Fatal error: Command failed for target `all'
*HINT*
http://forum.java.sun.com/thread.jspa?threadID=5096509&messageID=9331271
-bash-3.00$ PATH=$PATH:/usr/ccs/bin-bash-3.00$ /usr/xpg4/bin/make....
*** Error code 255
make: Fatal error: Command failed for target `libgnu.a'
Current working directory /export/home/datactr/nagios-plugins-1.4.11/gl
*** Error code 1
make: Fatal error: Command failed for target `all'
Current working directory /export/home/datactr/nagios-plugins-1.4.11/gl
*** Error code 1
The following command caused the error:
failcom='exit 1'; \
for f in x $MAKEFLAGS; do \
case $f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
list='gl lib plugins plugins-scripts plugins-root po'; for subdir in $list; do \
echo "Making $target in $subdir"; \
if test "$subdir" = "."; then \
dot_seen=yes; \
local_target="$target-am"; \
else \
local_target="$target"; \
fi; \
(cd $subdir && make $local_target) \
|| eval $failcom; \
done; \
if test "$dot_seen" = "no"; then \
make "$target-am" || exit 1; \
fi; test -z "$fail"
make: Fatal error: Command failed for target `all-recursive'
Current working directory /export/home/datactr/nagios-plugins-1.4.11
*** Error code 1
make: Fatal error: Command failed for target `all'
Ah Ha... Re configure...
-bash-3.00$ ./configure-bash-3.00$ make clean
-bash-3.00$ gmake ....gcc: language strconst not recognized
gcc: check_mysql.c: linker input file unused because linking not done
mv: cannot access .deps/check_mysql-check_mysql.Tpo
gmake[2]: *** [check_mysql-check_mysql.o] Error 2
gmake[2]: Leaving directory `/export/home/datactr/nagios-plugins-1.4.11/plugins'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/export/home/datactr/nagios-plugins-1.4.11'
gmake: *** [all] Error 2
-bash-3.00$ ./configure --without-mysql
-bash-3.00$ gmake clean-bash-3.00$ gmake
-bash-3.00$ su
# PATH=$PATH:/usr/sbin:/usr/sfw/bin:/usr/ccs/bin# gmake install