Quick Links

Workaround for Nagios check_linux_raid failure in RHEL / CentOS 6.2

I recently stumbled upon another Nagios plugin that no longer works with SELinux under RHEL / CentOS 6.2: check_linux_raid.

Just like the check_disk plugin, it has the nagios_checkdisk_plugin_exec_t SELinux type. As of May 2012, this problem has not yet been fixed.

The workaround is simple, as with the check_disk plugin:

chcon -t nagios_unconfined_plugin_exec_t /usr/lib64/nagios/plugins/check_linux_raid

Or, for 32-bit systems:

chcon -t nagios_unconfined_plugin_exec_t /usr/lib/nagios/plugins/check_linux_raid

Workaround for Nagios check_disk failure in RHEL / CentOS 6.2

After updating from EL 6.1 to 6.2, the Nagios “check_disk” plugin suddenly stopped working with “Permission denied” errors. This problem is related to the SElinux policy (you *are* running with SElinux enabled, aren’t you?).

By default, these AVC denials are not logged in /var/log/audit/audit.log which makes this problem harder to spot (if you want, you can enable all audit-messages by running semodule -DB).

There are at least two relevant entries in Bugzilla:

Bug 771245 – nagios-plugins-disk fails when checking /boot on RHEL6.2 boxes
Bug 768055 – SELinux silent denials of Nagios NRPE check of /boot

Fortunately, there is a simple workaround while we wait for an updated [...]

Continue reading Workaround for Nagios check_disk failure in RHEL / CentOS 6.2

Tip: Importing multiple CentOS Linux DVDs into Cobbler

Linux distributions are getting larger and larger; CentOS 6.0 64-bit won’t fit on a single DVD anymore. A Cobbler-based provisioning server will normally import only one DVD. So, how do you get around this?

Import the first DVD as usual
Manually add content from the second DVD

Import the first DVD (ISO image):

mkdir /mnt/dvd1; mount -o ro,loop /tmp/CentOS-6.0-x86_64-bin-DVD1.iso /mnt/dvd1

DISTRO=centos60-x86_64
cobbler import –name=${DISTRO} –path=/mnt/dvd1

Watch the output from Cobbler closely – it will basically tell show you the commands you need to import the second DVD

Import the second DVD (ISO image):

mkdir /mnt/dvd2; mount -o ro,loop /tmp/CentOS-6.0-x86_64-bin-DVD2.iso [...]

Continue reading Tip: Importing multiple CentOS Linux DVDs into Cobbler

Passed the RHCSA and RHCE exams!

My RHCE certification (RHEL 4) was no longer current so I had to re-take the exam with RHEL 6. I decided to take the 4-day course (RH300) as well as the exam (EX300) in one week but it turned out to be quite the obstacle-course:

Monday. The first day of the course: while waiting in Amsterdam for the trainer to arrive, we were informed that he had fallen ill – course canceled, no backup trainer available. Meh.
A couple of weeks later, the course finally starts with Sander van Vugt as trainer, someone else will proctor the exam (Friday). Things start to [...]

Continue reading Passed the RHCSA and RHCE exams!

Tip: Configuring network aliases with NetworkManager on Fedora 14

Linux supports the concept of “network aliases”; a NIC with more than one IP-address.

Previously, with networking managed by /etc/init.d/network, you would create a configuration file (/etc/sysconfig/network-scripts/ifcfg-eth0:0) holding the IP-address information for alias “0” of network interface “eth0“.

With NetworkManager, things become more complicated for non-trivial network configurations. The primary interface settings are in /etc/sysconfig/network-scripts/ifcfg-eth0 as usual:

DEVICE=”eth0″
NM_CONTROLLED=”yes”
ONBOOT=yes
HWADDR=00:04:23:C0:FF:EE
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME=”System eth0″
UUID=5fb06bd0-0bb0-7ffb-45f1-deadbeefc0ffee

Based on a comment by Cristiano, I added a script to NetworkManager that would take care of configuring any [...]

Continue reading Tip: Configuring network aliases with NetworkManager on Fedora 14