Background

My son got the amazing game Minecraft as a birthday present. Of course I think I should provide the service to him and his friends to have a couple of minecraftservers to be able to play together.

Soon it became business critical and I started to think about how to monitor that the Minecraft server is up and running. After searchin Internet I did not find anything that worked so I decided to write my own.

Prereq

I'm using the possibility to connect to the Rconn inteface at the Minecraftserver so it needs to be ebabled. Normaly by adding to Minecraft server.properties:

rcon.password=fjollboll
rcon.port=25578

I'm running the plugin on a vanilla Centos 6.3 box, and a perl CPAN module needs to be installed. Simply run the following command to install:

Monitor the server

The easiest way to monitor that an instance of Minecraft server is running is to using check_tcp and the port defined for the server. However I read on some forums that the Minecraft server could hang and the tcp port still respond. So I wrote a plugin that connects to the Minecraft Rconn interface.

One Response to “Monitor Minecraft server with op5 Monitor or Nagios”

Awesome bud, thanks for this! Works like a charm on a vanilla server but probably needs a few tweaks to work well with bukkit for us who use mods on our servers.
You should add a few checks on the server-logs as well as there's a few errors good to know about when running these business critical systems as we all know to well what happens if they don't work 100%…
I've set up check_logfiles from our friends at consol: http://labs.consol.de/lang/en/nagios/check_logfiles/ specifying a simple search like this: