Posts by 'Dan'


Dockerized Gogs git server and alpine postgres in 20 minutes or less

How I pushed this blog to a dockerized gogs server.


How to log php requests to logstash in json

With a little help from rastro in the #logstash IRC channel I got php to to log in to json and logstash to parse out the timestamps. Like this:

{ "mem": 786432, "sec": 0.001, "cpu": 0, "why": "/test.php?test=4", "what": "/var/www/test.php", "who": "-", "when": "1454100567" }

Set …


Compile ossec with libzmq support

I've had to rebuild ossec-hids with zeromq twice now on two different architechtures - Ubuntu 10.04 32bit and 14.04 64bit.

I figured I ought to at least reformat my ~/.bash_history file and call it a blog post.

Install dependencies

apt-get install \
  build-essential autoconf automake autogen \
  libtool pkg-config libssl-dev

Build …


Mirroring ppa repos with reprepro and fixing Not Invented Here

Use reprepro to mirror 3rd party repos


My journey into the SaltMine to keep nagios fed with check_mk.

Periodically mine check_mk_agent output on minions and use it for icinga/nagios checks.


pxz - Parallelized LZMA compression

pxz - Parallel LZMA compression


UNIX Comfort Food

Reference dotfiles for working in new environments


Fix automysqlbackup warnings about PERFORMANCE INFORMATION and EVENTS

Set it and forget it mysql backups. Just remember to test recovery.


Use flock to prevent cron from rerunning shell scripts

An example of using the flock(1) command to wrap shell scripts in an advisory lock.


Reasons I love check_mk: psperf

After rolling out openvpn across our infrastructure I need to know how it is behaving, if I can trust it for production workflows, logging, etc.


inventory_processes_perf += [
    ( ['!ping'], ALL_HOSTS, "openvpn", "/usr/sbin/openvpn", GRAB_USER, 1, 1, 1, 1),

That one line of configuration appended to inventory_process_perf[] gives us:

  • Automatic inventory …