SURVIVOR: instance.cf
About `instance.cf` Instances About Instances Dependencies Instance Stanza Keywords Examples
About `instance.cf`
syntax | Whitespace is generally ignored, unless otherwise noted. `boldface` denotes keywords. `[brackets]` denote optional keywords. Separators (`|`) denote mutually exclusive keywords. Comments begin with a `#` symbol, and may appear anywhere. Comments must be terminated with newlines.
         <name> : [a-zA-Z0-9\.+%@_-]+
`instance.cf` defines Instances, which allow for multiple concurrent configurations on the same server, for ease of maintenance, bureaucratic division, or fun. The expected location of this file is `/etc/survivor/instance.cf`. While some utilities allow an alternate location to be specified, it is generally advisable to use the default location.
Instances
syntax |
         instance <name> {
             configdir <name>
    	 statedir <name>
    	 historydir <name>
    	 [helpdir <name>]
    	 [tmpdir <name>]
    	 [allow archive]
    	 [allow root]
    	 [require comment]
         }
### About Instances An Instance defines a set of configuration files, a state directory, a history directory, a help directory, and some optional behaviors. This allows separate configurations to be run concurrently, for example to allow two groups within an organization to separately maintain their own configurations. Different parts of the package handle Instances differently. For example, one scheduler process handles exactly one Instance. However, the web interface will determine which Instances are available and allow the user to select among them. In general, if there is only one Instance defined in `instance.cf`, that Instance will be selected automatically. If more than one Instance is defined, the values for `configdir`, `statedir`, and `historydir` must be different in each Instance, or data corruption and lossage will result. ### Dependencies The history directory must exist before the scheduler is started. See below for details. The state directory must exist before the scheduler is started. See below for details. ### Instance Stanza Keywords
allow archive | Enable the command line `archive` command for this Instance.
allow root | Permit the root user to run the command line interface.
configdir <name> | Specify the directory containing the configuration files for this Instance.
helpdir <name> | The directory where help files to be transmitted by alert modules are stored. File names specified in check definitions are appended to this directory name and passed to format modules, which may decide what to do with the filename.
historydir <name> | The directory where the history records are written for the hosts and services defined in this Instance. This directory must exist before the scheduler starts, and must be writeable by the install user.
      # mkdir -m 750 $HISTORYDIR
      # chown $INSTUSER $HISTORYDIR
      # chgrp $INSTGROUP $HISTORYDIR
instance <name> | Define a new Instance.
require comment | Require comments for command line operations that accept them.
statedir <name> | The directory where the state files for the hosts and services defined in this Instance are maintained. This directory must exist before the scheduler starts, and must be writeable by the install user and by the install group.
      # mkdir -m 770 $STATEDIR
      # chown $INSTUSER $STATEDIR
      # chgrp $INSTGROUP $STATEDIR
tmpdir <name> | The directory where temporary files may be written by any component of the package. This directory must be writeable by the install user and by the install group. It is recommended that this directory be periodically cleaned out. If not specified, the default value of `/tmp` will be used. This is not suitable if the package is installed on a host accessible by non-trusted users.
1. ### Examples In this example, configuration files are stored in `/etc` and state and history are written under `/var`:
            instance default {
              configdir  /etc/survivor
              statedir   /var/survivor/state
              historydir /var/survivor/history
              helpdir    /etc/survivor/help
            }
2. In this example, files are written to a separate mount point, and the root user is permitted to use the command line interface:
            instance networks {
              configdir  /survivor/networks/config
              statedir   /survivor/networks/state
              historydir /survivor/networks/history
              helpdir    /etc/survivor/help
              allow root
            }
$Date: 2006/11/19 03:30:37 $ $Revision: 0.6 $ | keywords allow archive allow root configdir helpdir historydir instance require comment statedir tmpdir