nb.cfg(5) | NodeBrain Administrator Guide
Version 0.9.02 - August 2014 |
nb.cfg(5) |
NAME | SYNOPSIS | DESCRIPTION | COMMANDS | ENVIRONMENT | DIAGNOSTICS | HISTORY | BUGS | AUTHOR | SEE ALSO
nb.cfg - NodeBrain Configuration Files |
~/.nb/user.nb
.nb/caboodle.nb *.nb |
This primer describes basic NodeBrain configuration concepts. For a
more complete understanding of individual commands, refer to the
NodeBrain Language Reference available at http://www.nodebrain.org.
We call a NodeBrain application directory a caboodle. NodeBrain does not dictate the structure of a caboodle, but we assume it is organized logically as a set of sub-directories containing rule files, event collector servants, alarm adapters, log files, etc. It is best to make file references relative to a caboodle's root directory so components can be easily used in multiple caboodles without modification. When nb(1) starts, it first processes an optional user profile ~/.nb/user.nb, if found. It then processes an optional caboodle profile .nb/caboodle.nb, if found. The syntax of these files is the same as any *.nb rule file. They are only special because they are processed without explicit reference, and they are not listed when processed. Other NodeBrain *.nb rule files are processed when explicitly referenced as an executable script, a file argument, or included by another rule file. The user profile should contain declarations and definitions you always want to be available when executing nb(1) as a given user. The caboodle profile should contain declarations and definitions you want to be available when executing nb(1) within a given caboodle. NodeBrain doesn't care how other *.nb files are constructed, organized and managed. However, we assume that a caboodle is structured in some way and perhaps supported by a set of tools that simplify rule development and maintenance. |
Examples of commands you will want to understand for basic NodeBrain configuration are introduced here.
Identities are typically declared in ~/.nb/user.nb or .nb/caboodle.nb files because they are needed by multiple NodeBrain scripts in most applications.
Identities are used by nodes that support communication with other applications or other instances of NodeBrain. Authentication is the responsibility of any node module providing communication with external entities. Here's an example of a "peer.client" node that uses an identity for authentication and authorization. Refer to the Peer NodeBrain Module manual for more information.
define node node peer.client("identity@host:port"); Use the SOURCE or %INCLUDE command to include commands from another file. This helps to organize rules into logical sets for maintenance and reuse.
source file,[assertions];
The nb.syn(5) man page provides more information on command syntax. You should at least scan it if you plan to do anything with NodeBrain application rule files (*.nb). |
Some of the C functions nb
calls (e.g. for loading dynamic modules) are influenced by environment variables in
ways we assume you can figure out for your environment.
|
When errors are found in configuration files, NodeBrain displays
an error message. Because user and caboodle profile
lines are not displayed, it may be difficult to identify the line causing the error.
To work around this problem you can rename your profile and execute it
under the new name.
|
The ~/.nb/user.nb file was introduced with NodeBrain Protocol (NBP) client authentication in March, 2000, although it was originally called private.nb and renamed in version 0.7.1. This file is now more general and no longer associated with NBP which has moved to the Peer module.
The .nb/caboodle.nb file was introduced in version 0.7.1 in July, 2008. |
There are no known bugs in the processing of configuration files. Please report bugs by linking to the project page from the home page, http://www.nodebrain.org, or send email to <bugs@nodebrain.org>. |
Ed Trettevik <eat@nodebrain.org> |
nodebrain(7), nb(1), nb.syn(5), nb.mod(7), nb.lib(3) |
NodeBrain 0.9.02 | August 2014 | nb.cfg(5) |