Friday, July 26, 2019

Extendable System Monitor on webMethods

System Connectivity Monitoring

There could be hundreds of systems integrated in a big company, and it's a challenge for administrator to check system health of each one. This tool is designed to monitor system connectivities and send out notification once it's down.
You could download it from git hub, https://github.com/dingago/HxSystemMonitorAdapter. The code is verified on webMethods 9.9.
It provides a summary page to view current status of all systems.
To monitor the systems automatically, there are only 2 things you need to do:
  1. Configure connections to associate with system you want to monitor. Different system would be represented by different kind of connection, which is easily to be extended.
  2. Configure service HxSystemMonitorAdapter.connection:pingAll as scheduler service, so it would check connection activity periodically.

Extend The Adapter to Monitor Your Own System

By default, it contains some build-in connections such as:
  • RemoteServerConnection, to monitor another Integration Server via webMethods remote server management
  • BrokerConnection, to monitor Broker via webMethods messaging
  • UniversalMessagingConnection, to monitor Universal Messaging via webMethods messaging
But you could always develop customized connection to monitor your own system following the instructions below:
  1. Develop a connection factory class which extends abstract class hx.systemMonitorAdapter.SystemMonitorAdapterConnectionFactory, and you need to define the fields how to configure the connection in it.
  2. Develop a connection class which extends abstract class hx.systemMonitorAdapter.SystemMonitorAdapterConnection, and you need to write some code to check the connectivity in method initializeConnection, just make sure throw a ResourceException when connectivity is inactive.
  3. Export these class as a jar file and place it under <Package_Dir>/code/jars.
  4. Create a new XML file under <Package_Dir>/config to provide some metadata of your connection, including:
    1. factoryClass, the class name of your connection factory
    2. displayName, the display name of your connection
    3. description, a brief description of your connection
    4. helpUrl, optional, the url of html page contains some help information of your connection
    5. field, the field name in your connection factory class and corresponding display name on GUI
You could reference required class from <Package_Dir>/code/jars/system-monitor-adapter.jar.

Getting Notification When System Is Down

This tool contains a customized IS event(HxSystemMonitorAdapter.event:SystemMonitorEvent), which would be published when a system is detected down. So you may want to subscribe this event by invoking service pub.event:addSubscriber. Event type is "Hx System Monitor Event" for subscribing.

Extendable System Monitor on webMethods

System Connectivity Monitoring There could be hundreds of systems integrated in a big company, and it's a challenge for administrator...