nagiohdear

0.0.2 • Public • Published

Nagiohdear

Rudimentary config parser/generator for Nagios.

Build Status:
master: Build Status
develop: Build Status

Overview

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.

Documentation

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

Testing

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

Example Usage

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);
    });

License

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

Contact

  • GitHub (http://github.com/deoxxa)
  • Twitter (http://twitter.com/deoxxa)
  • Email (deoxxa@fknsrs.biz)

Readme

Keywords

none

Package Sidebar

Install

npm i nagiohdear

Weekly Downloads

1

Version

0.0.2

License

BSD

Last publish

Collaborators

  • deoxxa