Thursday, 20 November 2014

MapGuide tidbits: Log monitoring with

If the previous MapGuide log monitoring solution don't cut it for you (especially on Linux), here's another one you can try. is a real-time log monitoring solution that runs in your web browser. It is powered by node.js and

Just a note before we dive in, this post is geared towards Linux-specific installations of MapGuide. This may or may not work for Windows. The install instructions assume Linux, so we're rolling with that.

To install you will first have to install node.js, there's a bajillion different links out there on how to install node.js, so here's one for:

Once node is installed, you can install the package via npm (on Ubuntu you'll have to elevate that command with sudo):

npm install -g --user "[username that will run]"

Then start the server.

Then create a harvester.conf in your ~/ directory that defines what log files to monitor. Here's a basic example configured for MapGuide and Apache log monitoring.

exports.config = {
    nodeName: "mapguide_server",
    logStreams: {
      apache: [
      mapguide_access: [
      mapguide_error: [
    server: {
      host: '',
      port: 28777

Now start the log harvester.

Now browse to http://localhost:28778 and watch your MapGuide log files in real time.

NOTE: The above install instructions were pilfered from the website itself, however I found the global install option to be problematic on my Ubuntu test VM. For some reason it always insists on building the native modules as the "root" user and not the user I designated from the npm install command. So I went for a local install instead, which means the following commands have been changed to the following:

  • Installing npm install
  • Running server: ~/node_modules/
  • Running harvester: ~/node_modules/

No comments: