runnane Everything that matters ++


Check_MK bleeding edge

I have been doing som OMD/Check_MK bleeding edge testing and development, aswell as collecting interesting plugins and locals. Running a Debian Wheezy box on ESXi

My notes:

Get and install the last omd package (as of 3 june 2014):

wget ""
dpkg -i omd-1.11.20140601.wheezy.i386.deb

Stop and upgrade the site:

omd stop <sitename>
omd update <sitename>
omd start  sitename>

Check for errors and reload

omd su <sitename>
cmk -R

Once in a while I've had some settings that do not upgrade successfully, and I've had to hunt bugs. One error that occurs, is the reset of NagVis rights when using MultisiteRights ( This document has not been updated to reflect the latest changes, the file is now defined by a variable called "authorisation_multisite_file", which is placed at ~/var/check_mk/wato/auth/auth.php. This variable also must be set.

To fix this, i have to set these properties each time i upgrade:

omd su <sitename>
vim ~/etc/nagvis/conf.d/auth.ini.php




The new OMD packages has native support for ESXi host monitoring (and automatic mapping VM<->Hosts). See Check up on the section about piggybacking for mapping vm-names with wato-host-names if these are not identical.

Plugins that I use besides the automaticly installed ones:

lm-sensors package, neatly packed by BenV:

apache_status (update the servers variable to hardcode which servers to monitor - autodetect is not working as intended for multiple servers. I usually set it to "servers = [ ( 'http', '::1', 80 ),( 'https', '::1', 443 ) ]"

check_apt (for checking debian packages)

mk_mysql - needs username/pwd in configfile, so watch out.


Monitoring Raspberry Pi fw versions with check_mk

Modified to work with my omd/check_mk setup for monitoring firmware versions on rpi farm.


raw_firmware=`/opt/vc/bin/vcgencmd version`
date_version=`echo $raw_firmware | awk '{print $1,$2,$3,$4}'`
git_version=`echo $raw_firmware | awk '{print $10}'`
echo "0 RpiFirmwareVersion hash=($git_version) $date_version ($git_version)"
exit 0


vim /usr/lib/check_mk_agent/local/RpiFirmwareVersion
chmod +x /usr/lib/check_mk_agent/local/RpiFirmwareVersion


RiksTV in Windows 7

I just changed from Altibox (IPTV) to RiksTV (DVB-T) and wanted to get this to work on Windows and Linux. Windows was easy enough:

DVBViewer Pro v4.8.1.0

Hauppauge! WinTV-HVR-1300
Hauppauge! WinTV-CI-USB2

Installation without any problems. Drivers found by windows by default, but downloaded official drivers on Hauppauge! webpage and installed just in case. All encrypted channels decode great, and watching TVNorge in full hd is nice 🙂
Now going to try getting it to work in Linux, but since the CI is not supported in Linux, I will try with softcams and some SC readers. I have a SmartCard USB reader from Norsk Tipping ready, aswell as ordered a SMARGO SmartCard Reader off ebay. It would be nice to be able to watch RiksTV in XMBC on my HTPC. Perhaps with tvheadend?



Installing ESXi 4.1 on a Whitebox

Installing ESXi 4.1 on a Whitebox:

* System: Gigabyte EP45-DS3L with Intel Core2Duo Quad Q6600. (no VT-d implementation on NB)
* NIC: RTL8139 onboard
* Raid: 3ware 9650 PCIe x4 4-port version.

1) Make a bootable installation USB-pen/drive. [1] I used a 320gb usb 5400rpm drive from some laptop.

2) Format it with fat32.
3) Get Syslinux, not the version 4, but an older version. I used 3.86 from here [2] Version 4 can give you an error on boot, "invalid c32 image".
4) Run syslinux: syslinux.exe -m -f -a S: (S: being the drive letter).
6) Extract the iso, copy contents to usb drive
7) Rename isolinux.cfg to syslinux.cfg.

8 ) Add custom drivers to boot-disc

9) Identify the drivers you need, and get them. You may need to find vendor-id and device-id and do some googling. See this [4] page for a good list
10) Customize an oem.tgz file using the instructions here [5]
11) Copy oem.tgz to usb drive.
12) Modify syslinux.cfg to include loading the oem.tgz: add " --- oem.tgz" to the end of the following line:
append vmkboot.gz --- vmkernel.gz --- sys.vgz --- cim.vgz --- ienviron.vgz --- install.vgz

13) Optional: kickstart file. I had an issue with not being able to use my keyboard, so used a kickstart file.

13.1) Add a file called ks.cfg on the usb-drive with the following contents:
rootpw password
autopart --firstdisk --overwritevmfs
install usb
network --bootproto=dhcp --device=vmnic0
13.2) Modify the syslinux.cfg, add "ks=usb" after vmkboot.gz:
append vmkboot.gz ks=usb --- vmkernel.gz --- sys.vgz --- cim.vgz --- ienviron.vgz --- install.vgz --- oem.tgz

14) Add custom drivers to esxi installation.

15) Modify the oem.tgz on the running installation to include the drivers. This file is located in /bootbank/oem.tgz. I booted with a rescue disk, mounted the
root partition and copied the oem.tgz to another machine. THere i modified it using the same procedures as described in [5] and copied it back.



XBMC, Take two

So, i decided to wait with Dharma, and take another shot at the current XBMC live

Install XBMC Live

apt-get install vim python-software-properties pkg-config
add-apt-repository ppa:team-xbmc-svn/ppa
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get install linux-generic linux-headers-generic linux-image-generic xbmc xbmc-bin xbmc-data xbmc-live xbmc-skin-confluence xbmc-standalone
chmod +x
Tagged as: , , 1 Comment


Setting up a new nagios-solution at work, I am using a tool called check_mk. Together with some php config generation script, I am automaticly discovering new devices and services.
check_mk is a rather new app, check it out!


Hardboot linux machine from console

Pretty handy when my server hangs on umounting a drive:

echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger

Filed under: Linux No Comments