Nagios is a stable and well regarded open source monitoring suite. NRPE is a Nagios plugin that allows a remote Nagios monitoring server to log into a server and execute a Nagios check. The Nagios check will then return information that is relevant to the service the Nagios monitoring server is monitoring.
To install NRPE on Solaris, i use the blastware.org package. The blastwave.org nrpe package also depends on the nagiosp package which contains the standard nagios plugins. If you havent setup your Solaris box with blastwave.org, instruction are included below.
Copy the blastwave.org package pkg_get.pkg to /tmp/ . You can do this from another server using scp.
# pkgadd -d /tmp/pkg_get.pkg # /opt/csw/bin/pkg-get -i nrpe # wget -P /tmp/ http://rene.bz/wp-content/uploads/solaris/nrpe_smf.zip # cd /tmp # unzip nrpe_smf.zip # mv nrpe/manifest/nagios-nrpe.xml /var/svc/manifest/network # mv nrpe/method/nagios-nrpe /lib/svc/method/nagios-nrpe # svccfg import /var/svc/manifest/network/nagios-nrpe.xml # svcadm disable nrpe # svcadm enable nrpe
To check if nrpe is working you should see the following
# svcs | grep nrpe
online May_29 svc:/network/nagios/nrpe:default
# netstat -a | grep 5666
*.5666 *.* 0 0 49152 0 LISTEN
If svcs doesnt show the service as online, you can check the SMF log file /var/svc/log/network-nagios-nrpe:default.log.
If things still arent working, execute /lib/svc/method/nagios-nrpe manually with some bourne debugging. This will show you what the nagios-nrpe script is trying to do.
# sh -x /lib/svc/method/nagios-nrpe









