How to install nagios client and plugins in solaris 10

How to install nagios client in Solaris 10 and NRPE Plugings


1.- Download the Nagios Client Installer


You can download the nagios client for solaris 10 from exchange.nagios.org, previously you need to have connection from the server to internet

#wget assets.nagios.com/downloads/nagiosxi/agents/solaris-nrpe-agent.tar.gz  (Only if you have installed the wget package)

2.- If you do not have connection, please download in your machine and upload it to the server as below


#scp -pr solaris-nrpe-agent.tar.gz   root@india:/var/tmp
Password:
solaris-nrpe-agent.t 100% |**************************************************************************************************************************************************|  4202 KB    00:00

Once you uploaded the package, connect with ssh to the server, plesase uncompress the information in order to execute the install program

2.- Execute the fullinstall script in order to begin the installation


root@india:/var/tmp#gunzip solaris-nrpe-agent.tar.gz
root@india:/var/tmp# tar -xvf solaris-nrpe-agent.tar
x solaris-nrpe-agent, 0 bytes, 0 tape blocks
x solaris-nrpe-agent/nagios-plugins-1.4.16-sol10-sparc-local, 5022208 bytes, 9809 tape blocks
x solaris-nrpe-agent/nrpe-2.14-sol10-sparc-local, 184832 bytes, 361 tape blocks
x solaris-nrpe-agent/subcomponents, 0 bytes, 0 tape blocks
x solaris-nrpe-agent/subcomponents/extraplugins, 0 bytes, 0 tape blocks
x solaris-nrpe-agent/subcomponents/extraplugins/plugins, 0 bytes, 0 tape blocks
x solaris-nrpe-agent/subcomponents/extraplugins/plugins/check_swap.pl, 8438 bytes, 17 tape blocks
x solaris-nrpe-agent/subcomponents/extraplugins/plugins/custom_check_mem, 4076 bytes, 8 tape blocks
x solaris-nrpe-agent/subcomponents/extraplugins/plugins/custom_check_procs, 3937 bytes, 8 tape blocks
x solaris-nrpe-agent/subcomponents/extraplugins/plugins/check_init_service, 920 bytes, 2 tape blocks
x solaris-nrpe-agent/subcomponents/extraplugins/plugins/check_asterisk_sip_peers.sh, 1978 bytes, 4 tape blocks
x solaris-nrpe-agent/subcomponents/extraplugins/plugins/check_asterisk.pl, 6897 bytes, 14 tape blocks
x solaris-nrpe-agent/subcomponents/extraplugins/plugins/check_open_files.pl, 7170 bytes, 15 tape blocks
x solaris-nrpe-agent/subcomponents/extraplugins/plugins/check_sip, 7599 bytes, 15 tape blocks
x solaris-nrpe-agent/subcomponents/extraplugins/plugins/check_netstat.pl, 30594 bytes, 60 tape blocks
x solaris-nrpe-agent/subcomponents/extraplugins/plugins/check_cpu_stats.sh, 13557 bytes, 27 tape blocks
x solaris-nrpe-agent/subcomponents/extraplugins/nagisk, 0 bytes, 0 tape blocks
x solaris-nrpe-agent/subcomponents/extraplugins/nagisk/nagisk.pl, 4176 bytes, 9 tape blocks
x solaris-nrpe-agent/subcomponents/extraplugins/nagisk/README, 568 bytes, 2 tape blocks
x solaris-nrpe-agent/subcomponents/extraplugins/nagisk-1.1.1.tgz, 1630 bytes, 4 tape blocks
x solaris-nrpe-agent/subcomponents/extraplugins/install, 191 bytes, 1 tape blocks
x solaris-nrpe-agent/subcomponents/install, 281 bytes, 1 tape blocks
x solaris-nrpe-agent/top-3.6.1-sol10-x86-local, 238592 bytes, 466 tape blocks
x solaris-nrpe-agent/3-nrpe, 3469 bytes, 7 tape blocks
x solaris-nrpe-agent/fullinstall, 2094 bytes, 5 tape blocks
x solaris-nrpe-agent/nrpe-2.14-sol10-i386-local, 172032 bytes, 336 tape blocks
x solaris-nrpe-agent/1-usersgroups, 1117 bytes, 3 tape blocks
x solaris-nrpe-agent/nrpe, 0 bytes, 0 tape blocks
x solaris-nrpe-agent/nrpe/mods, 0 bytes, 0 tape blocks
x solaris-nrpe-agent/nrpe/mods/cfg, 0 bytes, 0 tape blocks
x solaris-nrpe-agent/nrpe/mods/cfg/nrpe, 0 bytes, 0 tape blocks
x solaris-nrpe-agent/nrpe/mods/cfg/nrpe/common.cfg, 1040 bytes, 3 tape blocks
x solaris-nrpe-agent/nrpe/mods/cfg/nrpe.cfg, 7323 bytes, 15 tape blocks
x solaris-nrpe-agent/init.sh, 3095 bytes, 7 tape blocks
x solaris-nrpe-agent/0-prereqs, 1115 bytes, 3 tape blocks
x solaris-nrpe-agent/2-plugins, 211 bytes, 1 tape blocks
x solaris-nrpe-agent/top-3.6.1-sol10-sparc-local, 242688 bytes, 474 tape blocks
x solaris-nrpe-agent/A-subcomponents, 230 bytes, 1 tape blocks
x solaris-nrpe-agent/nagios-plugins-1.4.16-sol10-i386-local, 3993600 bytes, 7800 tape blocks



root@india:/var/tmp:/var/tmp# cd solaris-nrpe-agent
root@india:/var/tmp:/var/tmp/solaris-nrpe-agent# ls -ltr fullinstall
-rwxrwxr-x   1 root    root       2094 Jul 13  2012 fullinstall

root@india:/var/tmp:/var/tmp/solaris-nrpe-agent# ./fullinstall


=================================
Nagios XI Solaris Agent Installer
=================================

This script will do a complete install of the Nagios XI
Solaris agent by executing all necessary sub-scripts.
IMPORTANT: This script should only be used on a Solaris
           system.  Do NOT use this on a system running
               any other operating system.
Do you want to continue? [Y/n] y
Proceeding with installation...
Current step is 0-prereqs
Running './0-prereqs'...
top found
RESULT=$(cat .fail-2775 2>/dev/null || echo 0)
0-prereqs appears to have already completed successfully. Moving on to the next step.
Current step is 1-usersgroups
Running './1-usersgroups'...
Group nagios does not exist. Creating...
User nagios does not exist. Creating...
RESULT=$(cat .fail-2775 2>/dev/null || echo 0)
1-usersgroups appears to have already completed successfully. Moving on to the next step.
Current step is 2-plugins
Running './2-plugins'...
Attempting to install NGOSplugin from nagios-plugins-1.4.16-sol10-sparc-local
Processing package instance <NGOSplugin> from </var/tmp/solaris-nrpe-agent/nagios-plugins-1.4.16-sol10-sparc-local>
## Installing package <NGOSplugin> in global zone
nagios-plugins(sparc) 1.4.16,REV=2012.07.06.16.54
Nagios Plugin Development Team
Using </> as the package base directory.
## Processing package information.
## Processing system information.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.
The following files are being installed with setuid and/or setgid
permissions:
  /opt/nagios/libexec/pst3 <setuid root>
Do you want to install these as setuid/setgid files [y,n,?,q] y
This package contains scripts which will be executed with super-user
permission during the process of installing this package.
Do you want to continue with the installation of <NGOSplugin> [y,n,?] y
Installing nagios-plugins as <NGOSplugin>
## Executing preinstall script.
## Installing part 1 of 1.
/opt/nagios/lib/charset.alias
/opt/nagios/libexec/check_apt
/opt/nagios/libexec/check_breeze
/opt/nagios/libexec/check_by_ssh
/opt/nagios/libexec/check_clamd <symbolic link>
/opt/nagios/libexec/check_cluster
/opt/nagios/libexec/check_dig
/opt/nagios/libexec/check_disk
/opt/nagios/libexec/check_disk_smb
/opt/nagios/libexec/check_dns
/opt/nagios/libexec/check_dummy
/opt/nagios/libexec/check_file_age
/opt/nagios/libexec/check_flexlm
/opt/nagios/libexec/check_ftp <symbolic link>
/opt/nagios/libexec/check_hpjd
/opt/nagios/libexec/check_http
/opt/nagios/libexec/check_ifoperstatus
/opt/nagios/libexec/check_ifstatus
/opt/nagios/libexec/check_imap <symbolic link>
/opt/nagios/libexec/check_ircd
/opt/nagios/libexec/check_jabber <symbolic link>
/opt/nagios/libexec/check_load
/opt/nagios/libexec/check_log
/opt/nagios/libexec/check_mailq
/opt/nagios/libexec/check_mrtg
/opt/nagios/libexec/check_mrtgtraf
/opt/nagios/libexec/check_mysql
/opt/nagios/libexec/check_mysql_query
/opt/nagios/libexec/check_nagios
/opt/nagios/libexec/check_nntp <symbolic link>
/opt/nagios/libexec/check_nntps <symbolic link>
/opt/nagios/libexec/check_nt
/opt/nagios/libexec/check_ntp
/opt/nagios/libexec/check_ntp_peer
/opt/nagios/libexec/check_ntp_time
/opt/nagios/libexec/check_nwstat
/opt/nagios/libexec/check_oracle
/opt/nagios/libexec/check_overcr
/opt/nagios/libexec/check_pgsql
/opt/nagios/libexec/check_ping
/opt/nagios/libexec/check_pop <symbolic link>
/opt/nagios/libexec/check_procs
/opt/nagios/libexec/check_real
/opt/nagios/libexec/check_rpc
/opt/nagios/libexec/check_sensors
/opt/nagios/libexec/check_simap <symbolic link>
/opt/nagios/libexec/check_smtp
/opt/nagios/libexec/check_snmp
/opt/nagios/libexec/check_spop <symbolic link>
/opt/nagios/libexec/check_ssh
/opt/nagios/libexec/check_ssmtp <symbolic link>
/opt/nagios/libexec/check_tcp
/opt/nagios/libexec/check_time
/opt/nagios/libexec/check_udp <symbolic link>
/opt/nagios/libexec/check_ups
/opt/nagios/libexec/check_users
/opt/nagios/libexec/check_wave
/opt/nagios/libexec/negate
/opt/nagios/libexec/pst3
/opt/nagios/libexec/urlize
/opt/nagios/libexec/utils.pm
/opt/nagios/libexec/utils.sh
[ verifying class <none> ]
Installation of <NGOSplugin> was successful.
RESULT=$(cat .fail-2775 2>/dev/null || echo 0)
2-plugins appears to have already completed successfully. Moving on to the next step.
Current step is 3-nrpe
Running './3-nrpe'...
Attempting to install NGOSnrpe from nrpe-2.14-sol10-sparc-local
Processing package instance <NGOSnrpe> from </var/tmp/solaris-nrpe-agent/nrpe-2.14-sol10-sparc-local>
## Installing package <NGOSnrpe> in global zone
Nagios Remote Plugin Executor 2.14(sparc) 2.14
## Processing package information.
## Processing system information.
   1 package pathname is already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.
This package contains scripts which will be executed with super-user
permission during the process of installing this package.
Do you want to continue with the installation of <NGOSnrpe> [y,n,?] y
Processing package instance <NGOSnrpe> from </var/tmp/solaris-nrpe-agent/nrpe-2.14-sol10-sparc-local>
## Installing package <NGOSnrpe> in global zone
Nagios Remote Plugin Executor 2.14(sparc) 2.14
## Processing package information.
## Processing system information.
   1 package pathname is already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.
This package contains scripts which will be executed with super-user
permission during the process of installing this package.
Do you want to continue with the installation of <NGOSnrpe> [y,n,?] y
Installing Nagios Remote Plugin Executor 2.14 as <NGOSnrpe>
## Executing preinstall script.
All source code, binaries, documentation, and information contained
in this distribution are provided AS IS with NO WARRANTY OF ANY KIND,
INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY, AND FITNESS FOR
A PARTICULAR PURPOSE.
Nagios and the Nagios logo are registered trademarks of Nagios Enterprises.
All other trademarks, servicemarks, registered trademarks, and
registered servicemarks are the property of their respective owner(s).
## Installing part 1 of 1.
/lib/svc/method/nrpe
/opt/nagios/bin/nrpe
/opt/nagios/libexec/check_nrpe
[ verifying class <none> ]
[ verifying class <config> ]
[ verifying class <manifest> ]
Installation of <NGOSnrpe> was successful.
The configuration file /etc/nagios/nrpe.cfg already exists.
Do you want to replace it [y/N]? y
/etc/nagios/nrpe.cfg saved as /etc/nagios/nrpe.cfg.save

################################################################################
###                                                                          ###
### NRPE is currently set to allow connections only from these IP addresses: ###
###                                                                          ###
### 127.0.0.1                                                                ###
###                                                                          ###
### If you would like to change this list, enter all IP addresses to allow,  ###
### separated by commas only, and then press Enter.                          ###
### (Put the address(es) of your Nagios XI servers(s) here.)                 ###
###                                                                          ###
### If you would like to leave the list as is, simply press enter            ###
###                                                                          ###
################################################################################
Allow from:  10.1.1.23        <-----------------ADD THE IP ADDRESS OF NAGIOS SERVER(s)
RESULT=$(cat .fail-2775 2>/dev/null || echo 0)
3-nrpe appears to have already completed successfully. Moving on to the next step.
Current step is A-subcomponents
Running './A-subcomponents'...
SUB
INSTALLING EXTRA PLUGINS...
real        0.1
user        0.0
sys         0.0
RESULT=$(cat .fail-2775 2>/dev/null || echo 0)
A-subcomponents appears to have already completed successfully. Moving on to the next step.

################################################################################
###                                                                          ###
###    Nagios XI Solaris Agent Installation Complete!                        ###
###                                                                          ###
################################################################################

If you experience any problems, please attach the file logs-all-steps-20151001-144321.tar.gz that was just created to any support requests.
After finish the script installation you can configure the server in the Nagios Server.

3.-In the process installation, you created nagios user and group and if you have zones, the packages was replicated to them.


4.-In other hand you can check the configuration in the /etc/nagios/nrpe.cfg, you need to be sure that the following values are OK


Arguments commented and dont_blame in "1"

dont_blame_nrpe=1

#command[check_users]=/opt/nagios/libexec/check_users -w 5 -c 10
#command[check_load]=/opt/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
#command[check_hda1]=/opt/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1
#command[check_zombie_procs]=/opt/nagios/libexec/check_procs -w 5 -c 10 -s Z
#command[check_total_procs]=/opt/nagios/libexec/check_procs -w 150 -c 200


# The following examples allow user-supplied arguments and can
# only be used if the NRPE daemon was compiled with support for
# command arguments *AND* the dont_blame_nrpe directive in this
# config file is set to '1'.  This poses a potential security risk, so
# make sure you read the SECURITY file before doing this.
#command[check_users]=/opt/nagios/libexec/check_users -w $ARG1$ -c $ARG2$
#command[check_load]=/opt/nagios/libexec/check_load -w $ARG1$ -c $ARG2$
#command[check_disk]=/opt/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
#command[check_procs]=/opt/nagios/libexec/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$



If you have issues in the zones I would recommend to install the pluging only in the zones and you need to be sure about "dont_blame_nrpe value in 1 and arguments in red above", finally you can copy if you want the nrpe.cfg that is located in the global zone to the zones to avoid modify manually those values.

Regards
Roger

Comments