Awk – Rename files to Lower or Upper Case.

root@donkey:/tmp#
for file in $(ls -la ./ | awk '{print $8}'); do
mv $file $( echo $file | awk '{print tolower($0)}');
done;

root@donkey:/tmp# ls
keyring-hs5u3c mozilla-media-cache mu3gbhjz muszpyya orbit-jjest orbit-root virtual-root.mvfgzj

root@donkey:/tmp#
for file in $(ls -la ./ | awk '{print $8}');
do mv $file $( echo $file | awk '{print toupper($0)}');
done;

mv: `.’ and `./.’ are the same file
mv: cannot remove `..’: Is a directory

root@donkey:/tmp# ls
KEYRING-HS5U3C MOZILLA-MEDIA-CACHE MU3GBHJZ MUSZPYYA ORBIT-JJEST ORBIT-ROOT VIRTUAL-ROOT.MVFGZJ

trailer film The Lobster 2015

Linux Network Adapter Bonding

Before you begin take a backup copy of the following files in case you have to set them back to a working state.

/etc/sysconfig/network-scripts/ifcfg-eth1
/etc/sysconfig/network-scripts/ifcfg-eth2
/etc/modprobe.conf

Create a new file /etc/sysconfig/network-scripts/ifcfg-bond0 and add the following to it, using your own ip addresses

DEVICE=bond0
IPADDR=x.x.x.x
NETWORK=y.y.y.y
NETMASK=z.z.z.z
USERCTL=no
BOOTPROTO=none
ONBOOT=yes

Modify your /etc/sysconfig/network-scripts/ifcfg-eth1 file and change it to

DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

Also modify your /etc/sysconfig/network-scripts/ifcfg-eth2 file and change it to

DEVICE=eth2
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

Save all of these files.

Add the following lines to the end of /etc/modprobe.conf

alias bond0 bonding
options bond0 mode=0 miimon=1000

Make sure the bonding module is loaded with

modprobe bonding

Then restart the network service

service network resart

You should now see the bond0 nic listed if you run and ifconfig from the command line. Test with less /proc/net/bonding/bond0

Source:

http://itfixed.blogspot.com/2009/02/itfixed-it-for-me-nic-bonding-on-linux.html

http://www.cyberciti.biz/tips/linux-bond-or-team-multiple-network-interfaces-nic-into-single-interface.html

RHEL 5/6 – Dell OMSA (omreport) Install

INSTALL on RHEL6

1.Archive to use for RHEL6.

[root@lange ~]# scp monk:/root/scripts/OM-*6.5* .
OM-SrvAdmin-Dell-Web-LX-6.5.0-2247.RHEL6.x86_64_A01.5.tar.gz 100% 105MB 35.0MB/s 00:03

2.Required libraries are in yum repo.

yum install sblim-sfcb sblim-sfcc opensman-server opensman-client

3.Run ./srvadmin-install.sh –express

INSTALL on RHEL 5

[root@lange ~]# wget -q -O – http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash

INSTALL SRVADMIN TOOLS

[root@lange ~]# yum install srvadmin-all

START THE SERVICE

[root@lange srvadmin]# bash /opt/dell/srvadmin/sbin/srvadmin-services.sh start
Starting Systems Management Device Drivers:
Starting dell_rbu: [ OK ]
Starting ipmi driver: Already started [ OK ]
Starting Systems Management Data Engine:
Starting dsm_sa_datamgrd: [ OK ]
Starting dsm_sa_eventmgrd: [ OK ]
Starting dsm_sa_snmpd: [ OK ]
Starting DSM SA Shared Services: [ OK ]

Starting DSM SA Connection Service: [ OK ]

canadian pharmacy Karela 1 pc

SVN Linux Setup

SVN GUID TO UPDATING RSYNC SCRIPT
-sync repository

$ svn update

-edit files in /root/svn/

-commit changes to repository

[root@jackson svn]# svn commit -m ‘added header publisher notes’
Sending jackson_rsync.py
Transmitting file data .
Committed revision 4.

-copy to live destination

[root@jackson svn]# svnlive
building file list … done
jackson_rsync.py

sent 4532 bytes received 42 bytes 9148.00 bytes/sec
total size is 4427 speedup is 0.97

-SVN local file and production file are now the same version.

[root@jackson svn]# diff /root/svn/jackson_rsync.py /usr/local/jackson_rsync.py

CHECK CHANGES BETWEEN REVISIONS FOR SINGLE FILE

[root@donuts svn]# svn -r 1:6 diff ngs_archive.py
Index: ngs_archive.py
===================================================================
— ngs_archive.py (revision 1)
+++ ngs_archive.py (revision 6)
@@ -40,8 +40,7 @@

#globals vars
-#source_dest_path={‘/vol20/ngsData/runs/’:’/vol20-backup/’,’/vol10/ngsData/runs/’:’/vol10-backup/’}
-source_dest_path={‘/vol20/ngsData/runs/’:’/vol05/ngsBackup/’,’/vol10/ngsData/runs/’:’/vol05/ngsBackup/’}
+source_dest_path={‘/vol10/ngsData/runs/’:’/vol05/ngsBackup/’}
run_type=”
backup_file=”
disk_space_threshold=100 #max percent full before script will delete old archives.

VIEW CHANGE LOG FOR FILE

[root@donuts svn]# svn log ngs_archive.py
————————————————————————
r6 | jjest | 2011-07-06 10:51:08 -0700 (Wed, 06 Jul 2011) | 1 line

altered source path
————————————————————————
r1 | root | 2011-06-29 13:54:47 -0700 (Wed, 29 Jun 2011) | 1 line

SVN HOWTO GUID

[root@monk ~]# svnadmin create /root/svn
[root@monk ~]# vi /root/svn/
conf/ db/ format hooks/ locks/ README.txt
[root@monk ~]# vi /root/svn/
conf/ db/ format hooks/ locks/ README.txt
[root@monk ~]# vi /root/svn/conf/svnserve.conf
[root@monk ~]# vi /root/svn/conf/passwd
[root@monk ~]# svn import /root/scripts file:///root/svn/scripts
svn: Could not use external editor to fetch log message; consider setting the $SVN_EDITOR environment variable or using the –message (-m) or –file (-ns
svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set, and no ‘editor-cmd’ run-time configuration option was found
[root@monk ~]# echo $EDITOR

[root@monk ~]# echo EDITOR
EDITOR
[root@monk ~]# $EDITOR=/bin/vi
-bash: =/bin/vi: No such file or directory
[root@monk ~]# which vi
alias vi=’vim’
/usr/bin/vim
[root@monk ~]# $EDITOR=/usr/bin/vim
-bash: =/usr/bin/vim: No such file or directory
[root@monk ~]# $EDITOR=’/usr/bin/vim’
-bash: =/usr/bin/vim: No such file or directory
[root@monk ~]# SVN_EDITOR=’/usr/bin/vim’
[root@monk ~]# echo $SVN_EDITOR
/usr/bin/vim
[root@monk ~]# svn import /root/scripts file:///root/svn/scripts
svn: Could not use external editor to fetch log message; consider setting the $SVN_EDITOR environment variable or using the –message (-m) or –file (-ns
svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set, and no ‘editor-cmd’ run-time configuration option was found
[root@monk ~]# export SVN_EDITOR
[root@monk ~]# svn import /root/scripts file:///root/svn/scripts

Log message unchanged or not specified
(a)bort, (c)ontinue, (e)dit:
c
Adding /root/scripts/ngs_archive.py
Adding (bin) /root/scripts/OM-SrvAdmin-Dell-Web-LX-6.5.0-2247_A01.15.tar
Adding /root/scripts/managelinks.py
Adding /root/scripts/.bashrc
Adding /root/scripts/lab_pc_backup_script.py
Adding /root/scripts/10.200.80.148
Adding /root/scripts/configScript.py
Adding /root/scripts/check_perc_fw
Adding /root/scripts/server-stats-path.py
Adding (bin) /root/scripts/VMwareTools-4.0.0-236512.tar.gz
Adding /root/scripts/check_bacula
Adding /root/scripts/drvault_rsync.py
Adding /root/scripts/scp-scripts-old
Adding /root/scripts/scp-scripts-old/scp_nrpe.py
Adding /root/scripts/scp-scripts-old/scp_check_perc.py
Adding /root/scripts/scp-scripts-old/scp_auth_keys.py
Adding /root/scripts/server-stats.py
Adding (bin) /root/scripts/OM-SrvAdmin-Dell-Web-LX-6.5.0-2247.RHEL6.x86_64_A01.5.tar.gz
Adding /root/scripts/vol20_backup-dev.py
Adding /root/scripts/biovault_rsync.py
Adding (bin) /root/scripts/LIVEServer-5.0-124.rhel4.i386.rpm
Adding /root/scripts/jackson_rsync.py
Adding /root/scripts/yum.conf
Adding /root/scripts/check_uptime
Adding /root/scripts/check_bandwidth
Adding /root/scripts/bashrc
Adding /root/scripts/nrpe.cfg
Adding /root/scripts/check_lab_backups
Adding /root/scripts/drvault-fw.sh
Adding t/scripts/check_omreport
Adding /root/scripts/check_memory
Adding /root/scripts/jacksonFstab
Adding /root/scripts/bacula_label_tapes.py
Adding (bin) /root/scripts/barracuda-ysb-8.9.01.60604-lin.tgz
Adding /root/scripts/scp_file.py
Adding /root/scripts/bv-mdadm.conf
Adding /root/scripts/vol20_backup.py
Adding (bin) /root/scripts/OM-MgmtStat-Dell-Web-LX-6.4.0-1401_A01.tar.gz
Adding /root/scripts/check_mdadm
Adding /root/scripts/check_cpu
Adding /root/scripts/addNewUserGroup.sh
Adding /root/scripts/check_124t
Adding /root/scripts/check_ipmi
Adding (bin) /root/scripts/LIVEServer-5.0-110.rhel5.x86_64.rpm
Adding /root/scripts/nrpe-restart.sh
Adding /root/scripts/profile
Adding /root/scripts/check_oracle
Adding /root/scripts/yum-update.sh
….

start svn as daemon

[root@monk ~]# svnserve -d
[root@monk ~]# ps -ef | grep svnserve
root 13568 1 0 14:01 ? 00:00:00 svnserve -d
root 13570 11352 0 14:01 pts/3 00:00:00 grep svnserve

from client

[root@jackson svn]# svn list svn://monk/root/svn/
scripts/

checkout

[root@jackson ~]# mkdir svn
[root@jackson ~]# svn co svn://monk/root/svn/scripts/ ./svn/
A svn/ngs_archive.py
A svn/.bashrc

commite changes

[root@jackson ~]# svn commit -m ‘remove bin files’ ./svn
Authentication realm: 0cffdcf6-4895-4db7-98f9-fe71682a2229
Password for ‘jjest’:

———————————————————————–
ATTENTION! Your password for authentication realm:

0cffdcf6-4895-4db7-98f9-fe71682a2229

can only be stored to disk unencrypted! You are advised to configure
your system so that Subversion can store passwords encrypted, if
possible. See the documentation for details.

You can avoid future appearances of this warning by setting the value
of the ‘store-plaintext-passwords’ option to either ‘yes’ or ‘no’ in
‘/root/.subversion/servers’.
———————————————————————–
Store password unencrypted (yes/no)? yes
Deleting svn/LIVEServer-5.0-110.rhel5.x86_64.rpm
Deleting svn/LIVEServer-5.0-124.rhel4.i386.rpm
Deleting svn/OM-MgmtStat-Dell-Web-LX-6.4.0-1401_A01.tar.gz
Deleting svn/OM-SrvAdmin-Dell-Web-LX-6.5.0-2247.RHEL6.x86_64_A01.5.tar.gz
Deleting svn/OM-SrvAdmin-Dell-Web-LX-6.5.0-2247_A01.15.tar
Deleting svn/OMI-SrvAdmin-Dell-Web-LX-620-677.rhel5.tar
Deleting svn/VMwareTools-4.0.0-236512.tar.gz
Deleting svn/barracuda-ysb-8.9.01.60604-lin.tgz
Deleting svn/nagios-server-backup-1-31-11.tar
Deleting svn/zlib-1.2.5.tar.gz
Committed revision 2.

ref: http://www.tonyspencer.com/2007/03/02/setup-a-subversion-server-in-4-minutes/

OS Install on RAID 1 (grub setup_

Installing Grub onto both MBRs
Since the /boot partition is a RAID, grub cannot read it to get the bootloader. It can only access physical drives. Thus, you still use (hd0,0) in this step.

Run grub:

shaggy# grub
You must see GRUB prompt:

grub>

If you are using a RAID 1 mirror disk system, you will want to install grub on all the disks in the system, so that when one disk fails, you are still able to boot. The find command above will list the disks, e.g.

grub> find /boot/grub/stage1
(hd0,0)
(hd1,0)
grub>
Now, if your disks are /dev/sda and /dev/sdb, do the following to install GRUB on /dev/sda MBR:

device (hd0) /dev/sda
root (hd0,0)
setup (hd0)

This will install grub into the /dev/sdb MBR:

device (hd0) /dev/sdb
root (hd0,0)
setup (hd0)

The device command tells grub to assume the drive is (hd0), i.e. the first disk in the system, when it is not necessarily the case. If your first disk fails, however, your second disk will then be the first disk in the system, and so the MBR will be correct.

The grub.conf does change from the normal install. The difference is in the specified root drive, it is now a RAID drive and no longer a physical drive.For example it would look like:

original: http://www.linuxquestions.org/questions/linux-software-2/installing-rhel-5-w-software-raid-1-a-646939/

Nagios Source Install (RHEL)

Installing nagios from source on RHEL.

Requirements:

yum install gcc php httpd zlib gd openssl-devel

Install Server

[root@james nagios]# wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.1.tar.gz

Configure Server

[root@james nagios-3.2.1]# ./configure –prefix /usr/local/nagios –with-cgiurl=/nagios/cgi-bin –with-nagios-user=nagios
–with-nagios-group=nagios –with-command-group=nagcmd

***TO ENABLE CGI MAP PICTORIAL DO THE FOLLOWING****

-make cgis
-make install-cgis

****************************************************************

[root@james nagios-3.2.1]# make all

[root@james nagios-3.2.1]# make install

[root@james nagios-3.2.1]# make install-init
/usr/bin/install -c -m 755 -d -o root -g root /etc/rc.d/init.d
/usr/bin/install -c -m 755 -o root -g root daemon-init /etc/rc.d/init.d/nagios

*** Init script installed ***

Files with be install in the –prefix path (/usr/loca/nagios)

[root@james nagios]# ls
bin libexec sbin share var

*set cgi.cfg to not use authentication or will not be able to access http files.

[root@james nagios]# grep “use_authentication” etc/cgi.cfg
use_authentication=0

Create sample config files

[root@james nagios-3.2.1]# make install-config
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/etc
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/etc/objects
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/nagios.cfg /usr/local/nagios/etc/nagios.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/cgi.cfg /usr/local/nagios/etc/cgi.cfg
/usr/bin/install -c -b -m 660 -o nagios -g nagios sample-config/resource.cfg /usr/local/nagios/etc/resource.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/templates.cfg /usr/local/nagios/etc/objects/templates.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/commands.cfg /usr/local/nagios/etc/objects/commands.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/contacts.cfg /usr/local/nagios/etc/objects/contacts.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/timeperiods.cfg /usr/local/nagios/etc/objects/timeperiods.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/localhost.cfg /usr/local/nagios/etc/objects/localhost.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/windows.cfg /usr/local/nagios/etc/objects/windows.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/printer.cfg /usr/local/nagios/etc/objects/printer.cfg
/usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/switch.cfg /usr/local/nagios/etc/objects/switch.cfg

*** Config files installed ***

Remember, these are *SAMPLE* config files. You’ll need to read
the documentation for more information on how to actually define
services, hosts, etc. to fit your particular needs.

Create +RW dir

mkdir /usr/local/nagios/var/rw
[root@james var]# chown nagios:nagios rw

Install Nagios (NRPE) Client

Step 1:

requirements:

RHEL:
yum install net-snmp-utils net-snmp-perl net-snmp gcc openssl-devel gcc-c++

*IPtables should be turned off or apply port exception!

*may need to disable exclude=kernel* line in /etc/yum.conf to install kernel-headers for gcc-c++

ubuntu:
apt-get install libssl-dev

client:

[root@james nagios]# wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.15.tar.gz

Uncompress
tar -xvf nagios-plugins-1.4.15.tar.gz

Build Package
[root@james nagios-plugins-1.4.15]# ./configure –prefix=/usr/local/nrpe –with-openssl=/usr/bin/openssl

*note make sure that output includes ssl support!

–with-apt-get-command:
–with-ping6-command: /bin/ping6 -n -U -w %d -c %d %s
–with-ping-command: /bin/ping -n -U -w %d -c %d %s
–with-ipv6: yes
–with-mysql: no
–with-openssl: yes
–with-gnutls: no
–enable-extra-opts: no
–with-perl: /usr/bin/perl
–enable-perl-modules: no
–with-cgiurl: /nagios/cgi-bin
–with-trusted-path: /bin:/sbin:/usr/bin:/usr/sbin
–enable-libtap: no

[root@james nagios-plugins-1.4.15] make

[root@james nagios-plugins-1.4.15]#make install

[root@james nagios-plugins-1.4.15]#make install-root

Verify all plugins are available….

[root@james libexec]# ls /usr/local/nrpe/libexec/
check_apt check_disk check_http check_load check_nt check_ping check_ssh check_wave utils.sh
check_breeze check_disk_smb check_icmp check_log check_ntp check_pop check_swap include
check_by_ssh check_dns check_ide_smart check_mailq check_ntp_peer check_procs check_tcp libexec
check_clamd check_dummy check_ifoperstatus check_mrtg check_ntp_time check_real check_time negate
check_cluster check_file_age check_ifstatus check_mrtgtraf check_nwstat check_rpc check_udp share
check_dhcp check_flexlm check_imap check_nagios check_oracle check_sensors check_ups urlize
check_dig check_ftp check_ircd check_nntp check_overcr check_smtp check_users utils.pm

Step 2:

Build NRPE binary and check_nrpe

download:

# wget http://prdownloads.sourceforge.net/sourceforge/nagios/nrpe-2.12.tar.gz
# tar -xzf nrpe-2.12.tar.gz
# cd nrpe-2.12
#./configure

*** Configuration summary for nrpe 2.12 03-10-2008 ***:

General Options:
————————-
NRPE port: 5666
NRPE user: nagios
NRPE group: nagios
Nagios user: nagios
Nagios group: nagios

Review the options above for accuracy. If they look okay,
type ‘make all’ to compile the NRPE daemon and client.

[root@magruber]# make
[root@magruber]# make all

Move check_nrpe plugin to plugins dir on nagios master server (not client

[root@magruber]# cp ./src/check_nrpe /usr/local/nrpe/libexec/
[root@magruber]# ls /usr/local/nrpe/libexec | grep check_nrpe
check_nrpe

Copy NRPE dameon

cp ./src/nrpe /usr/local/nrpe/

Nrpe.cfg file

scp monk:/root/scripts/nrpe.cfg /usr/local/nrpe/

Copy CHECK_* custom scripts

[root@shaggy nrpe-2.12]# scp monk:/root/scripts/check_* /usr/local/nrpe/libexec/
root@monk’s password:
check_ipmi 100% 489 0.5KB/s 00:00
check_lab_backups 100% 574 0.6KB/s 00:00
check_mdadm 100% 252 0.3KB/s 00:00
check_omreport 100% 1410 1.4KB/s 00:00
check_oracle 100% 8326 8.1KB/s 00:00
check_uptime 100% 108 0.1KB/s 00:00

*check_memory script won’t run unless /etc/sudoers contains the following line!

nagios ALL=(ALL) NOPASSWD: /usr/local/nrpe/libexec/

Add nrpe to startup

scp stone:/etc/init.d/nrpe /etc/init.d/
[root@shaggy nrpe-2.12]# chkconfig –add nrpe
[root@shaggy nrpe-2.12]# chkconfig –level 345 nrpe on
[root@shaggy nrpe-2.12]# chkconfig –list nrpe
nrpe 0:off 1:off 2:on 3:on 4:on 5:on 6:off

Nrpe Init Script

####

Edit nrpe.cfg

#change from localhost to master nagios server.
allowed_hosts=10.200.50.100

Make sure paths match for plugins. In this example you will need to change /usr/local/nagios/ to /usr/local/nrpe.

Start nrpe and verify is started.

[root@scrappy nrpe]# ./nrpe -d /usr/local/nrpe/nrpe.cfg
[root@scrappy nrpe]# ps -ef | grep nrpe
4294967295 3899 1 0 12:46 ? 00:00:00 ./nrpe -d /usr/local/nrpe/nrpe.cfg
root 3901 3866 0 12:46 pts/2 00:00:00 grep nrpe

Verify can access from nagios server.

[root@james libexec]# /usr/local/nagios/libexec/check_nrpe -H scrappy
NRPE v2.12

define hostgroup{
hostgroup_name ssh-servers ; The name of the hostgroup
alias ssh-servers ; Long name of the group
members magnum,monk,kojak,quincy,stone,baretta,macgruber,marion,donuts,coffee,scrappy ;
}

Restart nagios

root@james objects]# /etc/init.d/nagios restart
Running configuration check…done.
Stopping nagios: .done.
Starting nagios: done.

NRPE Scripts that required SUDO Privileges.

On the remote servers:

1. Move the script to /usr/local/nrpe/libexec/ – the script should have the sudo command before ethtool
2. Vi /usr/local/nrpe/nrpe.cfg and include the line: “command[check_link_speed]=sudo /usr/local/nrpe/libexec/check_link_speed”
3. Visudo and
a. Comment out this line: “Defaults requiretty”
b. Add this line: “nagios ALL=(ALL) NOPASSWD:/usr/local/nrpe/libexec/check_link_speed”
4. Restart nrpe and it should work.

Nagios Dell custom plugin scripts

IPMI Tool

scp stone:/usr/local/nrpe/libexec/check_ipmi /usr/local/nrpe/libexec #requires ipmitools

yum install ipmitool

-add to crontab
[root@quincy ~]# crontab -u root -l
*/10 * * * * /usr/bin/ipmitool sdr > /tmp/ipmi-out.txt

Then run check_ipmi script to check

[root@donuts ~]# /usr/local/nrpe/libexec/check_ipmi -t
Temp -66degreesC ok Temp -69degreesC ok Temp -68degreesC ok Temp -65degreesC ok Temp 40degreesC ok Temp 40degreesC ok Temp 22degreesC ok

[root@donuts ~]# /usr/local/nrpe/libexec/check_ipmi -f
FAN1RPM 2550RPM ok FAN2RPM 2475RPM ok FAN3RPM 2625RPM ok FAN4RPM 2625RPM ok

Open Manage

Note: May need libxslt for omreport to install correctly>>>>

yum install libxslt

scp stone:/usr/local/nrpe/libexec/check_omreport /usr/local/nrpe/libexec #requires dell open manage

scp stone:/usr/local/nrpe/libexec/check_omreport /usr/local/nrpe/libexec #requires dell open manage

[root@donuts ~]# scp quincy:/root/OMI-SrvAdmin-Dell-Web-LX-620-677.rhel5.tar /root
root@quincy’s password:
OMI-SrvAdmin-Dell-Web-LX-620-677.rhel5.tar 64% 79MB 39.5MB/s 00:01 ETA

-uncrompress

[root@kojak linux]# tar -xvf OMI-SrvAdmin-Dell-Web-LX-620-677.rhel5.tar

-install prereqs

[root@donuts ~]# ls ./linux/RPMS/supportRPMS/opensource-components/RHEL5/
libcmpiCppImpl0-2.0.0-1.1.el5.i386.rpm
libcmpiCppImpl0-2.0.0Dell-1.1.el5.i386.rpm
libwsman1-2.1.5Dell-2.1.el5.i386.rpm
openwsman-client-2.1.5Dell-2.1.el5.i386.rpm
openwsman-server-2.1.5Dell-2.1.el5.i386.rpm
sblim-sfcb-1.3.2Dell-9.1.el5.i386.rpm
sblim-sfcc-2.1.0Dell-6.1.el5.i386.rpm

-run installer:
[root@donuts ~]# ./linux/supportscripts/srvadmin-install.sh

Add following to /root/.bashrc. logout, log back in

alias omreport=’/opt/dell/srvadmin/bin/omreport’

# The following examples use hardcoded command arguments…

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

Copy plugin files from master to client.

[root@monk nrpe]# scp james:/usr/local/nagios/libexec/* libexec/
The authenticity of host ‘james (10.200.50.100)’ can’t be established.
RSA key fingerprint is ce:69:86:a6:1f:f1:4e:52:1f:18:f0:c9:6e:da:ea:8e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘james,10.200.50.100’ (RSA) to the list of known hosts.
check_apt 100% 332KB 332.1KB/s 00:00
check_breeze 100% 2254 2.2KB/s 00:00
check_by_ssh 100% 108KB 108.4KB/s 00:00
check_clamd 100% 93KB 92.9KB/s 00:00
check_cluster 100% 62KB 62.5KB/s 00:00
check_dhcp 100% 99KB 99.3KB/s 00:00
check_dig 100% 101KB 101.0KB/s 00:00
check_disk
…..

Add nagios users and group

[root@monk nrpe]# useradd nagios
[root@monk nrpe]# chown -R nagios:nagios /usr/local/nrpe/

Make sure that Nagios has all privs to scripts dir. Use visudo command.

[root@donuts ~]# grep “nagios” /etc/sudoers
nagios ALL=(ALL) NOPASSWD: /usr/local/nrpe/libexec/

Start Daemon

[root@monk nrpe]# ps -ef | grep nrpe
nagios 18401 1 0 15:13 ? 00:00:00 ./nrpe -d /usr/local/nrpe/nrpe.cfg
root 18403 18110 0 15:14 pts/1 00:00:00 grep nrpe

Verify nrpe on client is running on port 5666.

[root@monk nrpe]# netstat -ntla | grep 5666
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN

Test connection from nagios master

[root@james objects]# /usr/local/nagios/libexec/check_nrpe -H 10.200.1.11 -p5666
NRPE v2.12

*If you get a “Connection refused by host” then the deamon is not propertly running on the client.

Now run nrpe module to test.

[root@james objects]# /usr/local/nagios/libexec/check_nrpe -H 10.200.1.11 -p5666 -c check_disk
DISK OK – free space: / 128225 MB (51% inode=99%);| /=122419MB;211428;237857;0;264286

Note: When you run the test you must specify the name in the command[] brackets per the below!
command[check_disk]=/usr/local/nrpe/libexec/check_disk -w 20% -c 10% -p /

Booya!!

enable cgi downtime scheduling in nagios

1. enable nagios.cmd access.
[root@james conf]# chmod -R 777 /usr/local/nagios/var/rw/[root@james conf]# ls -la /usr/local/nagios/var/rw/total 8drwxrwxrwx 2 nagios nagios 4096 Dec 29 12:51 .drwxrwxr-x 7 nagios nagios 4096 Dec 29 12:54 ..prwxrwxrwx 1 nagios nagios 0 Dec 29 12:54 nagios.cmdprwxrwxrwx 1 nagios nagios 0 Dec 27 16:02 nagios.cmd-old
2. add auth user to access cgi’s in cgi.cfg

use_authenticaiontion=1
add authenticated user (name of user logged in via .htaccess file) or * for all for following.

authorized_for_system_information=*authorized_for_configuration_information=*authorized_for_system_commands=*authorized_for_all_services=*authorized_for_all_hosts=*authorized_for_all_service_commands=*authorized_for_all_host_commands=*

3. nagios.cfg enable check_external_commands=1
4. restart nagios.

Setup htaccess protect.

Modify httpd.conf

[root@james html]# grep “AllowOverride All” -A 5 -B 5 /etc/httpd/conf/httpd.conf
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be “All”, “None”, or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All

#
# Controls who can get stuff from this server.
#

Restart apache

Add .htaccess file to /var/www/html/nagios

[root@james html]# cat > /var/www/html/nagios/.htaccess
AuthName “Nagios”
AuthType Basic
AuthUserFile /var/www/html/nagios/.htpasswd
require valid-user

Create user pass auth file

[root@james html]# htpasswd -c /usr/local/nagios/share/.htpasswd nagios
New password:
Re-type new password:
Adding password for user nagios

uyser/pass: nagios/k@tz31@B

*If have problems authenticating then check /var/log/httpd/error_log

HTTPD config

Add below lines to httpd.conf. Restart apache.

#needed to cgi access

ScriptAlias /nagios/cgi-bin /usr/local/nagios/sbin/

<directory “/usr/local/nagios/sbin/”>
Options ExecCGI
AllowOverride AuthConfig
Order allow,deny
Allow from all
AuthName “Nagios Access”
AuthType Basic
AuthUserFile /usr/local/nagios/share/.htpasswd
Require valid-user

Alias /nagios/ /usr/local/nagios/share/
<directory “/usr/local/nagios/share”>
Options None
AllowOverride AuthConfig
Order allow,deny
Allow from all

Modify cgi.cfg

[root@james nagios]# grep “use_authentication” /usr/local/nagios/etc/cgi.cfg
use_authentication=0

Update contact info

[root@james objects]# grep “email” /usr/local/nagios/etc/objects/contacts.cfg
email jjest@u.washington.edu ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******

Create hosts.cfg and hostgroup.cfg files

Add lines to /usr/local/nagios/etc/objects/nagios.cfg

[root@james objects]# grep “cfg_file” -A 1 -B 1 /usr/local/nagios/etc/nagios.cfg
# You can specify individual object config files as shown below:
cfg_file=/usr/local/nagios/etc/objects/commands.cfg
cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/objects/templates.cfg

#added by jj
cfg_file=/usr/local/nagios/etc/objects/hosts.cfg
cfg_file=/usr/local/nagios/etc/objects/hostgroups.cfg

Disable localhost.cfg file for simplicity.

[root@james objects]# grep “localhost.cfg” -B 2 ../nagios.cfg

# Definitions for monitoring the local (Linux) host
#cfg_file=/usr/local/nagios/etc/objects/localhost.cfg

hosts.cfg

[root@james objects]# head /usr/local/nagios/etc/objects/hosts.cfg
define host{
use linux-server
host_name magnum
alias magnum
address 10.200.1.40
}

define host{
use linux-server
host_name monk

hosgroups.cfg

[root@james objects]# head /usr/local/nagios/etc/objects/hostgroups.cfg
define hostgroup{
hostgroup_name ssh-servers ; The name of the hostgroup
alias ssh-servers ; Long name of the group
members magnum,monk,kojak,quincy,scooby,stone,marlowe,rockford ;
}

Run pref light check for errors.

[root@james nagios]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

[root@james objects]# /etc/init.d/nagios restart
Running configuration check…done.
Stopping nagios: done.
Starting nagios: done.

==================================

Troubleshooting

UUID Email Error:

—–Original Message—–
From: 4294967295@lenora.micro.washington.edu [mailto:4294967295@lenora.micro.washington.edu]
Sent: Tuesday, August 23, 2011 10:54 AM
To: root@lenora.micro.washington.edu
Subject: *** SECURITY information for lenora.micro.washington.edu ***

lenora.micro.washington.edu : Aug 23 10:53:56 : 4294967295 : unknown uid: 4294967295 ; TTY=unknown ; PWD=unknown ; COMMAND=/usr/local/nrpe/libexec/check_link_speed

Answer: User and group ‘nagios’ need to be added to system.

If running RHEL 4 u may get this error when trying to start nrpe client

[root@baretta nrpe]# ./nrpe -d /usr/local/nrpe/nrpe.cfg
./nrpe: error while loading shared libraries: requires glibc 2.5 or later dynamic linker

Resolution:

Configuring Plugins

check_snmp: http://wiki.nagios.org/index.php/Howtos:snmp

check_sensors: need to install lmsensors.

===============================================

NRPE Client Install for Windows

-Download appropriate cpu archiecture:
http://sourceforge.net/projects/nscplus/

example setup screen. no other config needed.

-verify service is running.

-modify NSC.ini file on client

C:Program FilesNSClient++NSC.ini

[Settings]
allowed_hosts=10.200.50.100,10.200.1.124

[NSCClient]

port=12489

[NRPE]
port=5666

-Check client connection

[root@james libexec]# /usr/local/nagios/libexec/check_nrpe -H green
I (0.3.7.493 2009-10-12) seem to be doing fine…

Sample COmmands:

[root@james libexec]# /usr/local/nagios/libexec/check_nt -H green -v UPTIME -p12489
System Uptime – 25 day(s) 1 hour(s) 10 minute(s)

[root@james libexec]# /usr/local/nagios/libexec/check_nt -H green -p 12489 -v USEDDISKSPACE -l c
c: – total: 33.89 Gb – used: 12.31 Gb (36%) – free 21.58 Gb (64%) | ‘c: Used Space’=12.31Gb;0.00;0.00;0.00;33.89

[root@james libexec]# /usr/local/nagios/libexec/check_nt -H green -p 12489 -v MEMUSE
Memory usage: total:5731.60 Mb – used: 433.79 Mb (8%) – free: 5297.80 Mb (92%) | ‘Memory usage’=433.79Mb;0.00;0.00;0.00;5731.60

[root@james libexec]# /usr/local/nagios/libexec/check_nt -H green -p 12489 -v CPULOAD -l 60,90,95
CPU Load 0% (60 min average) | ’60 min avg Load’=0%;90;95;0;100

-uncoment following in nagios.cfg on nagios server.

# Definitions for monitoring a Windows machinecfg_file=/usr/local/nagios/etc/objects/windows.cfg

Open Manage install for EQ nagios checks:

Mdadm Setup

*RHEL5 does not come w/ xfs. Download and compile from here: http://147.52.159.12/mirrors/ftp.kernel.org/pub/linux/utils/fs/xfs/xfsprogs/

*If you get a ‘device resource busy error’ then try removing ‘dmraid’ with yum and reboot. http://www.righteoushack.net/?p=197

root@drvault:~# mdadm –create –force /dev/md0 –level=raid5 –spare-devices=1 –raid-devices=11 /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdg /dev/sdh /dev/sdi /dev/sdj /dev/sdk /dev/sdl /dev/sdm
mdadm: /dev/sda appears to be part of a raid array:
level=raid5 devices=11 ctime=Wed Feb 9 16:26:28 2011
mdadm: /dev/sdb appears to be part of a raid array:
level=raid5 devices=11 ctime=Wed Feb 9 16:26:28 2011
mdadm: /dev/sdc appears to be part of a raid array:
level=raid5 devices=11 ctime=Wed Feb 9 16:26:28 2011
mdadm: /dev/sdd appears to be part of a raid array:
level=raid5 devices=11 ctime=Wed Feb 9 16:26:28 2011
mdadm: /dev/sde appears to be part of a raid array:
level=raid5 devices=10 ctime=Fri Dec 10 13:21:26 2010
mdadm: /dev/sdg appears to be part of a raid array:
level=raid5 devices=11 ctime=Wed Feb 9 16:26:28 2011
mdadm: /dev/sdh appears to be part of a raid array:
level=raid5 devices=11 ctime=Wed Feb 9 16:26:28 2011
mdadm: /dev/sdi appears to be part of a raid array:
level=raid5 devices=11 ctime=Wed Feb 9 16:26:28 2011
mdadm: /dev/sdj appears to be part of a raid array:
level=raid5 devices=11 ctime=Wed Feb 9 16:26:28 2011
mdadm: /dev/sdk appears to be part of a raid array:
level=raid5 devices=11 ctime=Wed Feb 9 16:26:28 2011
mdadm: /dev/sdl appears to contain an ext2fs file system
size=-1073741824K mtime=Fri Feb 25 11:01:36 2011
mdadm: /dev/sdl appears to be part of a raid array:
level=raid5 devices=11 ctime=Wed Feb 9 16:26:28 2011
mdadm: /dev/sdm appears to be part of a raid array:
level=raid5 devices=11 ctime=Wed Feb 9 16:26:28 2011
Continue creating array? yes
mdadm: array /dev/md0 started.

Once the array is created, it automatically starts assemble and syncing the array.  Here is an example of another configuration during sync status.

root@backupsrv:~# mdadm -D /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Wed Oct 2 20:34:23 2013
Raid Level : raid5
Array Size : 3906765824 (3725.78 GiB 4000.53 GB)
Used Dev Size : 1953382912 (1862.89 GiB 2000.26 GB)
Raid Devices : 3
Total Devices : 3
Persistence : Superblock is persistent

Update Time : Wed Oct 2 20:34:54 2013
State : active, resyncing
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 512K

Resync Status : 1% complete

Name : backupsrv:0 (local to host backupsrv)
UUID : 4894c244:2dce53d1:bd11cd6a:db4c13be
Events : 1

Number Major Minor RaidDevice State
0 8 16 0 active sync /dev/sdb
1 8 32 1 active sync /dev/sdc
2 8 48 2 active sync /dev/sdd
root@backupsrv:~#

Create the disk partition…

root@drvault:~# parted /dev/md0
GNU Parted 2.2
Using /dev/md0
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) mklabel gpt
Warning: The existing disk label on /dev/md0 will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? yes
(parted) mkpart primary ext4 0 15TB
(parted) print
Model: Unknown (unknown)
Disk /dev/md0: 20.0TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 655kB 15.0TB 15.0TB primary

*format w/ xfs. supports 15TB and greater

Xfs Installation…

RHEL:
yum install gcc+ g++ e2fsprogs e2fsprogs-devel

Debian:
apt-get install xfsprogs

root@drvault:~# mkfs.xfs -f /dev/md0
meta-data=/dev/md0 isize=256 agcount=32, agsize=152618320 blks
= sectsz=4096 attr=2
data = bsize=4096 blocks=4883786240, imaxpct=5
= sunit=16 swidth=160 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal log bsize=4096 blocks=521728, version=2
= sectsz=4096 sunit=1 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0

root@drvault:~# fsck.xfs
If you wish to check the consistency of an XFS filesystem or
repair a damaged filesystem, see xfs_check(8) and xfs_repair(8).
root@drvault:~# xfs_check /dev/md0

#verify mounting

root@drvault:~# mount /dev/md0 /data
root@drvault:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/drvault-root
900G 1.1G 854G 1% /
none 3.0G 308K 3.0G 1% /dev
none 3.0G 0 3.0G 0% /dev/shm
none 3.0G 40K 3.0G 1% /var/run
none 3.0G 0 3.0G 0% /var/lock
none 3.0G 0 3.0G 0% /lib/init/rw
/dev/sdf1 228M 20M 196M 10% /boot
/dev/md0 19T 5.5M 19T 1% /data

#save new raid information in mdadm conf file. this command will assemble the drives on boot.

mdadm –examine –scan > /etc/mdadm/mdadm.conf

#find uuid and add to fstab

root@drvault:~# ls -la /dev/disk/by-uuid/ | grep md0
lrwxrwxrwx 1 root root 9 2011-02-28 16:33 b63dec53-7c22-4bac-ab48-367da1eadeb9 -> ../../md0

#Add to /etc/fstab

UUID=b63dec53-7c22-4bac-ab48-367da1eadeb9 /data xfs defaults 0 0

#setup email alerts

root@biovault:/usr/local/nrpe# mdadm –monitor –scan –daemonise –mail=root@localhost –delay=600 /dev/md0
4709

TROUBLE SHOOTING:

If this disk “mdadm: Cannot open /dev/sd* Device or resource busy” and/or you cannot zero-block the drive out then try the below. Note you will need dmraid installed to perform actions….

1) Try booting w/ nodmraid option and reboot.

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-274.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-274.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet nodmraid
initrd /initrd-2.6.18-274.el5.img

2) if step1 doesn’t work try the below.

[root@nhpvault ~]# mdadm –zero-superblock /dev/sd[i,k]
mdadm: Couldn’t open /dev/sdi for write – not zeroing
mdadm: Couldn’t open /dev/sdk for write – not zeroing

Try this…..

[root@nhpvault ~]# dmraid -R /dev/sd*
ERROR: ddf1: wrong # of devices in RAID set “ddf1_New_VD” [1/2] on /dev/sdi
ERROR: ddf1: wrong # of devices in RAID set “ddf1_New_VD” [1/2] on /dev/sdk
ERROR: only one argument allowed for this option
no raid sets and with names: “/dev/sda1,/dev/sda2,/dev/sdb,/dev/sdc,/dev/sdd,/dev/sde,/dev/sdf,/dev/sdg,/dev/sdh,/dev/sdi,/dev/sdj,/dev/sdk,/dev/sdl”

[root@nhpvault ~]# dmraid -s ddf1_New_VD
*** Group superset .ddf1_disks
–> Active Subset
name : ddf1_New_VD
size : 11720738560
stride : 128
type : stripe
status : ok
subsets: 0
devs : 2
spares : 0
[root@nhpvault ~]# dmraid -x ddf1_New_VD
ERROR: ddf1_New_VD is active and cannot be deleted

[root@nhpvault ~]# dmsetup remove ddf1_New_VD
[root@nhpvault ~]# dmraid -x ddf1_New_VD

About to delete RAID set ddf1_New_VD

WARNING: The metadata stored on the raidset(s) will not be accessible after deletion
Do you want to continue ? [y/n] :y
ERROR: Raid set deletion is not supported in “ddf1” format

Erase meta data
[root@nhpvault ~]# dmraid -E -r /dev/sdiDo you really want to erase “ddf1” ondisk metadata on /dev/sdi ? [y/n] :yERROR: ddf1: seeking device “/dev/sdi” to 1536303606530048ERROR: writing metadata to /dev/sdi, offset 3000592981504 sectors, size 0 bytes returned 0ERROR: erasing ondisk metadata on /dev/sdi Zero block all info….

[root@nhpvault ~]# mdadm –zero-superblock /dev/sd[b-l]
mdadm: Unrecognised md component device – /dev/sdb
mdadm: Unrecognised md component device – /dev/sdc
mdadm: Unrecognised md component device – /dev/sdd
mdadm: Unrecognised md component device – /dev/sde
mdadm: Unrecognised md component device – /dev/sdf
mdadm: Unrecognised md component device – /dev/sdg
mdadm: Unrecognised md component device – /dev/sdh
mdadm: Unrecognised md component device – /dev/sdi
mdadm: Unrecognised md component device – /dev/sdj
mdadm: Unrecognised md component device – /dev/sdk
mdadm: Unrecognised md component device – /dev/sdl

**If problem continues after reboot then remove ‘dmraid’

Python for Windows

*download PythonWin for modules.

//get user name

>>> import win32api

>>> username=win32api.GetUserName()
>>> print(username)

jjest

>>> import win32api

>>> computername=win32api.GetComputerName()

>>> print(computername)

TUBBS-PC

>>> free=win32api.GetDiskFreeSpace()

>>> print(free)

(8, 512, 106922325, 122096127)

/pyhandle object error

>>> print(win32api.PostMessage(‘hi’,1))
Traceback (most recent call last):
File ““, line 1, in
TypeError: The object is not a PyHANDLE object

//get version

>>> version=win32api.GetVersion
>>> print(version)

>>> version=win32api.GetVersion()
>>> print(version)
498073862

//disk space

>>> a=win32api.GetVolumeInformation(“C:\”)

>>> print(a)
(”, 1284288434, 255, 65470719, ‘NTFS’)

//get drive labels

>>> drives=win32api.GetLogicalDriveStrings()

>>> print(drives)

C:

PNP4Nagios Graphing

Install RRD Tool First!

http://www.cyberciti.biz/faq/howto-install-rrdtool-on-rhel-linux/

yum install cairo-devel libxml2-devel pango-devel pango libpng-devel freetype freetype-devel libart_lgpl-devel

uncompress

[root@james rrdtool-1.3.1]# tar -xzvf rrdtool-1.3.1.tar.gz

configure

[root@james opt]# export PKG_CONFIG_PATH=/usr/lib/pkgconfig/
[root@james opt]# cd rrdtool-1.3.1
[root@james rrdtool-1.3.1]# ./configure

Result…

Config is DONE!

With MMAP IO: yes
Static programs: no
Perl Modules: perl_piped perl_shared
Perl Binary: /usr/bin/perl
Perl Version: 5.8.8
Perl Options: PREFIX=/usr/local/rrdtool-1.3.1 LIB=/usr/local/rrdtool-1.3.1/lib/perl/5.8.8
Ruby Modules:
Ruby Binary: no
Ruby Options: sitedir=$(DESTDIR)NONE/lib/ruby
Build Tcl Bindings: no
Build Python Bindings: no
Build rrdcgi: yes
Build librrd MT: yes
Link with libintl: yes

Libraries: -lxml2 -lcairo -lcairo -lcairo -lm -lcairo -lpng12 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0

Type ‘make’ to compile the software and use ‘make install’ to
install everything to: /usr/local/rrdtool-1.3.1.

… that wishlist is NO JOKE. If you find RRDtool useful
make me happy. Go to http://tobi.oetiker.ch/wish and
place an order.

— Tobi Oetiker

Complete build…

make
make install

Install PNP4Nagios

[root@james pnp4nagios-0.6.6]# ./configure –datarootdir=/usr/local/nagios/share/pnp –with-rrdtool=/opt/rrdtool-1.3.1/src/rrdtool –sysconfdir=/usr/local/nagios/etc/pnp –with-perfdata-dir=/usr/local/nagios/share/perfdata
–with-perfdata-logfile=/usr/local/nagios/var/perfdata.log –with-perfdata-spool-dir=/usr/local/nagios/var/spool/perfdata

*** Configuration summary for pnp4nagios-0.6.6 08-07-2010 ***

General Options:
————————- ——————-
Nagios user/group: nagios nagios
Install directory: /usr/local/pnp4nagios
HTML Dir: /usr/local/nagios/share/pnp
Config Dir: /usr/local/nagios/etc/pnp
Location of rrdtool binary: /opt/rrdtool-1.3.1/src/rrdtool Version 1.3.1
RRDs Perl Modules: *** NOT FOUND ***
RRD Files stored in: /usr/local/nagios/share/perfdata
process_perfdata.pl Logfile: /usr/local/nagios/var/perfdata.log
Perfdata files (NPCD) stored in: /usr/local/nagios/var/spool/perfdata

Web Interface Options: ————————- ——————-
HTML URL: http://localhost/pnp4nagios
Apache Config File: /etc/httpd/conf.d/pnp4nagios.conf

Finish compile.

make
make install

*** Main program, Scripts and HTML files installed ***

Please run ‘make install-webconf’ to install the
web configuration file

Please run ‘make install-config’ to install sample
configuration files

Please run ‘make install-init’ if you want to use
BULK Mode with NPCD

Configuration

[root@james conf.d]# htpasswd -c nagiosadmin /usr/local/nagios/etc/htpasswd.users
New password:
Re-type new password:
Adding password for user /usr/local/nagios/etc/htpasswd.users

Review the options above for accuracy. If they look okay,
type ‘make all’ to compile.

WARNING: The RRDs Perl Modules are not found on your system
Using RRDs will speedup things in larger installations.

HTOP from Sourceforge.

First, find the rpmforge needed for your release.

http://pkgs.repoforge.org/rpmforge-release/

Download and install….

[root@hn ~]# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
–2011-12-14 13:00:37– http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
Resolving pkgs.repoforge.org… 78.46.17.228
Connecting to pkgs.repoforge.org|78.46.17.228|:80… connected.
HTTP request sent, awaiting response… 302 Found
Location: http://rpmforge.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm [following]
–2011-12-14 13:00:38– http://rpmforge.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
Resolving rpmforge.sw.be… 78.46.17.228
Connecting to rpmforge.sw.be|78.46.17.228|:80… connected.
HTTP request sent, awaiting response… 301 Moved Permanently
Location: http://tree.repoforge.org/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm [following]
–2011-12-14 13:00:39– http://tree.repoforge.org/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
Resolving tree.repoforge.org… 78.46.17.228
Connecting to tree.repoforge.org|78.46.17.228|:80… connected.
HTTP request sent, awaiting response… 301 Moved Permanently
Location: http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm [following]
–2011-12-14 13:00:39– http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
Resolving apt.sw.be… 193.1.193.67
Connecting to apt.sw.be|193.1.193.67|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 12700 (12K) [application/x-redhat-package-manager]
Saving to: ârpmforge-release-0.5.2-2.el6.rf.x86_64.rpmâ

100%[========================================================================================>] 12,700 30.4K/s in 0.4s

2011-12-14 13:00:40 (30.4 KB/s) – ârpmforge-release-0.5.2-2.el6.rf.x86_64.rpmâ

[root@hn ~]# rpm -Uvh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
warning: rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY
Preparing… ########################################### [100%]
1:rpmforge-release ########################################### [100%]
[root@hn ~]# yum install htop
Loaded plugins: refresh-packagekit, rhnplugin, security
rpmforge | 1.1 kB 00:00
rpmforge/primary | 1.4 MB 00:06
rpmforge 4091/4091
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package htop.x86_64 0:0.9-1.el6.rf will be installed
–> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================
Installing:
htop x86_64 0.9-1.el6.rf rpmforge 76 k

Transaction Summary
==================================================================================================================================
Install 1 Package(s)

Total download size: 76 k
Installed size: 188 k
Is this ok [y/N]: