Monitoring the Apache web server with Cfengine 3

During the last weeks I received a lot of positive feedback on my blog posts and the Cfengine 3 code snippets so I started to post them on Twitter. Especially my little article about monitoring the CPU load with Cfengine 3 gained some attention there, that is why I am very motivated to dive in […]... Read More

Setting ACLs with the community version of Cfengine 3

As you might already know the community version of Cfengine 3 is not able to set ACLs the “Cfengine 3 way”. So when you are using the community edition of Cfengine 3 you have to find another way of doing it.. such as running shell commands out of the Cfengine 3 scripts. I hope the […]... Read More

Deleting old files with Cfengine 3

Cfengine 3 can be used to tidy your systems up on regular basis. Depending on the time, day of the week of the file extensions you are able to define how Cfengine 3 shall delete old and obsolete files. In today’s example a code snippet is shown which deletes all .gz files in /var/log which […]... Read More

Monitoring the CPU load with Cfengine 3

The creators of Cfengine 3 claim that their configuration management tool is able to perform a basic monitoring of important states, such as the CPU load. And indeed, with the help of Cfengine 3 you possibly get rid of some monitoring checks and therefore relive your monitoring system. This is doable because cf-monitord runs in […]... Read More

Using environment variables in Cfengine 3

Every Cfengine 2 script of my company contains environment variables. They are essential for configuring most of the services running on the different servers. For porting those scripts to Cfengine 3 one day I wanted to know how to make use of environment variables in the latest version of the configuration management tool. Well, the […]... Read More

Simple reporting with Cfengine 3

Keeping yourself up to date about what is happening on your Linux systems can be quite time-consuming. Many sys admins therefore use a little trick: Since the most important logs contain all the informative stuff, many admins install logcheck which reports unusual happenings every 60 minutes via mail. In this way, the admins stay informed […]... Read More

Mounting NFS-Shares with Cfengine 3

One often used service is NFS. The ability of mounting a file system over the network is very handy and even I use it regularly in my projects. Now imagine a scenario where you manage the configuration of your servers with Cfengine 3 and you have a central file server with NFS running on it. […]... Read More

Installing packages with Cfengine 3

For some strange reason I still have the motivation to look at the “new” Cfengine 3. While I covered editing files and checking for running services in the last posts, I will try to do some very basic package management with Cfengine 3 today. Writing the script body common control { version => "1.0"; inputs […]... Read More

Cfengine3: Check for running services

In the last post about Cfengine 3 we talked about a simple script which creates a file and writes something into it. Today, we will create a simple example script which checks if two specified services are running. Writing the script Connect to your Linux box and create the following file: /var/lib/cfengine3/inputs/example2.cf body common control […]... Read More

Taking a quick look at the configuration management system Cfengine 3

I have been working with Cfengine 2 for more than one and a half year now and decided to take a look at the new version: Cfengine 3. What the hell is Cfengine? Cfengine can be considered as a free management tool for servers and clients. With the help of an agent and configuration scripts, […]... Read More