Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
138 lines (135 sloc) 4 KB
.TH nad 8 "March 20, 2011" "version 1.0"
nad \- node\-agent daemon
.B nad
[\-h] [\-i] [\-c configdir] [\-p port] [\-s sslport] [\-v]
The node\-agent daemon provides a simple mechanism to expose
systems and application metrics to external onlookers. It
inventories all executable programs in
.I configdir
and executes them upon external request (via http or https)
and returns the results in JSON format.
It is recommended that executable checks be stored in subdirectories
of the
.I configdir.
Because those subdirectories are not scanned, those
scripts will not be executed with an additional step. Those scripts
that the administrator wishes activated can be soft linked directly
.I configdir.
No arguments are accepted from the onlooker and thus no special
precautions must be taken handling/validating/sanitizing arguments.
The daemon provides several locations for information:
/ and /run
cause execution and consolidation of all scripts and their output.
causes the executation of a single script (minus the extension on
script if it exists)
returns the current active inventory of scripts.
Display the help text.
Display an inventory of plugins.
\-c <configdir>
Sets the configuration directory (home of scripts and SSL credentials).
\-p <port>
Sets the port on which the HTTP server shall listen. (default 2609).
\-s <sslport>
Sets the port on which the HTTPS server shall listen. If this option is
.I na.key
.I na.crt
must be present in the
.I configdir.
Causes the daemon to validate the connecting client's certificate against
the provided certificate authorities. A list of CA certificates must exist
in the
file in the
.I configdir.
The executable programs that you place in the
.I configdir
must produce metrics to standard output. They may produce JSON output.
Alternatively, the may produce simple tab-separated metric output that
adheres to the folling format.
.I metric_name metric_type
Indicating the the metric specified has a null value.
.I metric_name metric_type value
Indicating the the metric specified has
.I value
.SS The metric_type
.B i
\- indicating a signed 32bit integer value,
.B I
\- indicating an unsigned 32bit integer value,
.B l
\- indicating a signed 64bit integer value,
.B L
\- indicating an unsigned 64bit integer value,
.B n
\- indicating a value to be represented as a double, or
.B s
\- indicating the the value is a string.
.SS Control Information
You may provide control information in a line starting with a #
character and followed by a JSON block. Currently,
is the only parameter accepted and the argument is interpretted as
seconds. For example, to indicate that the script should be aborted if
a set of output metrics cannot be completed in 1.12 seconds:
# { "timeout": 1.12 }
.SS Continuous Output
Continuous output is supported by long-running scripts. After a set
of metrics is emitted to standard output, emit a single empty line.
nad will accept the previous metrics into a result set and return them
on the next request for data. The program can then pause for some
ad-hoc amount of time and produce another set of metrics followed by
a blank line. This mode can be useful for collectin information such
as mpstat or vmstat information.
Note, that in most cases if you can get raw accumulated counters
(instead of averages over some amount of time), that the output can
be more useful to monitoring applications as a derivative can be
applied after the fact without the risk of data loss.
.SS JSON format
If you elect to product JSON formatted output in your programs, you
must provide a JSON object whose keys have values that look so:
{ "_type": <metric_type>, "_value": "yourvalue" }
No known bugs, report bugs to Theo Schlossnagle <>
Theo Schlossnagle (
Copyright (c) 2011, OmniTI Computer Consulting, Inc.