Monitoring Solaris 10 with NRPE

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
pnnagios
Posts: 47
Joined: Wed Dec 14, 2011 9:48 am

Monitoring Solaris 10 with NRPE

Post by pnnagios »

Hello,

I am having a problem with the Solaris 10 NRPE agent, with an install on an older build of Solaris 10. I am using the NRPE agent, and following the instructions as outlined here:
http://labs.nagios.com/2012/05/25/nagio ... s-and-aix/

The agent installed, but will not run, and reports a library error:

Code: Select all

Server:root@/var/log$ /lib/svc/method/nrpe start
ld.so.1: nrpe: fatal: libc.so.1: version `SUNW_1.22.7' not found (required by file /opt/nagios/bin/nrpe)
 ld.so.1: nrpe: fatal: libc.so.1: open failed: No such file or directory
Killed
The NRPE agent seems to have been built with a newer library. The Solaris version is as follows:

Code: Select all

Server:root@/var/log$ cat /etc/release
                       Solaris 10 5/08 s10s_u5wos_10 SPARC
           Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                              Assembled 24 March 2008
Upgrading the server to a newer version may not be an option, due to vendor applications on the server (currently investigating with the vendor).

What options do I have, as far as obtaining or building a version of the Solaris 10 NRPE agent, that will run on this build of Solaris 10?

Thank you,

Paul
Last edited by pnnagios on Fri May 31, 2013 10:57 am, edited 1 time in total.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Monitoring Solaris 10 with NRPE

Post by abrist »

You could try to compile nrpe from source on one of your services. This can be a frustrating process on solaris systems though. You would probably want to hunt down the newer library and link it to a different location or build that library statically into nrpe.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
pnnagios
Posts: 47
Joined: Wed Dec 14, 2011 9:48 am

Re: Monitoring Solaris 10 with NRPE

Post by pnnagios »

Thank you for the suggestions. While I have experience with UNIX / Linux operating systems, my exposure to Solaris has been rather limited. Which of the suggested options would you recommend, for someone who is not that familiar with the details of Solaris.

Paul
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Monitoring Solaris 10 with NRPE

Post by abrist »

I am not sure what would be the best for you. Lets start by locating these files:

Code: Select all

find / -name libc.so.1
find / -name ld.so.1
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
pnnagios
Posts: 47
Joined: Wed Dec 14, 2011 9:48 am

Re: Monitoring Solaris 10 with NRPE

Post by pnnagios »

Results for find commands:

Code: Select all

TBY-UM-001:root@/$ find / -name libc.so.1
/usr/lib/sparcv9/libc.so.1
/usr/lib/libc.so.1
/lib/sparcv9/libc.so.1
/lib/libc.so.1

TBY-UM-001:root@/$ find / -name ld.so.1
/usr/lib/ld.so.1
/usr/lib/sparcv9/ld.so.1
/etc/lib/ld.so.1
/lib/sparcv9/ld.so.1
/lib/ld.so.1
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Monitoring Solaris 10 with NRPE

Post by abrist »

Alright, and now lets find out where nrpe is looking for those libs:

Code: Select all

ldd /opt/nagios/bin/nrpe
EDIT: is your solaris box 64bit?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
pnnagios
Posts: 47
Joined: Wed Dec 14, 2011 9:48 am

Re: Monitoring Solaris 10 with NRPE

Post by pnnagios »

Results for ldd:

Code: Select all

TBY-UM-001:root@/$ ldd /opt/nagios/bin/nrpe
        libssl.so.0.9.7 =>       /usr/lib/libssl.so.0.9.7
        libcrypto.so.0.9.7 =>    /usr/lib/libcrypto.so.0.9.7
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libc.so.1 (SUNW_1.22.7) =>       (version not found)
        libmp.so.2 =>    /usr/lib/libmp.so.2
        libmd.so.1 =>    /usr/lib/libmd.so.1
        libscf.so.1 =>   /usr/lib/libscf.so.1
        libdoor.so.1 =>  /usr/lib/libdoor.so.1
        libuutil.so.1 =>         /usr/lib/libuutil.so.1
        libgen.so.1 =>   /usr/lib/libgen.so.1
        libssl_extra.so.0.9.7 =>         /usr/sfw/lib/libssl_extra.so.0.9.7
        libcrypto_extra.so.0.9.7 =>      /usr/sfw/lib/libcrypto_extra.so.0.9.7
        libm.so.2 =>     /usr/lib/libm.so.2
        /platform/SUNW,Netra-T5220/lib/libc_psr.so.1
        /platform/SUNW,Netra-T5220/lib/libmd_psr.so.1
Looks like 64 bit:

Code: Select all

TBY-UM-001:root@/$ uname -a
SunOS TBY-UM-001 5.10 Generic_137137-09 sun4v sparc SUNW,Netra-T5220

TBY-UM-001:root@/$ /usr/bin/isainfo -kv
64-bit sparcv9 kernel modules

TBY-UM-001:root@/$ /usr/bin/isainfo -v
64-bit sparcv9 applications
        asi_blk_init vis2 vis
32-bit sparc applications
        asi_blk_init vis2 vis v8plus div32 mul32
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Monitoring Solaris 10 with NRPE

Post by abrist »

This isn't looking good for you. Lets get a little more verbose:

Code: Select all

ls -latr /usr/lib/libc.*
ldd -v /usr/lib/libc.so.1
There is a good chance you will need a vendor patch/update from sun.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
pnnagios
Posts: 47
Joined: Wed Dec 14, 2011 9:48 am

Re: Monitoring Solaris 10 with NRPE

Post by pnnagios »

First command:

Code: Select all

TBY-UM-001:root@/$ ls -latr /usr/lib/libc.*
lrwxrwxrwx   1 root     root          19 Jan 21  2011 /usr/lib/libc.so -> ../../lib/libc.so.1
lrwxrwxrwx   1 root     root          19 Jan 21  2011 /usr/lib/libc.so.1 -> ../../lib/libc.so.1

Second command:

Code: Select all

TBY-UM-001:root@/$ ldd -v /usr/lib/libc.so.1

   object=/usr/lib/libc.so.1; filter for /usr/lib/ld.so.1

   object=/usr/lib/libc.so.1; filter for libm.so.2

   find object=libm.so.2; required by /usr/lib/libc.so.1
        libm.so.2 =>     /usr/lib/libm.so.2

   find object=libc.so.1; required by /usr/lib/libm.so.2
   find version=libc.so.1
        libc.so.1 (SUNW_0.7) =>  /usr/lib/libc.so.1
        libc.so.1 (SUNWprivate_1.1) =>   /usr/lib/libc.so.1

   object=/usr/lib/libc.so.1; filter for /platform/$PLATFORM/lib/libc_psr.so.1

   find object=/platform/SUNW,Netra-T5220/lib/libc_psr.so.1; required by /usr/lib/libc.so.1
        /platform/SUNW,Netra-T5220/lib/libc_psr.so.1
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Monitoring Solaris 10 with NRPE

Post by abrist »

pnnagios wrote: libc.so.1 (SUNW_0.7) => /usr/lib/libc.so.1
Yep, that is what I was afraid of. You will have to get a newer version of that file before you can you use the agent.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked