Operations Guide
MCS Configuration File

The MCS configuration file must start with this line:

<?xml version="1.0" encoding="UTF-8" ?>

After that, the '<um-mcs>' element contains the rest of the configuration.

Here is a sample short configuration:

<?xml version="1.0" encoding="UTF-8" ?>
<um-mcs version="1.0">
<daemon>
<log type="file" frequency="daily" size="10" max-history="10"
compression="zip">MCS.log</log>
<pid-file>MCS.pid</pid-file>
</daemon>
<connector>
<type>sqlite</type>
<properties-file>/mcs/my_sqlite.properties</properties-file>
</connector>
<receiver-transport-opts>
<config-file>/mcs/mcs_transp.cfg</config-file>
</receiver-transport-opts>
</um-mcs>

Here is a sample "mcs_transp.cfg" file:

context default_interface "en0"
context resolver_unicast_daemon "en0"->10.1.2.3:12000
source transport tcp

This conforms to the Automatic Monitoring Sample.

Here is a sample "my_sqlite.properties" file:

sqlite_database_path=/mcs/ummon.db

When the daemon monitor is enabled, the first three lbm attribute option settings are recommended.


MCS Configuration Elements  <-



MCS Element "<um-mcs>"  <-

Container element which holds the MCS configuration. Also defines the version of the configuration format used by the file.

XML Attributes:

Attribute Description Valid Values Default Value
version Version number of user's configuration file. nonEmptyString "1.0"

Example:

<?xml version="1.0" encoding="UTF-8" ?>
<um-mcs version="1.0">
...
</um-mcs>


MCS Element "<receiver-transport-opts>"  <-

Supplies configuration for the monitoring receiver created by MCS.

Example:

<?xml version="1.0" encoding="UTF-8" ?>
<um-mcs version="1.0">
...
<receiver-transport-opts>
...
</receiver-transport-opts>
...
</um-mcs>


MCS Element "<config-file>"  <-

Supplies a UM configuration file for the monitoring receiver created by MCS.

Example:

<?xml version="1.0" encoding="UTF-8" ?>
<um-mcs version="1.0">
...
<receiver-transport-opts>
<config-file>mcs_transp.cfg</config-file>
...
</receiver-transport-opts>
...
</um-mcs>


MCS Element "<wildcard-topic>"  <-

Sets the monitoring receiver to use a wildcard pattern instead of a simple topic to subscribe to statistics data sent by UM components (applications, daemons, etc). If supplied, MCS Element "<topic>" is ignored.

If not supplied, MCS Element "<topic>" is used.

Example:

<?xml version="1.0" encoding="UTF-8" ?>
<um-mcs version="1.0">
...
<receiver-transport-opts>
<wildcard-topic>My.*Topic</wildcard-topic>
...
</receiver-transport-opts>
...
</um-mcs>


MCS Element "<topic>"  <-

The topic that the monitoring receiver will subscribe to get statistics data sent by UM components (applications, daemons, etc).

If not supplied, defaults to "/29west/statistics".

Example:

<?xml version="1.0" encoding="UTF-8" ?>
<um-mcs version="1.0">
...
<receiver-transport-opts>
<topic>MyStatsTopic</topic>
...
</receiver-transport-opts>
...
</um-mcs>


MCS Element "<connector>"  <-

Configures the connector that MCS should use to write statistics data. A connector is typically an interface to a database.

Example:

<?xml version="1.0" encoding="UTF-8" ?>
<um-mcs version="1.0">
...
<connector>
...
</connector>
...
</um-mcs>


MCS Element "<properties-file>"  <-

Specifies a Java properties file to pass to the connector.

See Monitoring Collector Service (MCS).

  • Cardinality (number of times element can be supplied): 0 .. 1
  • Parent: <connector>

Example:

<?xml version="1.0" encoding="UTF-8" ?>
<um-mcs version="1.0">
...
<connector>
<properties-file>my_sqlite.properties</properties-file>
...
</connector>
...
</um-mcs>


MCS Element "<type>"  <-

Defines the connector type to use. Supported types are "sqlite" or "hdfs".

If not supplied, "sqlite" is used.

See Monitoring Collector Service (MCS).

  • Cardinality (number of times element can be supplied): 0 .. 1
  • Parent: <connector>

Example:

<?xml version="1.0" encoding="UTF-8" ?>
<um-mcs version="1.0">
...
<connector>
<type>sqlite</type>
...
</connector>
...
</um-mcs>


MCS Element "<daemon>"  <-

Contains elements which define logging behavior and sets a file name for the service's Process ID.

See child elements for details.

Example:

<?xml version="1.0" encoding="UTF-8" ?>
<um-mcs version="1.0">
<daemon>
...
</daemon>
...
</um-mcs>


MCS Element "<pid-file>"  <-

Supplies the desired name of file in which the MCS writes its Process ID (PID).

  • Cardinality (number of times element can be supplied): 0 .. 1
  • Parent: <daemon>

Example: (MCS writes process ID to "mcs_pid.txt" file)

<?xml version="1.0" encoding="UTF-8" ?>
<um-mcs version="1.0">
<daemon>
<pid-file>mcs_pid.txt</pid-file>
...
</daemon>
...
</um-mcs>


MCS Element "<log>"  <-

Configures MCS logging behavior. The value contained within the <log>...</log> is a file name, but is only used if the "type" attribute is set to "file".

When the type attribute is set to "file", the MCS supports "rolling" the log file, which consists a series of files over time so that no one file grows too large.

  • Cardinality (number of times element can be supplied): 0 .. 1
  • Parent: <daemon>

XML Attributes:

Attribute Description Valid Values Default Value
type Where to write log messages. "file" - Write log messages to a file.
"console" - Write log messages to standard output.
"console"
frequency Time-frame by which to roll the log file. "disable" - Do not roll the log file based on time.
"daily" - Roll the log file at midnight.
"hourly" - Roll the log file each hour.
"disable"
size Size (in MB, i.e. 2**20, or 1,048,576) of current log file at which it is rolled. Specify 0 to disable rolling by log file size. positiveInteger "10" (10,485,760 bytes)
max-history Number of rolled log files at which the oldest file is deleted when the current log file is rolled. positiveInteger "10"
compression Enables compression for rolled log files. "none" - Do not compress log files.
"zip" - Compress log files using "zip" format.
"gzip" - Compress log files using "gzip" format.
"none"

Example 1: (write log messages to standard out)

<?xml version="1.0" encoding="UTF-8" ?>
<um-mcs version="1.0">
<daemon>
<log type="console"/>
...
</daemon>
...
</um-mcs>

Example 2: (write log messages to "mcs.log" file)

<?xml version="1.0" encoding="UTF-8" ?>
<um-mcs version="1.0">
<daemon>
<log type="file" frequency="daily">mcs.log</log>
...
</daemon>
...
</um-mcs>