Nagios: setup monitoring via WMI
Download the Zenoss WMI library, compile and install.
wget http://dev.zenoss.org/svn/trunk/inst/externallibs/wmi-1.3.16.tar.bz2
tar xvjf wmi-1.3.16.tar.bz2
cd wmi-1.3.16
Download the Zenoss WMI library, compile and install.
wget http://dev.zenoss.org/svn/trunk/inst/externallibs/wmi-1.3.16.tar.bz2
tar xvjf wmi-1.3.16.tar.bz2
cd wmi-1.3.16
cd /tmp
wget http://www.network-weathermap.com/files/php-weathermap-0.97a.zip
unzip php-weathermap-0.97a.zip
mv weathermap /usr/local
cd /usr/local/weathermap/
chown -R apache:apache *
chmod u+w ./configs
mv editor-config.php-dist editor-config.php
cd /etc/httpd/conf.d/
vi weathermap.conf
# php-weathermap-0.9
# PHP-WEATHERMAP : A php writen network weathermap graphing tool
#
Alias /weathermap “/usr/local/weathermap”
<Directory “/usr/local/weathermap”>
#Order Deny,Allow Deny from all
# Allow from (ip address allowed) (take care, you must remove # to make this line readable)
Allow from 127.0.0.1
</Directory>
Introduction
In our example scenario, we are testing against “Oracle Database 11g Express Edition”, however the monitoring should be uniform across all Oracle database platforms. Our Opsview server is running on Ubuntu 10.04 32-bit, however this document can be altered to fit RHEL/CentOS/SLES etc and also 32/64 bit with some slight changes.
Shutting down the guest OS Centos 6 (I used 6.2) results in a shutdown of the OS but the actual VM does not shutdown.
# shutdown -h 0
Tried to activate the ACPI module in the kernel by editing the grub.conf file and this worked!
# vi /boot/grub/grub.conf
I use this kickstart file to install Centos 6.2 with a minimal install, SELinux disabled and uninstalled, 1GB of swap space on a 20GB drive.
Ran into this a couple of times, found a solution descibed by Aaron Walrath and I copied it here as a note myself. Thnx to Aaron for this great article.
Some quick SQL statements. This info is unstructured uptil now, got to make a readable article so bear with me.
# wget -r -np -nH –cut-dirs=3 -R index.html http://hostname/aaa/bbb/ccc/ddd/
-r -np -nH –cut-dirs=3 -R index.htm |
recursive not uploading files from higher directories not using hostname as the root download folder omitting first 3 folders aaa, bbb, ccc excluding index.html files
|
cd /tmp
wget http://www.network-weathermap.com/files/php-weathermap-0.97a.zip
Centos 5.6 x86. Easily adjustable for 64-x86
Ready for Compact Flashcard in a Nagios Satellite
Ready for testing on a VMware Virtual Machine (you would normally use a 64 bit OS in a VM.