IBM WebSphere Adapters Network Card User Manual


 
<?xml version="1.0" encoding="UTF-8"?>
<EventNaturesSpec name="EventNatures" targetNamespace="http://www.ibm.com/xmlns/prod/websphere/scdl/eis/6.0.0:JCAAdapter"
xmlns="http://www.ibm.com/xmlns/prod/websphere/monitoring/6.1/mes"
xmlns:eis="http://www.ibm.com/xmlns/prod/websphere/scdl/eis/6.0.0:JCAAdapter" shortName="ResourceAdapter">
<Property>CEI</Property>
<ElementKind name="Polling">
<EventNature name="STARTED" eventName="eis:WBI.JCAAdapter.Polling.STARTED" />
<EventNature name="STOPPED" eventName="eis:WBI.JCAAdapter.Polling.STOPPED" />
</ElementKind>
</EventNaturesSpec>
2. Xsd schema (.xsd):
Xsd schema can be used to provide CEI specific of each data elements and it
also defines the types of events that can be emitted for the data elements.
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.ibm.com/xmlns/prod/websphere/scdl/eis/6.0.0:JCAAdapter"
xmlns:eis="http://www.ibm.com/xmlns/prod/websphere/scdl/eis/6.0.0:JCAAdapter"
xmlns:wbi="http://www.ibm.com/xmlns/prod/websphere/monitoring/6.1">
<import namespace="http://www.ibm.com/xmlns/prod/websphere/monitoring/6.1" schemaLocation="WBIEvent.xsd" />
<complexType name="WBI.JCAAdapter.Polling.STARTED">
<complexContent>
<extension base="wbi:WBIMonitoringEvent">
<sequence>
<element name="PollFrequency" type="int" minOccurs="1" maxOccurs="1" />
<element name="PollQuantity" type="int" minOccurs="1" maxOccurs="1" />
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="WBI.JCAAdapter.Polling.STOPPED">
<complexContent>
<extension base="wbi:WBIMonitoringEvent"></extension>
</complexContent>
</complexType>
</schema>
Extending Common Event Infrastructure logging on WebSphere Process Server:
You can extend CEI logging to WebSphere Process Server by adding custom
events.
Example of how to log an event
The following example describes how to log an event named Polling, when the
event action is Started and you want to log two integers values for this event in
the CEI database.
1. Monitorable Element Schema “.mes” file changes
Defines element types that you want to monitor (Polling for example) and it
also defines natures that are available for each element type (STARTED).
<?xml version="1.0" encoding="UTF-8"?>
<EventNaturesSpec name="EventNatures" targetNamespace=
"http://www.ibm.com/xmlns/prod/websphere/scdl/eis/6.0.0:JCAAdapter"
xmlns="http://www.ibm.com/xmlns/prod/websphere/monitoring/6.1/mes"
xmlns:eis="http://www.ibm.com/xmlns/prod/websphere/scdl/eis/6.0.0:JCAAdapter"
shortName="ResourceAdapter">
<Property>CEI</Property>
<ElementKind name="Polling">
<EventNature name="STARTED" eventName="eis:WBI.JCAAdapter.Polling.STARTED" />
</ElementKind>
</EventNaturesSpec>
2. “.xsd” file changes
The .xsd event schema file provides monitoring that is specific to each data
element, and it also defines the types of events that can be emitted for the data
elements. The following is an example of xsd event schema content::
<?xml version="1.0" encoding="UTF-8"?>"
<EventSpec xmlns="http://www.ibm.com/xmlns/prod/websphere/monitoring/6.0.0/es"
name="Events"
184 WebSphere Adapters: WebSphere Adapter Toolkit User Guide