Contents
News
About
Roadmap
Screenshots
Live Demo
Documentation
Download
Documentation
iCMS interface
Design
Launching
Configuring
JavaDoc iCMS
JavaDoc Luky
JavaDoc WestHawk
SourceForge.net Logo

Configuring

Configuring cmsd

xml config

Below you will find a sample configuration file of a simple system. It contains, a view different computer types and some different applications. After that it will be explained in more detail.

<?xml version="1.0"?> 
<cms> 
<!-- *****************************************************************
	      General Configuration
********************************************************************** --> 
   <descr text="Central Control and Monitoring System"/> 
   <mibpath dir="./mibs"/> 
   <mibpath dir="./myCompanymibs"/> 
   <mib file="myCompany.mib"/> 
   <mib file="myWatchdogAppv2.mib"/> 

<!-- *****************************************************************
	     Application Types 
********************************************************************** --> 
   <applicationtypes> 

<!-- *****************************************************************
	      myApplication1
********************************************************************** --> 
   <applicationtype name="myApplication1" symbolic-name="My Super Great App"> 
      <descr text="This is my great App 1"/> 
      <mib file="myApplication1v2.mib"/> 
      <probe> 
	 <snmp get="myApplication1Status.0"/> 
	 <snmp info="myApplication1 description: " get="myApplication1Descr.0"/> 
	 <snmp info="Uptime: " get="myApplication1Uptime.0"/> 
	 <snmp start="Start myApplication1: " 
		set="myWatchdogAppStartProcess.0"> myApplication1</snmp> 
	 <snmp stop="Stop myApplication1: " 
		set="myWatchdogAppStopProcess.0"> myApplication1</snmp> 
      </probe> 
   </applicationtype> 

<!-- *****************************************************************
	      myApplication2
********************************************************************** --> 
   <applicationtype name="myApplication2" symbolic-name="File Management" >  
      <descr text="This is my great App 2"/> 
      <mib file="myApplication2v2.mib"/>  
      <probe>  
	    <snmp get="myApplication2Status.0"/> 
	    <snmp info="myApplication2 description: " get="myApplication2Descr.0"/> 
	    <snmp info="Uptime: " get="myApplication2Uptime.0"/> 
	    <snmp start="Start myApplication2: " 
		set="myWatchdogAppStartProcess.0"> myApplication2</snmp> 
	    <snmp stop="Stop myApplication2: " 
		set="myWatchdogAppStopProcess.0"> myApplication2</snmp> 
      </probe> 
   </applicationtype> 

   </applicationtypes> 
   
<!-- *****************************************************************
	     Node Types 
********************************************************************** --> 
   <nodetypes> 

<!-- *****************************************************************
	     My Red Light 
********************************************************************** --> 
      <nodetype name="redlight"> 
	 <probe> 
	    <fixed value="NOK"/> 
	 </probe> 
      </nodetype> 

<!-- *****************************************************************
	     My Apple 
********************************************************************** --> 
      <nodetype name="apple"> 
	 <probe> 
	    <ping/> 
	 </probe> 
      </nodetype> 

<!-- *****************************************************************
	     My test Machine 
********************************************************************** --> 
      <nodetype name="testMachine"> 
	 <mib file="RFC1213-MIB"/> 
	 <mib file="myWatchdogAppv2.mib"/> 
	 <probe propagate=false> 
	    <snmp info="testMachine mode: " get="myWatchdogAppStartNodeConfiguration.0"/> 
	    <snmp info="System: " get="sysDescr.0"/> 
	    <snmp info="Uptime: " get="sysUpTime.0"/> 
	    <snmp info="Node name"       get=".1.3.6.1.2.1.1.5.0"/> 
	    <snmp start="Start testMachine: " 
		set="myWatchdogAppStartNodeConfiguration.0"> 
		/myCompanysys/myWatchdogAppdata/use/ctp_ncf.operlive.use</snmp> 
	    <snmp stop="Stop testMachine: " 
		set="myWatchdogAppStopNodeConfiguration.0"> 2</snmp> 
	    <ping/> 
	 </probe> 
	 <application type="myApplication1"/> 
	 <application type="myApplication2" propagate="false"/> 
      </nodetype> 
   </nodetypes> 
   
<!-- *****************************************************************
	    My Location Closet 
********************************************************************** --> 
   <location name="Closet"> 
     <descr text="General store room"/> 
     <nodegroup name="Reference System"> 
     <descr text="Server Park running Reference System"/> 
       <node type="testMachine" name="01" host="testMachine01" 
			symbolic-name="Refsys Processor 1"> 
       <descr text="Refsys Processor \n 
			this computer implements the following functional tasks:\n 
			- myApplication 1\n 
			- myApplication 2"/> 
       </node> 
     </nodegroup> 
   </location> 

<!-- *****************************************************************
	    My Location Hobby Room 
********************************************************************** --> 
   <location name="Hobby Room"> 
     <descr text="This is my computer room \n 
		it is where i run all my major systems \n 
		and develop great software"/> 
     <nodegroup name="Servers"> 
       <node type="apple" name="01" host="localhost" symbolic-name="My Server" /> 
     </nodegroup> 
     <nodegroup name="Workstations"> 
       <node type="apple" name="02" host="oehoeboeroe" symbolic-name="My Audio Stations" /> 
       <node type="apple" name="03" host="salomo" symbolic-name="My Cube" /> 
     </nodegroup> 
   </location> 

<!-- *****************************************************************
	    My Logging parameters
********************************************************************** --> 
   <logging href="/tmp/cms.log" maxsize="400000" backup="/tmp/cms_old.log" 
       traplog="/tmp/traps"  traplogbackup="/tmp/traps2"/> 
</cms> 
					
General Configuration

<?xml version="1.0"?> 
<cms> 
<!-- *****************************************************************
	      General Configuration
********************************************************************** --> 
   <descr text="Central Control and Monitoring System"/> 
   <mibpath dir="./mibs"/> 
   <mibpath dir="./myCompanymibs"/> 
   <mib file="myCompany.mib"/> 
   <mib file="myWatchdogAppv2.mib"/> 
					

Here you can set a general description of the system. The paths to the mibs. These can be system mibs or company mibs containing the mibs of your own software or e.g. a CISCO switch. You can also set mibs that you want present throughout the configuration of your system. Specific application mibs you may want to add later, since these mibs get parsed for every variable added.

Application Types
<!-- *****************************************************************
	     Application Types 
********************************************************************** --> 
   <applicationtypes> 

<!-- *****************************************************************
	      myApplication1
********************************************************************** --> 
   <applicationtype name="myApplication1" symbolic-name="My Super Great App"> 
      <descr text="This is my great App 1"/> 
      <mib file="myApplication1v2.mib"/> 
      <probe> 
	 <snmp get="myApplication1Status.0"/> 
	 <snmp info="myApplication1 description: " get="myApplication1Descr.0"/> 
	 <snmp info="Uptime: " get="myApplication1Uptime.0"/> 
	 <snmp start="Start myApplication1: " 
		set="myWatchdogAppStartProcess.0"> myApplication1</snmp> 
	 <snmp stop="Stop myApplication1: " 
		set="myWatchdogAppStopProcess.0"> myApplication1</snmp> 
      </probe> 
   </applicationtype> 
					

The Application Types are filled with applications. You can set a get parameter for each application. This variable will be queried for the status of the application on a regular basis. Additionally you can define informationals. These variables will not be polled but can be probed by the frontend application.
Last but not least, you can set Start and Stop variables. When set, these will cause the start and stop button in the frontend to be enabled. Allowing you to actuate these commands. You can add the mibs for this application right here.

Node Types
<!-- *****************************************************************
	     Node Types 
********************************************************************** --> 
   <nodetypes> 

<!-- *****************************************************************
	     My Red Light 
********************************************************************** --> 
      <nodetype name="redlight"> 
	 <probe> 
	    <fixed value="NOK"/> 
	 </probe> 
      </nodetype> 

<!-- *****************************************************************
	     My Apple 
********************************************************************** --> 
      <nodetype name="apple"> 
	 <probe> 
	    <ping/> 
	 </probe> 
      </nodetype> 

<!-- *****************************************************************
	     My test Machine 
********************************************************************** --> 
      <nodetype name="testMachine"> 
	 <mib file="RFC1213-MIB"/> 
	 <mib file="myWatchdogAppv2.mib"/> 
	 <probe propagate=false> 
	    <snmp info="testMachine mode: " get="myWatchdogAppStartNodeConfiguration.0"/> 
	    <snmp info="System: " get="sysDescr.0"/> 
	    <snmp info="Uptime: " get="sysUpTime.0"/> 
	    <snmp info="Node name"       get=".1.3.6.1.2.1.1.5.0"/> 
	    <snmp start="Start testMachine: " 
		set="myWatchdogAppStartNodeConfiguration.0"> 
		/myCompanysys/myWatchdogAppdata/use/ctp_ncf.operlive.use</snmp> 
	    <snmp stop="Stop testMachine: " 
		set="myWatchdogAppStopNodeConfiguration.0"> 2</snmp> 
	    <ping/> 
	 </probe> 
	 <application type="myApplication1"/> 
	 <application type="myApplication2" propagate="false"/> 
      </nodetype> 
   </nodetypes> 
					

Node types can contain a probe of their own (as in applications) or can consist of applications, or even a combination. In the latter case, the status of that application can be taken in to account in the node status (default) or the propagation can be set to false.
A Probe can either be a ping or an snmp probe, from version 1.6.9 it is also possible to use fixed nodetypes. Though in theory it is possible to add a snmp section not containing a get to a ping probe, however this is not recommended but supported from version 1.6.3.
Again mibs can be added at this level.

Locations
<!-- *****************************************************************
	    My Location Hobby Room 
********************************************************************** --> 
   <location name="Hobby Room"> 
     <descr text="This is my computer room \n 
		it is where i run all my major systems \n 
		and develop great software"/> 
     <nodegroup name="Servers"> 
       <node type="apple" name="01" host="localhost" symbolic-name="My Server" /> 
     </nodegroup> 
     <nodegroup name="Workstations"> 
       <node type="apple" name="02" host="oehoeboeroe" symbolic-name="My Audio Stations" /> 
       <node type="apple" name="03" host="salomo" symbolic-name="My Cube" /> 
     </nodegroup> 
   </location> 

<!-- *****************************************************************
	    My Logging parameters
********************************************************************** --> 
   <logging href="/tmp/cms.log" maxsize="400000" backup="/tmp/cms_old.log" 
       traplog="/tmp/traps"  traplogbackup="/tmp/traps2"/> 
</cms> 
				

Locations have a name and a description. Within a location, you can have a group of nodes, and then there are the individual nodes, which are of a type. This node type was described earlier.
Finally, you can also log to file. Or actually, 2 files. Once the first file is full (size=nr of lines), it will roll-over to the backup file.

trap translations

iCMS supports trap translations based on variable bindings. To do so create a trap translation file containing entries like:

QUALIFIER TRUE 5000014 "I_CMS Telnet disconnected (hostname $2, address $3, channel $1, port $4)"

First you will need a unique QUALIFIER. This qualifier you will need to put in your trap as well. The second item tells if the trap should be displayed or suppressed. Then follows a unique number, if the QUALIFIER can not be resolved iCMS will try the number (trap id). The last argument is the trap string. This string will be filled with the trap's variable bindings. The first binding will replace $1, the second $2 etc. TRUE indicates the trap should be passed, putting FALSE there would lead to a blocked trap (ver. 1.6.13)

Configuring masterd

Configuring the master deamon is fairly simple. The configuration file requires a few parameters:

NrOfCmsdClients=2
CmsdClientHostName-0=127.0.0.1
CmsdClientHostName-1=192.168.1.2
CmsdClientPortNr-0=60000
CmsdClientPortNr-1=60000
CmsdClientName-0="Server Poller"
CmsdClientName-1="Workstations Poller"
LogFileName=master.log
LogBackupFileName=master.log-2
LogMaxFileSize=800000
MyToken="/cms/masterd"
PeriodicSync=60

				
The configuration is pretty straight forward. Don't put spaces before or after the equal sign, they will be regarded as part of the token. Furthermore the numbering should start at zero and don't put in leading zero's.
You can specify any number of clients. The master deamon will connect automatically and download the configuration from the clients. *This means the cms deamons must be available when masterd launched* optimalizations would including a root tag here for each client so you know what is missing if they fail to connect, or at least try to reconnect at a later stage.
From version 1.6.6 it is possible to add a LogFileName, as a result the -q flag now makes the application really silent on standard out.
The application "reconnects" automatically to nodes that are lost. It adds new tokens but will keep the old ones!, this could lead to some serious problems if one of the Cmsd Deamons changes configuration mid-flight (thus don't do that!) during the time there is no connection, the tokens will be set to UNKNOWN.
When PeriodicSync is set, the master will periodically (suggest 60 sec) for events it may have mist.
Use CmsdClientName and MyToken to create an evaluation module in the Masterd. It will act as a normal probe so you can see the token, and request it's status and informationals. (from ver 1.6.9)
I hope that a future version can resolve names, so you don't need to enter ip's anymore.

Configuring status field applet

The status field applet is a very small applet that displays the status of exacly one token. It can be used to compile your own overview page for your system, or create a web based CMS based on html and images.
The applet is embedded in html e.g.:

			
   <BODY style="margin: 0;" onResize="window.location.href = window.location.href;">
	
   <SCRIPT LANGUAGE="javascript">
	document.write ("<APPLET CODE=\"iCMS.applet.StatusFieldApplet.class\" 
			     ARCHIVE=\"../statfield.jar\" WIDTH=200 HEIGHT=200 
			     ALT=\"Applet not supported?\">");
	document.write ("	<PARAM NAME=\"LogLevel\" VALUE=\"6\">");
	document.write ("	<PARAM NAME=\"Link\" VALUE=\"http://www.icms.com/icms.html\">");
	document.write ("	<PARAM NAME=\"IconOK\" VALUE=\"img/OK.png\">");
	document.write ("	<PARAM NAME=\"IconEXCEPTION\" VALUE=\"img/EXCEPTION.png\">");
	document.write ("	<PARAM NAME=\"IconUNKNOWN\" VALUE=\"img/UNKNOWN.png\">");
	document.write ("	<PARAM NAME=\"IconMARGINAL\" VALUE=\"img/MARGINAL.png\">");
	document.write ("	<PARAM NAME=\"IconTIMEOUT\" VALUE=\"img/TIMEOUT.png\">");
	document.write ("	<PARAM NAME=\"IconNOK\" VALUE=\"img/NOK.png\">");
	document.write ("	<PARAM NAME=\"PortNumber\" VALUE=\"443\">");
	document.write ("	<PARAM NAME=\"Token\" VALUE=\"/cms\">");
	document.write ("Your browser is completely ignoring the <APPLET> tag!");
	document.write ("</APPLET>");
   </SCRIPT> 

   </BODY>
				
The example above will show an status applet (with loglevel 6) that will connector to a master or cms deamon running on the same machine as it was downloaded from (java rules) on port 443 (which will comfortely pinch through most firewalls) and subscribe to the status of the token /cms. Depending on the status returned it will show the related images. It makes sense to keep all images the same size, and put the same in width and heigth parameters.
From version 1.6.3 has the possiblity to include a href to which the browser will jump if you click it. (make sure it is a full url)
The javascript in the body tag will perform a reload on a window resize, that should assure optimal layout.

Configuring web cms applet

The cms applet is the iCMS frontend, and yes it could be more customizable, but for now these are the parameters you can change, using the following html example:

   <SCRIPT LANGUAGE="javascript">
	var w = (navigator.appName=="Netscape") ? innerWidth : document.body.clientWidth;
	var h = (navigator.appName=="Netscape") ? innerHeight : document.body.clientHeight;
	document.write ("<APPLET CODE=\"iCMS.applet.iCMSApplet.class\" 
			     ARCHIVE=\"substance.jar, cmsapplet.jar\" 
			     WIDTH=100% HEIGHT=100% 
			     ALT=\"Applet not supported?\">");
	document.write ("	<PARAM NAME=\"LogLevel\" VALUE=\"6\">");
	document.write ("	<PARAM NAME=\"PortNumber\" VALUE=\"443\">");
	document.write ("	<PARAM NAME=\"Host\" VALUE=\"localhost\">");
	document.write ("	<PARAM NAME=\"IgnoreStateChange\" VALUE=\"Y\">");
	document.write ("	<PARAM NAME=\"FastConnect\" VALUE=\"Y\">");
	document.write ("	<PARAM NAME=\"UseCustomIcons\" VALUE=\"Y\">");
	document.write("        <PARAM NAME=\"SubstanceTheme\" 
				VALUE=\"SunGlare\">");
	document.write ("	<PARAM NAME=\"EnableActions\" VALUE=\"Y\">");
	document.write ("	<PARAM NAME=\"Watchdog\" VALUE=\"180\">");
	document.write("        <PARAM NAME=\"ScreenWidth\" VALUE=\"" + w +"\">");
	document.write("        <PARAM NAME=\"ScreenHeight\" VALUE=\"" + h +"\">");
	document.write ("Your browser is completely ignoring the <APPLET> tag!");
	document.write ("</APPLET>");
   </SCRIPT>
				
The code resembles the status applet code, however there are some neat features, like the javascript that has been extended with a browser dependent section to determine the width and height of the screen automatically. (IE has some quirks here, other browsers should be ok)
The host parameter will only be used if the applet can not find the host it was downloaded from, and is more a leftover from testing with the appletviewer.
Since 1.6.6 it is possible to "FastConnect", this avoids the usual ping/pong game, but you will not get the progressbar in the status.
Version 1.6.11 supports an overwrite of the default substance theme
When IgnoreStateChange is set to N or not filled in, the applet will generate traps on state changes. This function is now also implemented in the cmsd thus persistant for each client that connects. (so you can ignore the applet code, unless you use a different backend)
Watchdog is a watchdog timer that checks the connection for defects every x seconds (1.6.13) suggest putting 180 there, or you will have created a polling application
UseCustomIcons is a flag that triggers the applet to try and download custom images to show in the status tree. (otherwise it will use the default symbols for folders and files.) It uses the following algorithm:

  • Check for the token+png
    (e.g. /cms/myLocation/myNodeGroup/myNode/myApplication.png
  • If not found, check for the generic icon
    (e.g. /application.png)
  • If not found, check for a substance icon
    (somewhere in Substance.jar)
  • If not found, use the default icon
    (OS dependent symbols for a tree)
iCMS comes with application generic icons for :

/cms
/cms/location
/cms/location/nodegroup
/cms/location/nodegroup/node
/cms/location/nodegroup/node/application

but of course you can override these. There are also some sample icons below that you can use to create a personal look and feel that appeals to you. (anyway google is full of great images.)

a printer
a server
a network switch
a thin server
a time server
a sample workstation