Skip to content

deoxxa/nagiohdear

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Rudimentary config parser/generator for Nagios

Resources

License

Stars

Watchers

Forks

Packages

No packages published