The Certified Geek

November 10, 2009

Nagios Installation Whoops!

While installing Nagios, you might encounter this error message in the web interface:
Nagios web interface error

Reading the recommended steps are rather vague and not straightforward. Here are direct steps to check what causing the errors on Nagios installation.

1) Make sure Nagios is running in the background

# ps ax | grep nagios
6722 ? Ssl 0:14 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg

If it is not running, execute the command

# usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg

Since I use Debian, I executed this command,

# /etc/init.d/nagios start

2) Execute pre-flight check commands to check the configuration file

# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
...snipped...
Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check

The output should give you indications of any problems in the configuration file

3) Lastly, check the Nagios logs which are normally located in /usr/local/nagios/var/nagios.log (use tail command if log file is very long)

From these steps, you can properly diagnose the problem and correct them (if ever :) )

June 24, 2008

How to brick a Cisco Wireless (AP1131AG) A.K.A Downgrading from lightweight mode to autonomous mode

It has been a while I manage to write new stuff given with the new work I am currently dealing but here is the first for this year :)

We just bought some Cisco Wireless Access Point (model 1131AG) but unfortunately these are already in lightweight mode. In this mode, you would need a Wireless LAN Controller to utilize them. There a documentation to how to upgrade an autonomous Cisco Aironet Access Point to lightweight mode only a small section discusses the reversing the process. This blog discusses how I managed to brick errm reverse the process which is not recommended by Cisco.

1. Download the appropriate Cisco IOS from the cisco website (You need to have a valid Cisco account to do this :) )

For this I downloaded c1130-rcvk9w8-tar.124-10b.JA3

2. Install a TFTP Service (recommend SolarWinds free TFTP server)

3. Rename the image to c1130-k9w7-tar.default and place the image in the TFP source directory

4. Change to IP address of the TFTP Server to any IP address between 10.0.0.2 to 10.0.0.30 (I used 10.0.0.2 on my laptop where the TFTP service is running)

5. Connect the access point on the same switch where the TFTP service is connected. Note: Ensure there is no DHCP service running on the this device.

6. Press the mode button of the access point while pluggin in the power (wait for about 20-25 seconds). Wait for the one of the LED to turn RED (one them becomes Amber first) then release the mode button.

If everything goes well, the process will take around 10 to 15 minutes.

Here are the screenshots from the console of the access point, the sniffer on my laptop and the TFTP server activity.

On the final outcome, the access point can now operate in autonomous mode with a full fledge IOS that enables it to function in stand alone.

Enjoy!

October 30, 2007

Windows Shell Environment

While playing around with my Windows XP, I tried looking around for alternatives for the crude CMD.EXE Command Prompt. I tried several alternatives for gaining the same *Nix-Shell flexibility I get while using my *Nix plaform. In the end, I have narrowed my choice to two Window shell environment. These are Cygwin and Windows Powershell

I will post next time detailed difference between the two Windows shell environment. Here some screenshots from my machine:

Cygwin
Cygwin

Powershell
Powershell

May 4, 2006

Disable WGATray.exe

Filed under: Tables and Platform

Before proceeding to this quick fix, proceed to this site which discusses extensive details in bypassing Windows Genuine Authentication update and ensures your machine can gets critical updates. So far, method #2 worked for me.

Then now, the problem is the pesky “WGAtray.exe” which pops up on your system. To disable the program without reappearing, you need to locate in Windows Explorer the WGATray.exe (normally in C:\Windows\system32) and open the Task Manager highlighting the same program.

The two windows should be open at the same time and in split seconds, first end the WGATray.exe process in the Task Manager and second delete the wgatray.exe file. This will prevent the program in reappearing. Then the next step is locate “Wgalogon.dll” (normally in C:\Windows\system32) and delete. When you reboot your system, the WGA notifier will no longer run.

April 25, 2006

Installing VMWare Server Beta on Debian AMD64/EM64T

Filed under: Tables and Platform

This is just a reposting of the activities I had done to install VMware Server Beta (Build-22874) on a Debian Server with Kernel built for 64bit. Kudos! to Robinz for the great blog.

Since VMWare Server is a 32bit program and the Linux server uses a 64bit kernel, some additional libraries are needed to be installed on the box particularly ia32-libs. This basically removes the pains of these output when running vmware-config.pl script. These where the output before:

The correct version of one or more libraries needed to run VMware Server may be
missing. This is the output of ldd /usr/bin/vmware:
linux-gate.so.1 => (0xffffe000)
libm.so.6 => /lib32/libm.so.6 (0xf7efb000)
libdl.so.2 => /lib32/libdl.so.2 (0xf7ef7000)
libpthread.so.0 => /lib32/libpthread.so.0 (0xf7ee5000)
libX11.so.6 => not found
libXtst.so.6 => not found
libXext.so.6 => not found
libXt.so.6 => not found
libICE.so.6 => not found
libSM.so.6 => not found
libXrender.so.1 => not found
libz.so.1 => not found
libc.so.6 => /lib32/libc.so.6 (0xf7db4000)
/lib/ld-linux.so.2 (0xf7f26000)

So by just running an apt-get (or even dselect)
apt-get install ia32-libs
These will be gone in a jippy.

Now the next step is to install the Management User Interface for the VMWare Server with provides a Web Interface in managing the virtual machines. However, this will results in some errors such as missing libdb.so which will not install the program properly. So you need to get the 32bit version of libdb even if the ldconfig -v shows it. Its because these are 64bit libraries. Even after this leg, the authentication module with the MUI will not synchronize with the system unless 32bit PAM libraries are correctly installed and referred. (With permission from Robinz), here are the libraries needed to be downloaded and installed:

# wget http://http.us.debian.org/debian/pool/main/p/pam/libpam0g_0.76-22_i386.deb
# dpkg -x libpam0g_0.76-22_i386.deb /emul/ia32-linux/
# wget http://http.us.debian.org/debian/pool/main/d/db2/libdb2_2.7.7.0-9_i386.deb
# dpkg -x libdb2_2.7.7.0-9_i386.deb /emul/ia32-linux/
# wget http://blog.robinz.info/wp-content/uploads/2006/ia32-security.tar.bz2
# tar xvjf ia32-security.tar.bz2 /emul/ia32-linux/lib/security/

The first files eliminates the problem in running vmware-config-mui.pl script particularly this output

Couldn't find necessary components on your system. It appears that you are
missing the following library: libdb.so.3

The last two files are for the problem encountered when logging into the MUI Web interface which still need to edit /etc/pam.d/vmware-authd file to refer the PAM libraries to the correct location.

# more /etc/pam.d/vmware-authd
auth sufficient /emul/ia32-linux/lib/security/pam_unix2.so shadow nullok
auth required /emul/ia32-linux/lib/security/pam_unix_auth.so shadow nullok
account sufficient /emul/ia32-linux/lib/security/pam_unix2.so
account required /emul/ia32-linux/lib/security/pam_unix_acct.so

And to refresh everything, restart all vmware services:

etc/init.d/vmware restart
etc/init.d/httpd.vmware restart

And lastly, connect to the VMWare Management Web Interface via https://hostname:8333/ and use the systems administrative account.

Enjoy your VMWare Server! :-)