Rudimentary config parser/generator for Nagios.
Build Status:
master:
develop:
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();
console.log(config_original);
var config_parsed = nagiohdear.parse(config_original);
console.log(JSON.stringify(config_parsed, null, 2));
var config_generated = nagiohdear.generate(config_parsed);
console.log(config_generated);
});
3-clause BSD. A copy is included with the source.
- GitHub (http://github.com/deoxxa)
- Twitter (http://twitter.com/deoxxa)
- Email (deoxxa@fknsrs.biz)