opsview and notifications

To send a notification to an external party in opsview (3.13.1) there are a few things to do:

1. Attach keywords in the host configuration to that particular host (unique no, spaces, special characters, underscores are okay).
2. Setup a new role (with the NOTIFYSOME permission, which is vaguely documented) + check off the ‘all’ box in the keywords permission section.
3. Add a contact with an e-mail address.
4. Add a notification profile attached to that e-mail address, with specific keywords to notify on checked off.
5. In the keywords section, click to flag all services with the specified keyword (otherwise no notifications will appear).

For the lazies (which means pretty much every systems administrator out there) there is, (thankfully) a *full* REST API with JSON built into opsview (unlike some of the other Nagios derivatives). More on that later hopefully.


Nagios + DNX

Are you getting messages that look like this in /var/log/messages?

nagios nagios: Error: Could not load module ‘/usr/lib/dnxServer.so’ -> /var/nagios/spool/checkresults/nebmodyMUyCP: undefined symbol: service_result_buffer

Make sure that you have configured things properly if you’re using Nagios 3.x+:
./configure –with-nagios3x

Then run:
make install-server

And more importantly:
make install-cfg

Then edit your main nagios configuration to include the dnxServer.so as an event broker, and turn on event brokering.

You should hopefully get:
nagios[5991]: Event broker module ‘/usr/lib/dnxServer.so’ initialized successfully.

Notes on KVM

Sharing sound with the host:
export QEMU_AUDIO_DRV=alsa; kvm -hda $image_name.img -m 1024 -soundhw all

-hda = Hard disk image
-m = Memory
-soundhw = Sound Hardware

Git Hooks: GIT_DIR and changing directories

If you’re doing something that needs to change its directory to another place (like say, you have the unfortunate need to call an external repository to perform a subtree merge after your repository has been updated), the variable GIT_DIR needs to be unset for things to work properly.

unset GIT_DIR
in your bash script to make this happen.


Adding an IP address to Debian/Ubuntu Linux

# sudo vi /etc/network/interfaces

Your original will look something like this:

# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.

auto lo eth0

iface lo inet loopback

iface eth0 inet static

Add the following below it to add another address to the same interface:

auto eth0:1
iface eth0:1 inet static


# sudo /etc/init.d/networking restart

Ping the interface and check to see if the IP is up.

Installing mod_rails on CentOS

First, you should follow this guide: http://wiki.rubyonrails.org/rails/pages/RailsOnCentos to install Rails and Ruby in general.

After you install RubyGems, install passenger by issuing gem install passenger.
After the installation completes, issue: passenger-install-apache2-module at the command prompt.
The installation steps should be straightforward, and it’ll tell you how to work through everything.

If you get the following error: cannot open /httpd/build/config_vars.mk: No such file or directory at /usr/sbin/apxs line 201 (this may appear at the beginning of running passenger-install-apache2-module), you need to install apr-devel. Issue yum install apr-devel to take care of that.

Instaling Ubuntu Linux on the HP Pavilion tx25135cl

The HP Pavilion tx25135cl is a 12.1″ laptop tablet. It comes with an AMD Turion X2 RM-70 processor clocked at 2.0Ghz per core. Along with an ATi Radeon 3200 HD, this makes it a part of the AMD Puma platform. It has 3GB of RAM, a 250GB hard drive, and is usually pre-installed with Windows Vista Home Premium.

All installation work was done on the Ubuntu alternative installer.

Things that need fixing:
You will need to pass nolapic and acpi=off as kernel options, both for installation and normal boot. Not doing this results in a thermal warning (and subsequently a forced shutdown). Specifying other combinations is prone to causing a kernel panic (and subsequently a hard system lockup as a result).

Realtek Ethernet is severely broken with the RTL8111/816B that gets loaded as stock.
A bug report for this is here: https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/141343

The fastest way to fix this is to use Jameson William’s fixup. You will want to load the file there onto a USB stick. From a fresh Hardy install (alternative installer), the patch program was not installed, so you may need to grab a deb as well.

Grab the fixup here (read the instructions for it and install): http://www.jamesonwilliams.com/hardy-r8168.html
If you end up needing the patch utility, you can find it here: http://us.archive.ubuntu.com/ubuntu/pool/main/p/patch/
Select the appropriate architecture, download it onto your USB stick, and as root on the affected computer, issue a `dpkg -i patch_[version here]_[architecture here].deb` to install it.

Broadcom BCM4328 a/b/g/n

This Broadcom chipset is VERY nice, it does 802.11 a/b/g/n. However it doesn’t get recognized as stock, and thus it falls over on itself:


This did not work for me on the cl, even though others with similar configurations had working wireless configurations. This may change in the future.

At this point, I decided to return the laptop due to time constraints (I was not able to get to work on the video or tablet features). Hopefully this post helps somebody out.

Buying Steam games using Wine

When you get an error that Firefox doesn’t know how to handle the Steam protocol, and you’re buying using PayPal, do the following in the same directory the Steam.exe executable is in. (This is usually ~/.wine/drive_c/Program Files/Steam/)

$ wine Steam.exe steam://paypal/return

This will cause your current Wine’d Steam to continue along properly to complete the purchase.

Irssi with IRC Proxy on OpenWRT

Irssi has this nifty feature that allows you to proxy through the client. This isn’t installed by default, and is not configured in the Makefile.

This will be a sparse walkthrough, until I can flesh it out more later. I did modify the Makefile using –with-proxy, but this didn’t seem to work (the ipkg contained only the binary irssi and other sparse files).

In any case, requirements:
OpenWRT SDK, with Irssi package
Copy the following from the SDK directory:

cd openwrt/build_dir/mipsel/irssi-0.8.10/src/irc/proxy/.libs
scp * root@openwrt:/usr/lib/irssi/modules/

Starting irssi and performing /LOAD proxy showed the following:
Warning: Warning!! Password not specified, everyone can use this proxy! Use
/set irssiproxy_password to set it
Warning: No proxy ports specified. Use /SET irssiproxy_ports =
= … to set them.
03:08 -!- Irssi: Loaded module proxy/irc


When setting up a Hadoop cluster..

Make sure you clear out your /etc/hosts. I had plenty of hunting trying to figure out why the dfs daemon kept binding to localhost and how to unbind it.

For those interested in setting up a Hadoop cluster, go