Difference between revisions of "Example Cartographer Agent Configuration"

From Krupczak.org
Jump to: navigation, search
(cartographer.xml)
(cartographer-local.xml)
Line 96: Line 96:
  
 
* ''<logfileMonitor> </logfileMonitor>'' XML element can be used to scan logfiles for regular expressions and send XMP events when matches occur.
 
* ''<logfileMonitor> </logfileMonitor>'' XML element can be used to scan logfiles for regular expressions and send XMP events when matches occur.
 +
 +
Here is an example ''cartographer-local.xml'' configuration file.
 +
 +
<pre>
 +
<?xml version="1.0"?>
 +
 +
<cartographerLocal version="20"
 +
  xmlns="http://xmlns.krupczak.org/xsd/xmpdconfigs-1.0">
 +
 +
<system name="vmguest">
 +
<dependency>
 +
<dependClient>127.0.0.1</dependClient>
 +
<dependServer>vmhost</dependServer>
 +
<dependType>dependVM</dependType>
 +
<dependArgs></dependArgs>
 +
<dependReference>dependOutbound</dependReference>
 +
</dependency>
 +
</system>
 +
 +
<system name="emailServer">
 +
 +
<logfileDependency>
 +
  <logfile>/var/log/maillog</logfile>
 +
  <dependType>dependEmail</dependType>
 +
  <addExpression>imap-login.*user=(.*),.*rip=(.*), lip</addExpression>
 +
  <removeExpression></removeExpression>
 +
  <dependClient>$2</dependClient>
 +
  <dependServer>emailServer</dependServer>
 +
  <dependArgs>user='$1'</dependArgs>
 +
  <scanInterval>120</scanInterval>
 +
  <timeout>3600</timeout>
 +
</logfileDependency>
 +
 +
</system>
 +
 +
</pre>
  
 
== appdata.xml ==
 
== appdata.xml ==
  
 
== connectiondata.xml ==
 
== connectiondata.xml ==

Revision as of 11:53, 29 October 2012

Contents


What are the configuration files?

Cartographer agents are configured using several configuration files, all in XML format.

The configuration files are:

  • xmpd.xml - Agent engine configuration settings
  • cartographer.pem - Agent certificate authority keys
  • appdata.xml - Cartographer plugin data file storing application data
  • connectiondata.xml - Cartographer plugin data file storing connection data
  • cartographer.xml - Cartographer plugin configuration settings
  • cartographer-local.xml - Local, system-specific Cartographer-plugin configuration directives

Validating your configuration Files

An XML schema file defining Cartographer agent configuration files can be found here. To check the correctness of your config files, we suggest you use the xmllint utility included in the libxml2 software distribution.

% xmllint --noout --schema http://xmlns.krupczak.org/xsd/xmpdconfigs-1.0.xsd your-config.xml

xmpd.xml

Here is a basic xmpd.xml file that comes with the agent install.

<?xml version="1.0"?>

<xmpd_config version="2" 
   xmlns="http://xmlns.krupczak.org/xsd/xmpdconfigs-1.0">

<xmpd_trace>0</xmpd_trace>
<xmpd_verbose>0</xmpd_verbose>
<xmpd_daemon>0</xmpd_daemon>
<xmpd_eventageoutinterval>300</xmpd_eventageoutinterval>
<xmpd_defaultmanager>system</xmpd_defaultmanager>
<xmpd_autoupgrade>true</xmpd_autoupgrade>

<xmpd_authenuser>
<user>changeit</user>
<protocol_ops>all</protocol_ops>
<mibs>cartographer,mib2,core</mibs>
</xmpd_authenuser>

<xmpd_authenuser>
<user>public</user>
<protocol_ops>Response GetRequest SelectTableRequest Trap Information</protocol_ops>
<mibs>all</mibs>
</xmpd_authenuser>

</xmpd_config>

cartographer.xml

Here is a basic cartographer.xml that is included in the Cartographer agent distribution.

<?xml version="1.0"?>

<cartographerConfig version="4"
   xmlns="http://xmlns.krupczak.org/xsd/xmpdconfigs-1.0">

<dependencyAgeOutInterval>600</dependencyAgeOutInterval>

<peerAgeOutInterval>1800</peerAgeOutInterval>

<dependencyScanInterval>120</dependencyScanInterval>

<xmpAuthenUser>changeit</xmpAuthenUser>

</cartographerConfig>

The configuration file version is 4. This number should be monotonically increasing. Cartographer agents will distribute and update this file amongst each other. To deploy a new configuration file, simply edit a new one and place in the Cartographer home directory (e.g. /opt/cartographer or c:\program files\cartographer). The cartographer agent and plugins will periodically stat their config files and re-read them if they have changed and if the version number is greater than the one they previously read and parsed.

The dependencyAgeOutInterval XML element tells Cartographer how long dependencies should remain in its tables, before pruning, if it has not been re-discovered or re-validated.

The peerAgeOutInterval XML element tells Cartographer how long a peer agent should remain in its peer table, before pruning, if it has not been re-discovered or re-validated.

The <dependencyScanInterval XML element tells Cartographer how often, in seconds, to wait before searching for dependencies. 120 means to wait two minutes before scanning for dependencies again. This number represents a tradeoff between CPU utilization and dependency discovery granularity. The smaller the number, the more often dependencies are searched for but the more CPU the agent consumes.

The <xmpAuthenUser> XML elements tells the Cartographer agent which XMP authenticated user to use when communicating with other XMP agents. This value should be specified in the xmpd.xml configuration file with appropriate permissions. The Cartographer plugin needs GetRequest, SelectTableRequest, Trap, and Information protocol operations permission for the cartographer, mib2, and core MIBs.

cartographer-local.xml

  • <cartographerLocal version="1"> </cartographerLocal> XML element identifies the configuration file and its version. Agents distribute and read newer versions. Version numbers should be monotonically increasing integers.
  • The <system name="hostname"> </system> XML element delimits configuration directives for the specified system. You can place multiple system elements in the cartographer-local.xml configuration file. Hostname can be a FQDN or partial.
  • <dependency> </dependency> XML element can be used to add static dependencies via this configuration directive. This directive is helpful if you have a known dependency that Cartographer is not able to discover. Configuring dependencies this way ensures that they included in Cartographer's intelligence algorithms.
  • <logfileDependency> </logfileDependency> XML element can be used to discover dependencies by scanning logfiles using regular expressions and adding dependencies when matches occur.
  • <logfileMonitor> </logfileMonitor> XML element can be used to scan logfiles for regular expressions and send XMP events when matches occur.

Here is an example cartographer-local.xml configuration file.

<?xml version="1.0"?>

<cartographerLocal version="20"
   xmlns="http://xmlns.krupczak.org/xsd/xmpdconfigs-1.0">

<system name="vmguest">
 <dependency>
 <dependClient>127.0.0.1</dependClient>
 <dependServer>vmhost</dependServer>
 <dependType>dependVM</dependType>
 <dependArgs></dependArgs>
 <dependReference>dependOutbound</dependReference>
 </dependency>
</system>

<system name="emailServer">

 <logfileDependency>
  <logfile>/var/log/maillog</logfile>
  <dependType>dependEmail</dependType>
  <addExpression>imap-login.*user=(.*),.*rip=(.*), lip</addExpression>
  <removeExpression></removeExpression>
  <dependClient>$2</dependClient>
  <dependServer>emailServer</dependServer>
  <dependArgs>user='$1'</dependArgs>
  <scanInterval>120</scanInterval>
  <timeout>3600</timeout>
 </logfileDependency>

</system>

appdata.xml

connectiondata.xml

Personal tools