NSCC

NAME
SYNOPSIS
DESCRIPTION
USAGE
CONFIGURATION FILE SYNTAX
SEE ALSO
BUGS
AUTHOR

NAME

nscc - NetSaint Configuration Compiler

SYNOPSIS

nscc [-help] file

DESCRIPTION

NetSaint is a powerful, flexible, and efficient monitoring system, capable of tracking a large number hosts and services while using minimal resources and providing a convenient notification system. Unfortunately, it has an unpleasant, verbose configuration file syntax.
Other contributed configuration tools have effective interfaces for controlling the monitoring of individual systems. However, they use web interfaces and are not as convenient for controlling NetSaint in an environment with a large number of identically configured machines.
Nscc attempts to rectify this situation by providing a convenient way of configuring NetSaint based on text templates and external commands which provide the necessary information about hosts. However, as it stands now, nscc does not permit the full flexibility of NetSaint.

USAGE

Nscc reads the configuration file provided on the command line and prints the resulting NetSaint configuration file on standard output.
-help
Prints a usage message.

CONFIGURATION FILE SYNTAX

Since NetSaint's operation is service-oriented, the format of the nscc file is also service oriented. A service declaration provides the information NetSaint needs to check the service, as well as the host or hosts running the service (and the class to which those hosts belong). The hostclass then provides the information necessary to monitor the hosts.
Information which may change frequently, such as the hosts in a hostclass and the parents of hosts (describing network topology) is read from external commands.
Comments begin with "#" and continue to the end of the line.
The configuration file consists of a sequence of declarations. The declarations describe timeperiods, commands, services, contacts, and hostclasses. Most of the elements of the declarations have corresponding parts in the NetSaint configuration file syntax. For more information on how these elemnts are used by NetSaint, see the NetSaint documentation.
Three base elements of the syntax are identifiers, numbers, and strings. An identifier is a letter followed by any number (including zero) of letters, numbers, hyphens, and underscores. A number is one or more digits. A string is any text (including newlines) delimited by quotation marks.
Internal quotation marks can be protected by preceeding them with backslashes.
Any internal newlines protected by backslashes will be replaced by spaces.
Unprotected internal newlines will be replaced by "n".
Service
The syntax of a service is:
service id [ string ] {
  [ service-definition ; ] ...
}
The id provides a name for the service and the string provides a comment describing the service. A service-definition is one of:
check id / number
The check definition gives the timeperiod and frequency (in minutes) that the service is checked.
retry number / number
The retry definition gives the number of retry attempts and their interval.
contact ids : id / number
The contact definition shows a comma-separated list of contact names and the period and interval for notifying them.
handler id
The handler definition gives the name of a handler command.
command id [ ! string ] ...
The name of the command for checking the service, with an optional, exclamation point-seprated list of options.
command string
A command line for checking the service.
critical
warning
recovery
volatile
Flags describing the service events. For specific information, see the NetSaint documentation.
hostclass id string
The name of a hostclass and the host running the service. If the first character of the string is "|", the remainder of the string is treated as a shell command, and a list of hosts is read from the standard output of the command, one host per line.
Hostclass
The syntax of a hostclass is:
hostclass id [ string ] {
  [ hostclass-definition ; ] ...
}
The id provides a name for the hostclass and the string provides a comment describing the hostclass. A hostclass-definition is one of:
parent string
The NetSaint parent (network connectivity-wise) of the hosts in the hostclass. This definition is mutually exclusive with a parentcommand (and significantly less useful).
parentcommand string
A command returning the parents of the hosts in the hostclass. The command is run once for each host, with the host name on the command line, and a list of parents, one per line, is read from the standard output. Parentcommand is mutually exclusive with parent.
command id
The command used to check the hosts.
retry number
The number of retry attempts.
handler id
The handler for host down events.
unreachable
down
recovery
Flags describing host events. See the NetSaint documentation.
contact ids : id / number
A comma-separated list of contacts, the period during which to contact them, and the interval between contact attempts.
Timeperiod
The syntax for a timeperiod is:
timeperiod id [ string ] {
  [ days hours; ] ...
}
The id provides a name for the timeperiod, which is used in other declarations. The string is a comment describing the timeperiod. days is a comma-separated list of weekday names (sunday, monday, tuesday, wednesday, thursday, friday, and saturday); hours is a comma-separated list of time ranges (HH:MM-HH:MM).
Command
The syntax for a command is:
command id [ string ] ;
The id provides a name for the command, used by other declarations. The string provides the text of the command.
Contact
The syntax of a contact is:
contact id [ string ] {
  [ contact-definition ; ] ...
}
The id provides a name for the contact and the string provides a comment describing the contact. A contact-definition is one of:
email string
The address (or more generally, contact information string; see the NetSaint documentation) used to notify the contact.
pager string
A secondary address (or contact information string) used to notify the contact.
host ids : id [ host-event [, host-event ] ... ]
A comma-separated list of commands used to notify the contact about host events, the period during which to notify the contact, and the host events to notify the contact about. The available host-events are down, recovery, and unreachable.
service ids : id [ serv-event [, serv-event ] ... ]
A comma-separated list of commands used to notify the contact about service events, the period, and the service events the contact is interested in. The available serv-flags are critical, warning, and recovery.

SEE ALSO

This man page assumes you are familiar with the NetSaint documentation and NetSaint's operation.

BUGS

Most of the declarations syntactically allow duplicate sub-definitions, however the behavior is undefined.
A host mentioned in several hostclass statements in several service declarations must always have the same hostclass name in all, at the risk of undefined behavior.
This page does not document the default values. They are intended to do something useful.
Nscc handles timeperiods, commands, services, contacts, and hostclasses, and it assumes it is the only thing handling them. This is not terribly flexible.
Nagios's newer template-based configuration is not produced.
The fact that nscc's configuration syntax is not as flexible as NetSaint's is not a bug.

AUTHOR

Tommy M. McGuire <mcguire@cs.utexas.edu> wrote this.