DaemonForums  

Go Back   DaemonForums > Miscellaneous > Guides

Guides All Guides and HOWTO's.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 20th July 2008
roundkat roundkat is offline
Shell Scout
 
Join Date: May 2008
Posts: 115
Default Guide: Solaris 10 - Nagios -rrdtool -pnp4Nagios

I know this is a *BSD forum but yall have given Solaris a place so I figured
this would be a good place to post my recent pet project.

This is not a HOWTO, it is more of a guide.
Any comments corrections are welcome..

We run a Solaris environment at work with primarily Solaris 10
and a few Solaris 9 boxes that are hopefully going away soon..

Nagios is something I learned about from this community years ago.
I set it up on an OPenBSD box at my old job and it is still running today..

Ok.. On with the guide:

This was done in a full root Solaris 10 zone on both SPARC and x86 architecture.


Installation of Nagios 3.03


Download the following Source code from SourceForge or
their respective site:

Nagios -- nagios-3.03
Nagios Plugins -- nagios-plugins-1.4.12
http://www.nagios.org/download/

RRdTool -- rrdtool-1.2.9
http://oss.oetiker.ch/rrdtool/download.en.html

CgiLib
http://www.infodrom.org/projects/cgilib/download.php

PHP -- php-5.2.6
http://www.php.net/downloads.php

Lightweight CGI Library -- cgilib-0.5
http://www.infodrom.org/projects/cgilib/download.php

PNP4Nagios -- pnp-0.4.10
http://www.pnp4nagios.org/pnp/start

PNP4Nagios along with Rrdtool uses performance data and produces some very nice graphs.

Set Root path to:
Code:
/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/mysql/bin:/usr/sfw/bin:/usr/ccs/bin:/usr/ucb
Set configure runtime linking environment
Code:
# crle -u -l /usr/local/lib
# crle -u -l /usr/local/ssl/lib
Install the following Sunfreeware packages..

If pkg-get in not installed on your system then download it here:
http://www.bolthole.com/solaris/pkg-get.html

After installing pkg-get
Code:
# pkg-get -U
Sunfreeware packages
Code:
# pkg-get install autoconf-2.62 bison-2.3 coreutils-6.4 expat-2.0.1 \
flex-2.5.4a fontconfig-2.4.2 freetype-2.3.1 gcc-3.4.6 \
gd-2.0.35 gtk+-1.2.10 jpeg-6b libpng-1.2.29 libtool-1.5.24 \
libiconv-1.9.2 libintl-3.4.0 make-3.81 mysql-5.0.51  \
ncurses-5.6 openssl-0.9.8h pkgconfig-0.20 \
zlib-1.2.3 netsnmp-5.4.1.1 libxml2- 2.6.31
Add the nagios user and group
Code:
# groupadd -g 667 nagios 
# useradd -d /usr/local/nagios -g nagios -u 666 -s /bin/false nagios
Configure nagios

Code:
# ./configure \
--prefix=/usr/local/nagios \
--enable-event-broker \
--with-gd-lib=/usr/local/lib \
--with-gd-inc=/usr/local/include \
--with-nagios-user=nagios \
--with-nagios-group=nagios \
--with-command-user=webservd \
--with-command-group=webservd \
--with-checkresult-dir=/usr/local/nagios/tmp/results \
--with-temp-dir=/usr/local/nagios/tmp \
--with-init-dir=/etc/init.d \
--with-lockfile=/usr/local/nagios/var/nagios.lock \
--with-cgiurl=/nagios/cgi-bin \
--with-htmurl=/nagios
if everything works
Code:
# make all
# make install
# make install-init
# make install-commandmode
# make install-config
Solaris 10 uses apache2
Code:
# cp /etc/apache2/httpd.conf-example /etc/apache2/httpd.conf
Add the following at the bottom of http.conf
Code:
ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin

<Directory "/usr/local/nagios/sbin">
    Options ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all
    AuthName "Nagios Access"
    AuthType Basic
    AuthUserFile /usr/local/nagios/etc/htpasswd.users
    Require valid-user
</Directory>

Alias /nagios /usr/local/nagios/share

<Directory "/usr/local/nagios/share">
    Options None
    AllowOverride None
    Order allow,deny
    Allow from all
    AuthName "Nagios Access"
    AuthType Basic
    AuthUserFile /usr/local/nagios/etc/htpasswd.users
    Require valid-user
</Directory>
Now check the httpd.conf
Code:
# /usr/apache2/bin/apachectl configtest 
Syntax OK
Enable apache2 and check
Code:
# svcadm enable http

# svcs  http 
STATE          STIME    FMRI
online         12:10:19 svc:/network/http:apache2
Create the htpasswd.users file
Code:
# /usr/apache2/bin/htpasswd -c /usr/local/nagios/etc/htpasswd.users <username>
# New password: 
# Re-type new password: 
  Adding password for user <username>
Check Nagios
Code:
# /etc/init.d/nagios checkconfig
Running configuration check...Killed
 CONFIG ERROR!  Check your Nagios configuration.
If you get this error chances are you didn't run the
crle command to link the necessary libraries..
There should be
/lib:/usr/lib:/usr/local/lib:/usr/local/ssl/lib
in your crle output.

Read on
Quote:
Lets check the nagios binaries
# ldd /usr/local/nagios/bin/nagios
libm.so.2 => /lib/libm.so.2
libpthread.so.1 => /lib/libpthread.so.1
libltdl.so.3 => (file not found)
librt.so.1 => /lib/librt.so.1
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0
libc.so.1 => /lib/libc.so.1
libaio.so.1 => /lib/libaio.so.1
libmd.so.1 => /lib/libmd.so.1

Note the "file not found"
After we check again..(after setting our crle options)
Quote:
# ldd /usr/local/nagios/bin/nagios
libm.so.2 => /lib/libm.so.2
libpthread.so.1 => /lib/libpthread.so.1
libltdl.so.3 => /usr/local/lib/libltdl.so.3
librt.so.1 => /lib/librt.so.1
libc.so.1 => /lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1
libaio.so.1 => /lib/libaio.so.1
libmd.so.1 => /lib/libmd.so.1
Check nagios again.
Code:
# /etc/init.d/nagios checkconfig 
Running configuration check... OK.
Start nagios
Code:
# /etc/init.d/nagios start
-n Starting nagios:
 done.
# tail /usr/local/nagios/var/nagios.log
[1214068735] Nagios 3.0.2 starting... (PID=13222)
[1214068735] Local time is Sat Jun 21 12:18:55 CDT 2008
[1214068735] LOG VERSION: 2.0
[1214068735] Finished daemonizing... (New PID=13223)
[1214068735] Error: Could not create external command file 
'/usr/local/nagios/var/rw/nagios.cmd' as named pipe: (13) -> Permission 
denied.  If this file already exists and you are sure that another copy of 
Nagios is not running, you should delete this file.
[1214068735] Bailing out due to errors encountered while trying to 
initialize the external command file... (PID=13223)
Oops Nagios isn't starting

We must add nagios to the webservd group
Code:
# usermod -G webservd nagios
Notice that webservd is the owner of the rw which is
used to run commands from the Web.
*That* is why nagios needs to be a member of the webservd group
Code:
# pwd
/usr/local/nagios/var
# ls -al
total 64
drwxrwxr-x   4 nagios   nagios       512 Jun 21 12:21 .
drwxr-xr-x   9 root     root         512 Jun 21 12:04 ..
drwxrwxr-x   2 nagios   nagios       512 Jun 21 12:03 archives
-rw-r--r--   1 nagios   nagios         6 Jun 21 12:19 nagios.lock
-rw-r--r--   1 nagios   nagios       755 Jun 21 12:19 nagios.log
-rw-r--r--   1 nagios   nagios     12943 Jun 21 12:19 objects.cache
drwxrwsr-x   2 webservd   webservd       512 Jun 21 12:19 rw
-rw-rw-r--   1 nagios   nagios     13165 Jun 21 12:21 status.dat

# tail /usr/local/nagios/var/nagios.log
[1214068797] Nagios 3.0.2 starting... (PID=13237)
[1214068797] Local time is Sat Jun 21 12:19:57 CDT 2008
[1214068797] LOG VERSION: 2.0
Good Nagios is started and apache2 is also started..
Now let's check to see if we can access the web gui.

Ok.. we can see the web after we get logged in but
we don't have any permissions.. yet .. :-)
Quote:
Web Page Banner
It appears as though you do not have permission to view information for
any of the hosts you requested...
If you believe this is an error, check the HTTP server authentication
requirements for accessing this CGI
and check the authorization options in your CGI configuration file.
It tells us what to do..
Mod the cgi file..
Code:
# vi /usr/local/nagios/etc/cgi.cfg
and add <username> to every place nagiosadmin is located..
Then just refresh your browser..
Woot..

Now lets compile the plugins

After downloading the latest from Sourceforge
Code:
# wget http://internap.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.12.tar.gz
We set up our configure (notice that mysql needs to be installed to compile)
Code:
# ./configure \
--prefix=/usr/local/nagios \
--with-nagios-user=nagios \
--with-nagios-group=nagios \
--with-cgiurl=/nagios/cgi-bin \
--with-openssl=/usr/local/ssl \
--with-mysql=/usr/local/mysql/bin/mysql_config \
--with-snmpget-command=/usr/local/bin/snmpget \
--with-snmpgetnext-command=/usr/local/bin/snmpgetnext 

# make 
# make install
Check to see that are plugins are there:
Code:
# ls /usr/local/nagios/libexec 
check_apt           check_file_age      check_load          check_ntp_peer 
check_rpc           check_udp
check_breeze        check_flexlm        check_log           check_ntp_time 
check_sensors       check_ups
check_by_ssh        check_ftp           check_mailq         check_nwstat   
check_simap         check_users
check_clamd         check_hpjd          check_mrtg          check_oracle   
check_smtp          check_wave
check_cluster       check_http          check_mrtgtraf      check_overcr   
check_snmp          negate
check_dig           check_ifoperstatus  check_nagios        check_pgsql   
check_spop          urlize
check_disk          check_ifstatus      check_nntp          check_ping   
check_ssh           utils.pm
check_disk_smb      check_imap          check_nntps         check_pop  
check_ssmtp         utils.sh
check_dns           check_ircd          check_nt            check_procs   
check_tcp
check_dummy         check_jabber        check_ntp           check_real   
check_time
Now lets compile PHP

Compile php (note: php will not compile in a sparse root zone)
Code:
# ./configure \
--prefix=/usr/local \
--with-apxs2=/usr/apache2/bin/apxs \
--with-openssl=/usr/local/ssl \
--with-gd=/usr/local \
--with-jpeg-dir=/usr/local \
--with-png-dir=/usr/local \
--with-freetype-dir=/usr/local \
--with-zlib=/usr/local \
--with-pear

Looks like everything configured ok..
# make 
# make test  (states that I may have found a bug in PHP)
# make install
Add to /etc/apache2/httpd.conf
Quote:
LoadModule php5_module libexec/libphp5.so
DirectoryIndex index.html index.html.var index.php
AddType application/x-httpd-php .php
Check apache2
Code:
# /usr/apache2/bin/apachectl configtest
[Sat Jun 21 20:12:06 2008] [warn] module php5_module is already loaded, 
skipping
Syntax OK
Install rrdtool
I tried the sunfreeware package 1.3.0 but it was missing something
at the end could not find a path (which existed) so I went back to 1.2.9

Rrdtool 1.2.9(this version) uses cgilib-0.5.tar.gz

Note: compile cgilib-0.5 and copy the files or rrdtool 1.2.9 will not compile
properly.


Add to Makefile
Code:
CC=gcc

then 

# make

Copy the necessary files to their respective location

# cp libcgi.a /usr/local/lib
# cp cgi.h /usr/local/include
Rrdtool 1.2.9
Code:
# ./configure 
# make
# make install
Pnp4nagios
Code:
# ./configure \
--prefix=/usr/local/nagios \
--with-nagios-user=nagios \
--with-nagios-group=nagios \
--with-rrdtool=/usr/local/rrdtool-1.2.9/bin/rrdtool

Change  the permissions if needed

# chown -R nagios:nagios /usr/local/nagios/var/rrd
# make all
# make install
# make install-init
# make-nstall-config
Now make changes to the nagios.cfg
Quote:
Change
process_performance_data=0
to
process_performance_data=1

Uncomment

#host_perfdata_command=process-host-perfdata
#service_perfdata_command=process-service-perfdata

Change
#host_perfdata_file=/tmp/host-perfdata
#service_perfdata_file=/tmp/service-perfdata
to
host_perfdata_file=/usr/local/nagios/tmp/host-perfdata
service_perfdata_file=/usr/local/nagios/tmp/service-perfdata

Commands.cfg
Comment out

# 'process-host-perfdata' command definition
##define command{
## command_name process-host-perfdata
## command_line /usr/bin/printf "%b"
"$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTAT TEMPT$\t$HOSTSTATETYPE$
\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA $\n" >>
/usr/local/nagios/var/host-perfdata.out
## }


# 'process-service-perfdata' command definition
##define command{
## command_name process-service-perfdata
## command_line /usr/bin/printf "%b"
"$LASTSERVICECHECK$\t$HOSTNAME$\t$SERVICEDESC$\t$S ERVICESTATE$\t$SERVICEA
TTEMPT$\t$SERVICESTATETYPE$\t$SERVICEEXECUTIONTIME $\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERF DATA$\n"
>> >> /usr/l
ocal/nagios/var/service-perfdata.out
## }

Add

define command{
command_name process-host-perfdata
command_line /usr/local/nagios/libexec/process_perfdata.pl -d
HOSTPERFDATA
}

define command{
command_name process-service-perfdata
command_line /usr/local/nagios/libexec/process_perfdata.pl
}

Edit templates.cfg

Add to "generic-host" HOST Template
action_url /nagios/pnp/index.php?host=$HOSTNAME$

Add to "generic-servic" Sevice Template
action_url /nagios/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$

In /usr/local/nagios/etc/pnp
Code:
# cp rra.cfg-sample rra.cfg
# cp process_perfdata.cfg-sample process_perfdata.cfg
# cp npcd.cfg-sample npcd.cfg
Change permissions on the nagios tmp directory
# chown -R nagios:nagios /usr/local/nagios/tmp
You now have a very basic setup of Nagios running on a Solaris 10
box.
The configuration file is locahost.cfg
Use the localhost.cfg as a starting point to make other
*.cfg files

Note:
Check_swap
check_local_procs
do not work out of the box..

Update: I have made few changes (edits based on comments)

rk
__________________
All posts sent on ReCycled Electrons...

Last edited by roundkat; 31st December 2008 at 03:08 PM. Reason: changed nobody to webservd (Solaris httpd user) fixed typos - more typos
Reply With Quote
  #2   (View Single Post)  
Old 21st October 2008
rahulc73 rahulc73 is offline
New User
 
Join Date: Oct 2008
Posts: 3
Post couple of issues

Hi.. I have Nagios 3.0.3 installed with plugins on Solaris x86. The default localhost page comes up.

Within localhosts.cfg, when i added /usr and /var (they are seperate partitions), the page would not show this information.

Similarly, when I add other windows hosts in windows.cfg, I cannot get them to show up information.

I have installed Nagios in /nagios-3.0.3 and the plugins into /nagios-plugins.1.13.x.

When I ran ./configure for both, I had used --prefix=/nagios.3.0.3 and --prefix=/nagios-plugins.1.13.x during compilation.

As mentioned in your guide, using /usr/local/nagios as --prefix has significance besides using it as --prefix???

AND OTHER THING: Could be that solaris has firewall running on it?

Appreciate an early reply, regards,

Rahul
Reply With Quote
  #3   (View Single Post)  
Old 21st October 2008
rahulc73 rahulc73 is offline
New User
 
Join Date: Oct 2008
Posts: 3
Thumbs up I have it working with changing the --prefix

I have this working.. looks like --prefix is significant.. i recompiled plugins using --prefix=/nagios-3.0.3 and the remaining..
Reply With Quote
  #4   (View Single Post)  
Old 21st October 2008
rahulc73 rahulc73 is offline
New User
 
Join Date: Oct 2008
Posts: 3
Default Error configuring rrdtool 1.2.9

HI, I am trying to configure rrdtool and cgilib as mentioned. I got the make file of cgilib and copy done appropriately but when I try to run ./configure for rrd tool here is the error I get:

bash-3.00# ./configure
checking build system type... i386-pc-solaris2.10
checking host system type... i386-pc-solaris2.10
checking target system type... i386-pc-solaris2.10
checking for a BSD-compatible install... ./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)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for egrep... egrep
checking for ld used by gcc... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking for /usr/ccs/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/ccs/bin/nm -p
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 262144
checking command to parse /usr/ccs/bin/nm -p output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag works... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... solaris2.10 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking whether the g++ linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.10 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
appending configuration tag "F77" to libtool
checking for ANSI C header files... (cached) yes
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for sys/stat.h... (cached) yes
checking for sys/types.h... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking fp_class.h usability... no
checking fp_class.h presence... no
checking for fp_class.h... no
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking for unistd.h... (cached) yes
checking ieeefp.h usability... yes
checking ieeefp.h presence... yes
checking for ieeefp.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking for an ANSI C-conforming const... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for acos... no
checking for acos in -lm... yes
checking for strftime... yes
checking for vprintf... yes
checking for _doprnt... yes
checking whether byte ordering is bigendian... no
checking for tzset... yes
checking for mbstowcs... yes
checking for opendir... yes
checking for readdir... yes
checking for chdir... yes
checking for chroot... yes
checking for getuid... yes
checking for setlocale... yes
checking for strerror... yes
checking for strerror_r... yes
checking for snprintf... yes
checking for vsnprintf... yes
checking for fpclass... yes
checking for class... no
checking for fp_class... no
checking for isnan... yes
checking for memmove... yes
checking for strchr... yes
checking for mktime... yes
checking for getrusage... yes
checking for gettimeofday... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking for fpclassify... no
checking for fpclassify with <math.h>... no
checking for finite... yes
checking for isinf... no
checking for isinf with <math.h>... no
checking if IEEE math works out of the box... yes
checking for cgiInit in -lcgi... no
checking for pkg-config... pkg-config
configure: WARNING:
----------------------------------------------------------------------------
* I found a copy of pkgconfig, but there is no cgilib.pc file around.
You may want to set the PKG_CONFIG_PATH variable to point to its
location.
----------------------------------------------------------------------------

configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of cgilib. Check config.log for hints on why
this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
so that compiler and the linker can find libcgi and its header files. If
you have not installed cgilib, you can get it either from its original home on

http://www.infodrom.org/projects/cgilib

You can find also find an archive copy on

http://people.ee.ethz.ch/~oetiker/we...dtool/pub/libs

The last tested version of cgilib is 0.5.

LIBS=-lm
LDFLAGS=
CPPFLAGS=

----------------------------------------------------------------------------

checking for art_vpath_add_point in -lart_lgpl_2... yes
checking libart_lgpl/libart.h usability... yes
checking libart_lgpl/libart.h presence... yes
checking for libart_lgpl/libart.h... yes
checking for zlibVersion in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for png_access_version_number in -lpng... yes
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for FT_Init_FreeType in -lfreetype... yes
checking ft2build.h usability... no
checking ft2build.h presence... no
checking for ft2build.h... no
checking for pkg-config... (cached) pkg-config
checking for FT_Init_FreeType in -lfreetype... yes
checking ft2build.h usability... yes
checking ft2build.h presence... yes
checking for ft2build.h... yes
configure: error: Please fix the library issues listed above and try again.
Reply With Quote
  #5   (View Single Post)  
Old 7th November 2008
dguitar dguitar is offline
Real Name: Dave
New User
 
Join Date: Jun 2008
Location: Washington, DC
Posts: 1
Default

Well I had a SPARC box sitting in a lab collecting dust, so I figured I'll try this out, and I needed a Nagios box there anyways. I've been using nagios for a few years, but never touched RRDTools or PNP4Nagios.

Just a few things I'd like to add to your AWESOME guide.

In your ./configure for your plugins - you just need --with-mysql, don't add in the = sign + path. As you can see from the print out of your plugins, check_mysql isn't in there. Also you have a typo in that configure command, the last word should be 'snmpgetnext' instead of 'snmpgetnetxt'.

I had a lib missing, not the one you had (libgcc_s.so.1), even after the crle commands. I just created a sym link so that the lib would be in the folder. Might not be the best solution but it worked.

I had a lot of trouble getting RRDTools to complie so I just installed the one on SunFreeware which was 1.2.19. Worked fine.

I'm not a Solaris admin, and had a lot of problems with the pkg-get stuff. I ended up just downloading the packages from SunFreeware.

Now I just need to figure how to actually use PNP4Nagios to my benefit... lol

Thanks again for writing this great Guide!
Reply With Quote
  #6   (View Single Post)  
Old 30th December 2008
roundkat roundkat is offline
Shell Scout
 
Join Date: May 2008
Posts: 115
Default

Quote:
Originally Posted by rahulc73 View Post
HI, I am trying to configure rrdtool and cgilib as mentioned. I got the make file of cgilib and copy done appropriately but when I try to run ./configure for rrd tool here is the error I get:


checking for pkg-config... pkg-config
configure: WARNING:
----------------------------------------------------------------------------
* I found a copy of pkgconfig, but there is no cgilib.pc file around.
You may want to set the PKG_CONFIG_PATH variable to point to its
location.
----------------------------------------------------------------------------

configure: WARNING:
----------------------------------------------------------------------------
* I could not find a working copy of cgilib. Check config.log for hints on why
this is the case. Maybe you need to set LDFLAGS and CPPFLAGS appropriately
so that compiler and the linker can find libcgi and its header files. If
you have not installed cgilib, you can get it either from its original home on

http://www.infodrom.org/projects/cgilib

You can find also find an archive copy on

http://people.ee.ethz.ch/~oetiker/we...dtool/pub/libs

The last tested version of cgilib is 0.5.

LIBS=-lm
LDFLAGS=
CPPFLAGS=

----------------------------------------------------------------------------

checking for art_vpath_add_point in -lart_lgpl_2... yes
checking libart_lgpl/libart.h usability... yes
checking libart_lgpl/libart.h presence... yes
checking for libart_lgpl/libart.h... yes
checking for zlibVersion in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for png_access_version_number in -lpng... yes
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for FT_Init_FreeType in -lfreetype... yes
checking ft2build.h usability... no
checking ft2build.h presence... no
checking for ft2build.h... no
checking for pkg-config... (cached) pkg-config
checking for FT_Init_FreeType in -lfreetype... yes
checking ft2build.h usability... yes
checking ft2build.h presence... yes
checking for ft2build.h... yes
configure: error: Please fix the library issues listed above and try again.
I am sorry I didn't check comments on this page.. I will in the future..
This looks like you have rdtool 1.3.0 because of the "pkgconfig"
error..
I remember seeing that error and running into the same compile issues
as you have..

rk
__________________
All posts sent on ReCycled Electrons...
Reply With Quote
  #7   (View Single Post)  
Old 30th December 2008
roundkat roundkat is offline
Shell Scout
 
Join Date: May 2008
Posts: 115
Default

Quote:
Originally Posted by dguitar View Post
Well I had a SPARC box sitting in a lab collecting dust, so I figured I'll try this out, and I needed a Nagios box there anyways. I've been using nagios for a few years, but never touched RRDTools or PNP4Nagios.
Nagios is an awesome product

Quote:
Just a few things I'd like to add to your AWESOME guide.

In your ./configure for your plugins - you just need --with-mysql, don't add in the = sign + path. As you can see from the print out of your plugins, check_mysql isn't in there. Also you have a typo in that configure command, the last word should be 'snmpgetnext' instead of 'snmpgetnetxt'.
Fixed the typo - thx
MySql - I could never get the plugin to compile.. just never fixed the guide..

Quote:
I had a lib missing, not the one you had (libgcc_s.so.1), even after the crle commands. I just created a sym link so that the lib would be in the folder. Might not be the best solution but it worked.
I tried symlinks at first (in a sparse root zone) but kept running into
issues..
Essentially, PHP made me go to a full root zone and crle did pretty
much solve all the issues..
Quote:
I had a lot of trouble getting RRDTools to complie so I just installed the one on SunFreeware which was 1.2.19. Worked fine.
I also tried that route but got errors compiling pnp4nagios...
the cgilib is what got me in compiling rrdtool-1.2.9
Quote:
I'm not a Solaris admin, and had a lot of problems with the pkg-get stuff. I ended up just downloading the packages from SunFreeware.
pkg-get installs in /usr/bin/ so it *has* to be installed in the global zone
it is just a tool to automate the download process nothing more..
I have also done the same thing when pkg-get doesn't work..

Note Here: pkg-get will also let update a package in place very
easily

Quote:
Now I just need to figure how to actually use PNP4Nagios to my benefit... lol
It generates some nice graphs when you just want an overview..

Quote:
Thanks again for writing this great Guide!
No Problem...
Thanks for all the input..!!

I am going to redo my installation with a few more features and
will post the next guide here..

rk
__________________
All posts sent on ReCycled Electrons...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A Comprehensive Guide to FreeBSD ijk Book reviews 1 29th July 2008 03:53 PM
Nagios 2.12 locks awd FreeBSD Ports and Packages 5 19th June 2008 10:38 AM
Guide for KDE over SSH from Vista ua549 FreeBSD General 13 13th June 2008 07:20 PM
Compiling Nagios 3.02 roundkat Solaris 1 2nd June 2008 09:09 PM
Nagios issue scottro General software and network 5 31st May 2008 10:18 AM


All times are GMT. The time now is 12:32 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick