Setup check_mk

Check_MK is a monitoring solution which is originally based on Nagios. It has been extended with a nice web gui including a lot of new features which simplify the setup of a monitoring system. It is available as Enterprise edition and as RAW (Open Source) edition.

There is a limited english documentation available. https://mathias-kettner.de/checkmk.html

Steps to install and configure Check_MK on CentOS7:

Download CentOS7 image (minimal is sufficient) http://isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-1511.iso

Install Centos following the standard documention. After you have successfull installed Centos login to the system using SSH.

ssh root@centos7

First install all available updates.

yum update

Second some packages are required to be able to install check_mk successfully.

yum -y install epel-release
yum makecache all
yum -y install php-mcrypt

Download fping (http://pkgs.repoforge.org/fping/?C=M;O=D) and install it:

cd /root
wget http://pkgs.repoforge.org/fping/fping-3.10-1.el7.rf.x86_64.rpm
rpm -i fping*.rpm

Furthermore it is required to change SELINUX.

vi /etc/sysconfig/selinux
# This file controls the state of SELinux on 

VMware tools repository

You can install the VMware tools using the Wizzard in the vSphere client but this is not the best solution. VMware is offering an repository which you can use to install the VMware tools using your package manager.

URL of the repository: http://packages.vmware.com/tools/esx/5.5/index.html

Example for Redhat 6 64bit running on ESXi 5.5:


cd /etc/yum.repos.d/

vi VMware-Tools.repo
[vmware-tools]

name=VMware Tools
baseurl=http://packages.vmware.com/tools/esx/5.5/rhel6/x86_64
enabled=1
gpgcheck=1
gpgkey=http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub

Collect ESXi stats with powershell and send it to Graphite server

I was not quite happy with the statistics from the vCenter. It is not possible to get an overview overall my ESXi servers. 🙁 Someone pointed me to the tool Graphite that this is a cool solution to visualize such kind of statistics. So I decided to give it a try.

I created and virtual machine running Centos and Graphite as target for my collected statistics. I will post an How to later.

Furthermore I had to create an powershell script which collects the stats of each ESXi in my cluster, transform it a graphite compatible format and transfer it to the graphite server.

#vCenter settings
$vCenter = "VCENTER-IP"
$user = "USERNAME"
$password = "PASSWORD"
$cluster = "YOUR-CLUSTER"
#Graphite server 
$remoteHost = "GRAPHITE-SERVER-IP"

#Socket to send results to Graphite server	 
$socket = new-object System.Net.Sockets.TcpClient($remoteHost, 2003)
$stream = $socket.GetStream()
$writer = new-object System.IO.StreamWriter $stream

Write-Host "Connected"
#Connect to vCenter
Connect-VIServer -Server 

OpenSource RedHat Satellite Server – Spacewalk

I found this software during my search for a management solution for a virtual appliance farm running hundreds of CentOS based virtual machines. As CentOS is binary compatible to RedHat it makes sense to use a RedHat satellite server equivalent for software management.

Spacewalk is an open source (GPLv2) Linux systems management solution. It is the upstream community project from which the Red Hat Network Satellite product is derived.

What Can Spacewalk Do?

Spacewalk is an open source (GPLv2) Linux systems management solution that allows you to:

* Inventory your systems (hardware and software information)
* Install and update software on your systems
* Collect and distribute your custom software packages into manageable groups
* Provision (kickstart) your systems
* Manage and deploy configuration files to your systems
* Monitor your systems
* Provision and start/stop/configure virtual guests
* Distribute content across multiple geographical sites in an efficient manner.

Link