This page explains, what the Service Console cartridge is and how to build your own cartridges.
The Service Console "cartridge" is a Java class providing almost unlimited Service Console versatility. You can imagine it as the Service Console extension or add-in that is able to check any non-standard service unsupported by Service Console until now.
Each class that implements interface TemplateCartridgeIface.java and resides in the Service Console working directory can be used as cartridge. The cartridge can be embedded in user defined template and configured from the Service Console Template Editor page. Using the user defined template, you can create a rule checking your special service.
As the TemplateCartridgeIface.java source is available in the ServiceConsole\Cartridges directory, you can develop your own cartridges.
Developing cartridges presumes that you are famous with Java programming and with developing network applications. In addition, you need the information about the target service (e.g. the protocol which clients use to access the service). Mostly, the cartridge will perform a sequence of protocol commands against the service to determine if the service lives or not.
Compulsory Interface Description
Your cartridge must implement the TemplateCartridgeIface interface to be invokable from Service Console. The interface consists of two methods. The first is invoked when Service Console wants to check the service in question, the second is invoked on Service Console exit. Please, read also carefully the comments in the following interface source:
Once you have your_cartridge.java implementing the TemplateCartridgeIface ready, you have to compile it. To do it, in the Cartridges directory, run your Java 1.1 compatible compiler to compile both TemplateCartridgeIface.java and your_cartridge.java sources.
C:\jdk1.1.8\bin\javac.exe -O -classpath C:\jdk1.1.8\lib\classes.zip *.java
C:\sdk-java.32\bin\jvc /O *.java
All mentioned errors are detected on runtime and reported similar way as the service check error. See also the Examples.
When you have compiled your_cartridge.class, copy it to the Service Console working directory, then restart the Service Console.
Create a new template (e.g. Your Cartridge Template) based on User Defined template class. Fill in properly the fields Template Editor form. Ensure yourself that you have entered correct cartridge class name and service port number.
Create new rule (e.g. Your Cartridge Test) and specify that it will use new template for checking the service. For first test, specify rather lesser timeout (about 10s should be good).
In the Rules page, click the button Run Now. On the result page you will see the messages that you programmed in the cartridge implementation (they are the messages that you print on ps print stream - see the interface description).
Following examples shows both the correct implementation and some of the typical implementation errors.
Here is the example of cartridge that can be used in user defined template. The example, in fact does not check any service. It only illustrates using of TemplateCartridgeIface.
Wrong Cartridge Example (Missing Public Constructor)
Here is the example of the cartridge that cannot be used in the user defined template, because the implementation overloads default public constructor by own, private.
Wrong Cartridge Example (Abstract Class)
Here is the example of the cartridge that cannot be used in the user defined template, because it is the abstract class.
Trap Console, Service Console, Active SNMP, JWinSvc, Ping Console, CS-Care, Visual SNMP and WConsole
are trademarks of CSCare Inc.
Sun, Sun Microsystems, Java, 100% Pure Java and "Write Once, Run Anywhere" are trademarks or registered
trademarks of Sun Microsystems, Inc. in the United States and other
countries. Novell, NetWare, Novell IPX and/or other Novell products are
trademarks or registered trademarks of Novell, Inc. Microsoft and/or other
Microsoft products are trademarks or registered trademarks of Microsoft.
Other product names and/or company names mentioned herein may be the
trademarks or registered trademarks of their respective owners.