mrt 032016
 

When you use rrdtool, it can happen that you first create your databases, then collect a whole bunch of data and decide later you want more accuracy/longer periods.
Especially when using zenoss (the monitoring solution I mostly work with at Kangaroot), which uses very conservative RRD settings by default (i.e. 5-minute intervals for only the first 50 hours). Zenoss provides a way for you to change the way RRD’s are created, but not to apply those settings to already existing RRD files, which I found out *after* I started monitoring everything ūüėČ

rrdresize can help: it (just) adds or removes locations for rows.
In my case it was not good enough because zenoss uses a variety of resolutions (step sizes), and so if you add rows to all of them rrdtool – when graphing – will often pick a higher resolution RRA that just had rows added (and hence contain unknown values), even though you have the values, albeit at a lower resolution.

So you need a way to update all rows in the RRA’s.
I found a perl tool that does just that. (I think, I didn’t study all details). So, you install that in your /home/zenoss for instance and then you run the following script, which creates new rrd files with the new settings and uses the perl script to copy all data into it.

#!/bin/sh
# invoke me like this:
# find /usr/local/zenoss/zenoss/perf/ -name '*.rrd' -exec ./newrrd.sh {} \; >> newrrd-logfile

file=$1
backupdir=/home/zenoss/rrds-backup
newdir=/home/zenoss/rrds-new
[ -d "$backupdir" ] || mkdir -p "$backupdir" || exit 2
[ -d "$newdir"    ] || mkdir -p "$newdir" || exit 2
[ -f "$file"      ] || exit 3

echo "Processing $file .."
base="`basename "$file"`"
[ ! -f "$backupdir/$base" ] || mv "$backupdir/$base" "$backupdir/$base".old || exit 4
cp "$file" "$backupdir/$base"
cd "$newdir" && rrdtool create "$base" \
--step '300' \
--start '1230768000' \
'DS:ds0:GAUGE:900:U:U' \
'RRA:AVERAGE:0.5:1:122640' \
'RRA:AVERAGE:0.5:6:55536' \
'RRA:MAX:0.5:6:55536'
/home/zenoss/rrdremove.pl "$backupdir/$base" "$base" | grep -v 2009 # hide some output
cp "$base" "$file" || exit 5
echo "Done"

Oh and btw, rrdwizard is a cool webapp when you’re feeling too lazy/have forgotten how to write rrdtool commands

okt 102014
 

This HowTo describes how to install the transcoding tools under Ubuntu 14.04
For Open Source Transcoding  you have to install the transcoding tools (MPlayer, mencoder, ffmpeg, flvtool2, faststart). As the Ubuntu packages do not support all required formats, we have to compile the required tools.

In most cases please just copy & paste the code into your shell and execute the commands as root.
Continue reading »

jun 222014
 

Het gaat om een aantal files: 
master.cf, main.cf, relay, transport

Allereerst in master.cf een regel toegevoegd:
hold unix – – n – – smtp

Dan voeg je in main.cf de juiste config regels in:
relay_domains = hash:/etc/postfix/relay
transport_maps = hash:/etc/postfix/transport

Vervolgens copieer je, voor zover hij niet bestaan, de sample-transport naar transport.
Continue reading »

mei 292014
 

Hoe vervang ik een string met een andere string in alle tekst bestanden in een map onder Linux?
Bijvoorbeeld; De ~/foo directory heeft 100 tekstbestanden en ik zou graag alle xyz strings willen vervangen door abc.
Dit kan met het commando sed. Dit staat voor stream editor.  Dit commando is ontworpen om woorden reeksen te zoeken en deze te vervangen.

Continue reading »

mrt 312014
 

Bij het herstarten van Apache verschijnt de error: NameVirtualHost *:80 has no VirtualHosts

Dit probleem ontstaat als meerdere keren NameVirtualHost is gedefinieerd;

Somewhere in your configuration, probably in the Apache default configuration file (I think /etc/apache2/httpd.conf in Ubuntu? someone can correct me in the comments), is a line that looks like:

Continue reading »

jan 072014
 

Mocht er een fout staan in een configuratie van een applicatie waardoor de logfiles ineens heel snel groeien is er een mogelijkheid om handmatig de logfiles te roteren.

My server recently ran out of space. The culprit was logrotate.d, which had been failing for a couple of months, causing Apache’s access logs to get out of control.
This command will show you why logrotate.d is failing:

logrotate -vf /etc/logrotate.conf 

In my case, an old virtual host had been removed without removing the corresponding logrotate config file. On Debian Linux, logrotate stores its config files at:

/etc/logrotate.d/<virtualhost_name>.conf
dec 092013
 

I remember a while back migrating someone’s email from one ISP to another using Thunderbird ! Well, duh, I just found a tool that seems to be a bit underrated, Imapcopy. There are many tools out there, but this one seemed simple yet efficient. However, for some odd reason it wasn’t clear to me at first how simple and easy this was to use. Continue reading »

nov 062013
 

Over hoe VSFTP moet worden geinstalleerd is veel te vinden op internet.
Echter in combinatie met  pam_pwdfile authenticatie niet.

In deze tutorial ga ik VSFTP installeren door middel van Pam_pwdfile authenticatie.
Dit laatste betekend dat ik ‘virtuele’ gebruikers ga aanmaken die kunnen inloggen. Het voordeel hiervan is dat deze gebruikers geen SSH of andere toegang kunnen verkrijgen tot het systeem.

Continue reading »