OSSEC: building an OpenBSD package

OSSEC is an Open Source Host-based Intrusion Detection System that performs log analysis, file integrity checking, policy monitoring, rootkit detection, real-time alerting and active response. It runs on most operating systems, including Linux, MacOS, Solaris, HP-UX, AIX and OpenBSD. There is no OSSEC package available on the OSSEC website or in the OpenBSDs ports repositry, […]

Perl: Archive E-Mails in an IMAP Folder

IMAP folders are really because you can have your e-mails synchronized on multiple devices, without losing e-mails across your devices when retrieving your new e-mails. IMAP folders actually also aren’t that cool because e-mails are usually never deleted or even archived. Having millions of e-mails can make some e-mail readers on certain devices really slow. […]

Skytools 2.x patch for Postgresql 9.3.5

Skytools 2.x compiles perfectly with Postgresql 9.3.5, but when you try to ‘install’ the ticker with the pgqadm.py command, you will receive a strange error. After searching around on the Internet, it seems that when you compile software with Postgresql 9.3.5, you will need to add an extra library when using ”GETSTRUCT”. The error message: […]

Perl: SSL Communication in web applications

The following demonstrates how to create a strict SSL communication between client and server, using HTTP. This setup could used when creating a web API which requires strong encryption and only allows clients which have a properly signed certificate. The Apache configuration in the below example will actually require 2 web servers: one proxy host, […]

Monitor running processes with Perl

Update: This article is updated thanks to Colin Keith his excellent comment. I was extremely inspired by it Maintaining a large number of servers cannot be done without proper programming skills. Each good system administrator must therefor make sure he knows how to automate his daily works. Although many many programming languages exist, most persons […]

Postgresql: Monitor unused indexes

Working on large database systems, with many tables and many indexes, it is easy to loose the overview on what is actually being used and what is just consuming unwanted disk space. If indexes are not closely monitored, they could end up using undesired space and moreover, they will consume unnecessary CPU cycles. Statistics about […]

Postgresql 9.3: Creating an index on a JSON attribute

Recently I’ve discovered some very interesting new features in the PostgreSQL 9.3 database. First of all, a new data type has been introduced: JSON. Together with this new data type, new functions were also introduced. These new features now simply for instance saving web forms in your Postgresql database. Or actually any kind of dynamic […]