LXC Monitoring

Submitted by lennart on Mon, 07/11/2011 - 23:06

LXC Monitoring collects cpu and memory statistics for several Linux Containers, and creates pretty charts with it. Although it is intended for LXC containers, it can be used to monitor any type of cgroup. Optionally it can be configured to send a daily/weekly/... mail with those charts.

There are 2 python script to do the job. The data poller script will read data from the /cgroup partition at regular intervals and stores the data in an sqlite dbfile. Then 2nd script, create_charts.py, combines the collected data into a nice chart, and send me a mail with them.

LXC installation on Ubuntu Server 11.04

Submitted by lennart on Thu, 06/30/2011 - 20:48

"LinuX Containers (LXC) provide lightweight virtualization that lets you isolate processes and resources without the need to provide instruction interpretation mechanisms and other complexities of full virtualization."

In this tutorial I provide step by step instructions to install LXC on an Ubuntu Natty server.

Basic *nix knowledge is assumed though.

Keeping real user IP in Java web apps behind Nginx proxy

Submitted by lennart on Wed, 07/06/2011 - 15:51

When there is an Nginx proxy in front of your tomcat (or other app server), request.getRemoteAddr() or request.getRemoteHost() will return the IP of the Nginx server. And this is obviously not what we want.

To get this right, an extra HTTP Header will have to be added in Nginx, and our web app will have to be told to use it.

Gitorious on Ubuntu Natty

Submitted by lennart on Fri, 07/01/2011 - 21:26

Installing gitorious wasn't as straightforward as I hoped, so here's another howto. It's a slightly modified and updated version of Christian Johansen's blog.

The main problem seemed to be Ruby versions, so my advice is to stick to the versions I mention.

I did not install the main version of Gitorious, but a fork called "yousource", allowing me to make projects private, only readable by project contributors.

Most commands assume you're the root user.

OpenSuSE LXC container inside Ubuntu

Submitted by lennart on Thu, 06/30/2011 - 23:56

Because I didn't get iFolder to run on Ubuntu directly, I installed an OpenSuSE LXC container and installed iFolder in that one.

This howto describes how to install OpenSuSE 11.3 inside an LXC container on an Ubuntu Natty Server. At the time of writing, OpenSuSE 11.4 is available, but iFolder isn't stable on it yet.

Basic *nix knowledge is assumed, I'm not going to tell you how to open vi (or whatever editor you prefer).

Subscribe to Lacerta RSS