node package manager


Nagios config file parser and generator


Rudimentary config parser/generator for Nagios.

Build Status:

Nagiohdear is a very naiive config parser and generator for Nagios config files. It handles only string types and doesn't know how to handle malformed or weird files.

Take a look at docs/. There's some HTML lumps in there generated with docco. These lumps are also hosted on github.

I'm using vows for testing. The tests are in the "test" directory.

This code is also in example.js.

    #!/usr/bin/env node
    var fs = require("fs"),
        nagiohdear = require("./index");
    fs.readFile("./config.cfg", function(err, data) {
      var config_original = data.toString();
      var config_parsed = nagiohdear.parse(config_original);
      console.log(JSON.stringify(config_parsed, null, 2));
      var config_generated = nagiohdear.generate(config_parsed);

3-clause BSD. A copy is included with the source.

  • GitHub (
  • Twitter (
  • Email (