runnane Everything that matters ++

4Jun/140

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 "http://files.omdistro.org/nightly/2014-06-01/omd-1.11.20140601.wheezy.i386.deb"
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 (http://mathias-kettner.de/checkmk_wato_nagvis_auth.html). 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

Add:

[global]
authorisationmodule="CoreAuthorisationModMultisite"
authorisation_multisite_file="/opt/omd/sites/<sitename>/var/check_mk/wato/auth/auth.php"

 

The new OMD packages has native support for ESXi host monitoring (and automatic mapping VM<->Hosts). See http://mathias-kettner.de/checkmk_vsphere.html. 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: http://notes.benv.junerules.com/lmsensors/

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) http://exchange.check-mk.org/index.php?option=com_remository&Itemid=53&func=startdown&id=114

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

2Jun/140

Monitoring Raspberry Pi fw versions with check_mk

Modified http://exchange.nagios.org/directory/Plugins/Hardware/Others/check_rpi_firmware/details to work with my omd/check_mk setup for monitoring firmware versions on rpi farm.

Code:

#/bin/bash
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

Commands:

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

11Mar/100

Nagios

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!