Monitoring availability, performance, infrastructure, and beyond using IBM Lotus Sametime

Ever wonder how to really know what the status of your IBM Lotus Sametime environment is? Discover how Lotus Sametime can be monitored, in terms of both function and performance, from the user perspective. This article describes (and provides) a simple lightweight proactive tool to assist administrators in better understanding the Lotus Sametime user experience to reduce outages, respond to issues more quickly, and improve the customer experience. In addition to monitoring capabilities, this tool can assist in debug collection and take the burden off users for problem recreates and data collection. By combining network validation with Lotus Sametime IM, user awareness, user login, and username look-up validation, never before has such a complete picture of the user experience been available.

James Dewan, Premium Support Manager, IBM

Jim Dewan is a Premium Support Manager for IBM Lotus with Verizon, currently designing a series of tools and bots to help his customers monitor and debug their Lotus deployment. With ten years of Lotus Domino server development experience, Jim's previous role was as a Project Lead in the Lotus Domino administration team. Jim was also the Technical Lead for the Lotus Domino Linux on Systemz effort, specializing in application development, toolkits, and enterprise data accessibility.



23 August 2012 (First published 12 January 2010)

Also available in Chinese Russian Japanese Portuguese

Editor's note: Know a lot about this topic? Want to share your expertise? Participate in the IBM Lotus software wiki program today.

Introduction

Want to know what is happening in your environment from the user perspective? Need to know when user functionality is unavailable? Required to know not only the functional characteristics but also the performance experienced by your users? This article explains this newly designed framework to help you easily address these needs.

Included are descriptions of three existing easy-to-configure plug-ins and how to create your own monitors using this lightweight, simple tool. These monitors are useful for proactive production monitoring, problem identification, and user performance monitoring and as preproduction test environment tools. This article provides details on how to install and configure the tool quickly. Also included is detailed information about learning how to create additional monitors and the value you get from doing so. Code examples are available with the article as well.

Implemented as an IBM® Lotus® Sametime® bot, the Watchit tool leverages your existing investment in Lotus Sametime and is easily extendable to allow for additional plug-ins to match your user simulation needs. Watchit delivers a proactive framework to invest in the abilities of Lotus Sametime, enabling you to better manage and monitor your existing software and network resources. Watchit uses Lotus Sametime instant messaging to deliver alerts when user-defined performance thresholds are exceeded, network resources become unavailable, or critical user functionality fails.

Using existing plug-ins, when combined, provides a necessary detailed picture of a Lotus Sametime user experience. This picture can enable you to understand the time and cost savings of using these simple tools instead of relying on help desk, user, and tech support resources.

Learn how this framework can assist in doing the following:

  • Lessening the time to resolution for problems
  • Discovering problems proactively
  • Testing new configuration and code changes in an improved way

Use your existing investment in Lotus Sametime to its fullest. Explore how this tool can provide value to your organization.


Maximizing Lotus Sametime

From online meetings and instant messaging to unified communications, Lotus Sametime can bring an organization closer and offer more interactivity. Lotus Sametime can change how we interact with our applications and our users. Using the Lotus Sametime API toolkits can enable existing mission-critical applications to proactively communicate with system administrators or even the development teams when errors or other failures occur in the production environment.

Another way to use Lotus Sametime is to create simple applications that perform mission-critical tasks such as communication over an SIP or gateway connection in Lotus Sametime, network availability checking, name lookups, or any function provided with a product toolkit API. You can use the power of the Lotus Sametime toolkit to alert you when performance or function is not up to the standards that you have defined. Although creating applications using product APIs is not a new concept, value is enhanced when instant communication is used to alert administration teams of problems before user complaints flood the help desk. Knowing about issues ahead of time can be a valuable tool in minimizing outages and lessoning the burden on scarce help desk and technical support resources. The value of Lotus Sametime instant messaging is illustrated when you create these monitors as proactive eyes and ears in your production environment. These kinds of applications become the ultimate user: They collect the bugs, report problems as they happen, work 24X7, and don’t mind recreating a problem over and over.

Why this tool?

The Watchit tool provides all the services that you need to effectively build proactive monitor plug-ins to better manage your own environment. It also provides three ready-to-use plug-ins that let you get you started right away. After you have seen the value of the existing plug-ins by using Lotus Sametime instant messaging to notify system administrators when failures or performance delays exist, the ease and value of extending the tool by creating your own plug-ins is evident.

The Watchit tool provides a simple framework for monitors that provide functional and performance monitoring, all from the user perspective. Understanding the user experience can be difficult for administrators, and users can find it time consuming to collect data about performance or function failures. This tool is designed to make administrators most informed of the issues as seen from the user perspective. System administrators already know the back end of the environment; this tool gives them insight into the client experience. This approach is faster, more efficient, and easier than having to wait for a user to report a problem to the help desk. The power of instant messaging is used as a surrogate for the user opening a trouble ticket and all of the effort it takes until resolution.

Using toolkits to quickly develop the eyes and ears of your user environment

It is important for the people who support varied environments to know what the user experience is at any given moment. Information collected from the applications themselves is only one aspect of the total experience that the user is attaining. The goal of this tool, built on the power of instant messaging, is to watch for performance and function failures and report them to the appropriate support team. Often, the information collected from a user reporting a problem can be sparse and limited. Information collected from these applications (and any developed tools) is precise, with specific time lines, performance and response time data, and failure messages. This data about a failure often determines how quickly an issue can be resolved. Using the Watchit tool means that it can all be done without affecting users. Instead of users experiencing an issue and opening a trouble ticket, administrators can be alerted immediately about problems and can take appropriate action long before the trouble ticket is even opened.

Combining monitor plug-ins for maximum benefit

While collecting information on a specific task or function can be valuable, combining plug-in data can provide a perspective that not even users can provide. For example, while it is useful to know if SIP or gateway communications are flowing between external communities, it is also valuable to understand the performance characteristics of the network itself. The network checker plug-in (healthcheck) and the Lotus Sametime IM/awareness plug-in (awarecheck) are described below. Combining the data from these two plug-ins can reveal more about the issue than users are prepared to explain. The network performance or its instability can lead to Lotus Sametime issues or performance issues. By combining data, you can gather a clear picture of the environment with this proactive tool, and you can use instant messaging as the immediate vehicle to deliver this information to troubleshoot the current issue.

This kind of comprehensive data, when combined with the logging done by the applications themselves, provides both a client and a server perspective of the environment. The data can be useful in diagnosing problems, and it can be sent to application owners and support teams who can make sense of a given situation. All this data leads to shorter outages, lower impact on users, and quicker resolution of problems.


The Watchit Lotus Sametime bot 

The Watchit tool is a framework to better test, debug, and monitor your software deployments. It provides easy-to-use classes to incorporate iinstant messaging technology and combined logging activities. Shipping with three ready-to-use plug-ins, it functions as an important part of managing and supporting a software deployment. While additional plug-ins can be created (as this article explains later), the three existing plug-ins provide instant capabilities to enable you to be more proactive in your approach to understanding the user experience.

The Watchit tool currently comes with three existing custom monitor plug-ins. Any plug-in can be used independently or in unison.

  • Healthcheck is the component that performs the network host/port connection testing and monitoring.
  • Awarecheck handles the simulated instant messaging/awareness/resolve validation and monitoring.
  • Siponewaycheck handles simulated instant messaging/awareness/resolve validation and monitoring, and connecting to an external community with an existing ping bot to communicate with.

To specify which plug-ins are run, the Watchit bot reads the watchit.properties file:

Plugin_Classes=healthchecker,awarecheck,siponewaycheck

This example can run all three plug-ins at the same time.

Healthcheck plug-in

Known as the network checker, this plug-in performs network socket open operations to any host or port specified in the properties file. It is used to monitor network or performance failures from any place in the network. Information returned can provide insight into the performance of the network (socket connect response time) and network failure reason codes.

To accomplish the task of providing an input file and to make it easy to group resources into categories, the format of the properties file was designed without the requirement to repeatedly specify the same ports for every host listed. Port settings, located under the [Ports] section of the input file, provide a location to designate ports for specific server categories: [Domino], [Sametime], [MUX], [SIP], [Quickplace]. This approach allows healthcheck to spin through each type and use the port list to check each wanted port. Listing 1 shows a sample input file.

For input or for servers that have unique ports that do not fit easily into a category, the generic [Hosts] category can be used to designate individual hosts and ports together. Both host names and IP addresses are valid in the [Hosts] section.

To measure performance of the network, add Socket_Timeout=x, where x is the number of milliseconds to allow for a successful socket open operation. If this threshold is exceeded, an alert is sent to the notification list.

To show verbose output of the bot transactions, use Debug=true in the healthcheck.properties file.

Listing 1. Example healthcheck.properties input file
[Ports]
Sametime_Ports=1352,80,8081,8082,1533,999
Domino_Ports=1352,80
Quickplace_Ports=1352,80,389
Mux_Ports=1533,8082
Sip_Ports=5060,5061
[Sametime]
serverst04.company.com
serverst05.company.com
serverst06.company.com
[SIP]
serversp01.company.com
[Quickplace]
serverqp01.company.com
serverqp02.company.com
[MUX]
servermx1.company.com
servermx2.company.com
[Hosts]
host1.company.com;80,8081
host2.company.com;99,443,1024
[Options]
Check_Interval=60
Socket_Timeout=5000

The necessary Lotus Sametime server and login information is stored in the IMEasy.properties file. This file provides the Lotus Sametime user information for the Watchit bot to send alerts. It allows the tool to be separated from the Lotus Sametime data that might change over time. See listing 2 for an IMEasy.properties file example. To disable the alerting function (and to just log output), remove the IMEasy.properties file.

Listing 2. Example of the IMEasy.properties file
#Sametime_Notification_Users=User abbreviated name(s) separated by comma
Sametime_Notification_Users=Jim Dewan/ORG1/ORG2/Company

#Sametime_Notification_Server=Individual Sametime server or load balancer
Sametime_Notification_Server=stserver7.company.com
#Sametime_login_user=Login user that actually sends the IM
Sametime_login_user=Sametime Monitor 4/ORG1/ORG2/Company
#Sametime_login_pw=password of the login user
Sametime_login_pw=password
#Sametime_Notification_Group=single group name to notify
Sametime_Notification_Group=admin

To run this plug-in, add healthcheck to the Plugin_Classes value in watchit.properties. Values are comma delimited so that multiple plug-ins can be run at the same time.

Plugin_Classes=healthchecker

Awarecheck plug-in

The awarecheck plug-in is designed to test the Lotus Sametime functionality of login, name lookups, awareness, and instant messaging. This plug-in simulates two users, either within the same community or to an external community, playing an exchange routine and keeping performance and message fidelity in constant watch. Good for testing both server and client issues, many instances of this plug-in can be run concurrently to get a picture of server-to-server connections or client-to-server connections.

The awarecheck bot provides a simple way for two threads to be started, each simulating users logging into theirown communities. After both users have successfully logged in, Thread #1 resolves User2, and a back-and-forth IM game of tag begins. Sequence numbers are provided to ensure that messages are not lost. In addition to the instant messaging back and forth, User2 also constantly tests for the awareness of User1 to ensure that awareness is working in the environment, whether within the local community or to an external community.

The bot recycles the user logins and restarts every 90 minutes by default (Check_Interval property setting). If any instant message is undeliverable, or if the bot detects a change in the user status (that is, going offline), then a thread is created to notify the system administrators that the Lotus Sametime environment is experiencing an outage through instant messaging. Logs can be used to gather specific time stamps on error messages to compare to network traces or other Lotus Sametime log information.

The staware.properties file (shown in listing 3) identifies the following:

  • User1 login information used as the master to drive the instant messages
  • User2 login information used as the replier to the instant messages from the master
  • Performance thresholds to detect latency in the Lotus Sametime functionality
Listing 3. Sample staware.properties file
Check_Interval=30
Logout_Timeout=5
IM_Interval=10
IM_Timeout=10000
Resolve_Wait_Time=20000
Login_Wait_Time=20000

#Sametime user 1
Sametime_User1=sim user1/ORG1/ORG2/Company
Sametime_Server1=stserver01.company.com
Sametime_Pw1=password
Sametime_Namelookup1=sim user1/ORG1/ORG2/Company

#Sametime user 2
Sametime_User2=sim user2/ORG1/ORG2/Company
Sametime_Pw2=password
Sametime_Server2=stserver02.company.com
#Use internet address for Sametime_Namelookupto indicate
external user to be tested through GW or SIP
Sametime_Namelookup2=sim user1/ORG1/ORG2/Company

To show verbose output of the bot transactions, use Debug=true in the staware.properties file. Without Debug set to true, only failures are logged to the Watchit log file. Alerts are sent with data in the IMEasy.properties file. This approach is true for each plug-in.

Sametime _User sections handle the two users who are exchanging instant messages and checking awareness of each other. The important thing to note is the Sametime_Namelookup2 field. This is the field that the other user utilizes to check awareness. If users are being tested over a SIP or gateway connection to an external community, the Internet address must be used. If the users are within a community, then the local name must be used. The bot checks this field on User2 to determine if User1 needs to treat the user as an external user and not call the resolve() method to find the contact.

The plug-in also alerts when performance thresholds are not met in the environment.

In addition to function failures being logged and alerts sent, performance delays can also be monitored and alerted in the same way.

Performance thresholds are defined as shown in table 1.

Table 1. Performance thresholds for the Awarecheck plug-in
FunctionThreshold
Check_Interval=xNumber of minutes that the users trade instant messages
Logout_Timeout=xNumber of minutes that a user waits before logging back in
IM_Interval=xNumber of seconds to wait to send the next instant message
IM_Timeout=x Number of milliseconds that is the maximum threshold for instant message delivery
Resolve_Wait_Time=x Number of milliseconds that is the maximum threshold for user lookup
Login_Wait_Time=x Number of milliseconds that is the maximum threshold for login

The necessary Lotus Sametime server and login information is stored in the IMEasy.properties file. This file is where the Watchit tool stores the server, user, and password information for the user who sends the alerts. Also found in the IMEasy.properties file are the list of users who receive the alerts. This file allows the tool to be separated from the Lotus Sametime data that might change over time. See figure 1 for an example of the IMEasy.properties file. To disable the function of alerting, remove the IMEasy.properties file.

To run this plug-in, add awarecheck to the Plugin_Classes value in watchit.properties. Values are comma delimited so multiple plug-ins can be run at the same time.

Plugin_Classes=healthchecker,awarecheck

The siponewaycheck plug-in

The design of the siponewaycheck plug-in bot provides a simple way to measure connectivity, both functional and performance, between external communities. It is functionally the same as the awarecheck plug-in described previously, but it can communicate to non-Lotus Sametime communities or to external communities that are not network accessible to the bot itself. The plug-in simulates a thread logging in to the local community. The external user to be resolved needs to be logged in as an echo bot at the external application. The term echo bot describes a simple bot that responds to an instant message with the original message. After both users have successfully logged in, Thread #1 resolves User2 and a back-and-forth game of message tag begins. Sequence numbers are provided to ensure that messages are not lost.

The bot recycles the user login and restarts every 90 minutes by default. If any message is undeliverable, or if the users detect a change in the user status (for example, going offline), then a thread is created to notify the system administrators that the Lotus Sametime environment is experiencing an outage using instant messaging. Logs can be used to gather specific time stamps on error messages to compare to network traces or other Lotus Sametime log information.

The sipcheck.properties file (shown in listing 4) identifies the following:

  • User1 login information used as the master to drive the messages
  • User2 information to resolve the remote user implemented as a ping bot in the remote community
  • Performance thresholds to detect latency in Lotus Sametime
Listing 4. Sample sipcheck.properties file
Check_Interval=30
Logout_Timeout=5
IM_Interval=10
Login_Timeout=60
Debug=true
Check_Interval=60

#Sametime user 1
Sametime_User1=stsipbot
Sametime_Server1=stserver.company.com
Sametime_Pw1=password
Sametime_Namelookup1=stsipbot@company.com

Sametime_Namelookup2=stsipecho@company_external.com

To show verbose output of the bot transactions, use Debug=true in the staware.properties file.

Sametime _User sections handle the two users that are exchanging messages and checking awareness of each other. The important thing to note is the Sametime_Namelookup2 field. Because users are being tested over an SIP or gateway connection to an external community, the Internet address must be used.

Performance thresholds are defined as shown in table 2.

Table 2. Performance thresholds for the siponewaycheck plug-in
FunctionThreshold
Check_Interval=x Number of minutes that users trade messages
Logout_Timeout=xNumber of minutes that users wait before logging back in
IM_Interval=x Number of seconds to wait to send the next message
IM_Timeout=x Number of milliseconds that is the maximum threshold for message delivery (round trip)
Login_Wait_Time=x Number of milliseconds that is the maximum threshold for login

The User 2 entry must be implemented as a ping bot that sets its status as a remote client of the plug-in. This bot can be developed in any remote community.

Included in the Watchit package is an example of a Lotus Sametime ping bot that can be used as a remote Lotus Sametime echo bot. A Lotus Sametime echo bot is provided as an example of creating another platform version or to use with this plug-in.

The necessary Lotus Sametime server and login information is stored in the IMEasy.properties file. This approach allows the tool to be separated from the Lotus Sametime data that might change over time. To disable the function of alerting, remove the IMEasy.properties file.

To run this plug-in, add siponewaycheck to the Plugin_Classes value in watchit.properties. Values are comma delimited so that multiple plug-ins can be run at the same time.

Plugin_Classes=healthchecker,awarecheck,siponewaycheck

Notifications sent through instant messages

Each plug-in uses the watchit.sendchats() API provided with the Watchit tool to make delivering an instant message quick and easy, without requiring future modifications for password resets, target group or users, or server name changes. Appendix A, “Watchit API to send IM alerts,” documents how this API is used. Figure 1 shows an example of a IMEasy.properties file to highlight how values can be changed without changes to the source for the plug-in or for the Watchit tool as a whole. Each plug-in uses the same user, password, and server information to send any alert to the list provided, all through the IMEasy.properties file.

The example in figure 1 shows a notification from the healthcheck plug-in that monitors the network availability of any network resource. Notifications contain useful information regarding specific failure and are sent to any user or group defined with the directory. Lotus Sametime history logs can also be used to check for previous outages.

Figure 1. Lotus Sametime notification from the healthcheck plug-in
Lotus Sametime notification from the healthcheck plug-in

The healthcheck output to the notification list includes the following:

  • Time of outage
  • Server or host name
  • Port number
  • Exception type (one of three thrown by the socket open call)
  • Reason returned in Exception object text field

The example shown in figure 2 is the result of the awarecheck plug-in discovering a delivery problem in the production environment. Specific failure messages, time of failure, and users involved are sent to each administrator who can then take action or investigate the server status of the resources in question.

Figure 2. Lotus Sametime notification from the awarecheck plug-in
Lotus Sametime notification from the awarecheck plug-in

If you are using the Lotus Sametime Eclipse-based clients, automatic chat logging can also be used to keep a running record of outages. Group chats can be established from the notification window to include other administrators who might have an idea about what is wrong or how to resolve the issue.

Prerequisites of the tool

One of the requirements of Watchit was to make it as lightweight and portable as possible. This requirement meant three things:

  1. The ability to run this application on anything from a small desktop to a large server

    • The ability to open and close sockets to remote hosts or servers is a network operation and does not require any large amount of processing on the image running the application.
    • To perform the Lotus Sametime simulation, only one JAR file is needed from the Lotus Sametime Java™ SDK, which is shipped with this package.
  2. Minimal software installed on the client

    • The only software prerequisite for Watchit is having the JRE 1.4.2 or later installed and found within the path.
  3. The ability to run on any operating system

    • Written in Java, Watchit is operating system agnostic and can run almost anywhere. The Java JRE 1.4.2 provides native support for many operating systems, including Microsoft® Windows®, UNIX®, Linux®, and host-based systems, eliminating the requirement for operating system-specific software components on the monitoring host.

Watchit is a versatile tool that can be placed anywhere in the network and that can monitor countless network-available applications and resources from one location. Also consider placing it on the workstation of a user reporting a problem, to provide better data collection for specific failures.

Bot structure and services

The Watchit bot provides a simple method for creating monitors as plug-ins to extend the functionality of the tool to match and support any user environment. The bot comes with the three plug-ins described previously, but it is equally important to understand how to extend the functionality with custom plug-ins.

The Watchit bot reads the watchit.properties file, created by the user, to identify which plug-ins are to be started when the tool is used Each plug-in is a set of class files that implement threads to perform specific tasks that use the supplied instant messaging framework, send alerts when trouble is found, and utilize the logging services to provide an integrated log of plug-in output.

An example of watchit.properties is this:

# Invoke the healthchecker and awarecheck plugin classes
Plugin_Classes=healthchecker,awarecheck

When the bot is used, this property is read and each custom class is run as a thread of the main Watchit bot. The custom class plug-ins can utilize any Java API toolkit or base API class, so the possibilities of the content of these plug-ins are endless.

The Watchit bot provides services for the plug-in developer to use to quickly integrate the monitor classes into the supplied framework, which gives the developer access to the simple IMEasy classes for alerts and a logging API to neatly combine all bot output into an integrated log of activity. The IMEasy framework is described in Appendix A. Log services are documented in Appendix B. The IMEasy package, invoked through the watchit.sendchats() API, makes sending an alert require a few lines of code with all the necessary bot interfaces provided by the package itself.

Creating the plug-in is simple, and the supplied APIs make it easy to create your own application alerts. Creating a plug-in is done with the following steps and requirements.

The custom class that you create needs to do or provide only the following to make it a plug-in to this bot:

  • A public default constructor; for example,

    public awarecheck()

    This class name is the entry in the watchit.properties Plugin_Classes setting.

  • A compilation with javac -classpath IMEasy.jar;watchit.jar;.;STComm.jar
  • An extension of the thread as it runs as a thread of the bot; for example,

    public class awarecheck extends Thread

    NOTE: The bot invokes threads (remember that each plug-in is a thread) only when it is started; after a thread terminates it is not restarted until the bot is invoked again.

  • Use of the framework for alerts from your monitor

    The watchit.sendchats() method is provided as one API call to send all alerts for every plug-in. It also simplifies the task of creating messages.

  • Use of supplied log files from the Watchit class (see Appendix B)

    Watchit provides a static method printall(String) to add log entries to the Watchit_YYMMDD_HH_MM_SS.log. All logging adds a date and time stamp to the log; however, it is the plug-in’s responsibility to identify itself in the log due to the multiple of plug-ins writing to the combined file. This approach makes it easier to pull only certain plug-in information from a log if wanted. The convention used in this article is to prefix the message with the bot name supplied in the watchit.properties file.

Extending the Watchit tool with monitors (plug-ins) should be done to cover organizational critical tasks utilizing the necessary product toolkits. Simple code requirements and use of the IMEasy IM package make it quick and easy to create whatever is required.

Running the tool

There will be times when this tool is best run on an as-needed basis or as a background job, not as a daemon or Microsoft Windows service task. You can download a file that contains a UNIX and DOS shell script to invoke the Watchit tool in the “Download” section of this article. It is also possible to wrap these classes into a Microsoft Windows service or UNIX daemon task, to be able to control the execution of each instance.

To run the Watchit bot in the foreground on Microsoft Windows, use this code:

watchit.bat

To run the Watchit bot in the foreground on UNIX or Linux operating systems, use this code:

watchit.sh

Using the postprocessor to view trends of information

The tool comes with a postprocessing script that requires a UNIX shell and awk capabilities. Any UNIX or Microsoft Windows operating system (using a UNIX shell simulator) can be used to run the postprocessing tool. To see summary information on a specific instance, use the script with the log as input. To see trends, concatenate log files and run a processing script on the combined output.

To run the postprocessor, use this code:

(From any unix shell) process_bot_output.sh <logname>

Output appears to standard out and <logname>.out file.

Sample output for process_bot_output post processing script is shown in figure 3.

Figure 3. Output for process_bot_output post processing script
Output for process_bot_output post processing script

Output from the postprocessing script provides averages in response times, total errors, and performance thresholds exceeded counts. Summary data for each run or combined runs can be collected and charted. This ability provides failure counts and performance statistics for the test combining the Lotus Sametime and network perspectives.


Where to use Watchit and when

The Watchit tool and framework are versatile as both a continuous proactive monitoring tool and a service aid capable of collecting data and reproducing problems. The nature of using the simple IM APIs documented in Appendix A and provided in the watchit.zip file in the “Download” section of this article enables this tool to watch an entire deployment from a single workstation and to alert anyone or any group in the organization instantly. Its logging, which produces exact timelines and error messages received by users, makes it an effective tool to collect data or identify the root cause of issues. Whether used as a flexible monitoring tool targeting specific mission-critical functionality or as a debugging aid to deal more effectively with function or performance problems, the goal is to make it easy to move this simulation and monitoring tool around to place it at the point of failures or suspected weak spots in the environment.

Given its modest system requirements, Watchit runs on almost any workstation. This fact is critical to the flexibility where an administrator can deploy the capability. Any platform supporting Java 1.4.2 and later can support many instances of the application, making the limitations for where this tool can be deployed effectively zero. It might be necessary to run an instance directly on a specific user system, depending on the nature of the problem. Its lightweight design makes this task easy to do.

When considering where to install instances of Watchit, view the tool as a user whom your administration team would like to hear from first when a problem occurs. It is best placed at the point in your environment where user connectivity is mission critical. By using any of the provided or created plug-ins, the tool simulates the user activity and alerts the administration team when performance or function problems occur. When problems are reported and need to be debugged, additional instances can easily be created to test specific capabilities, connectivity, or functionality.

Deciding when to use this tool is the next consideration. It can be best to run some level of monitoring throughout the environment 24X7. There is no expense, and this coverage provides the added benefit of leveraging your existing investment in Lotus Sametime. When problems occur, the tool is best placed at the point of failures to assist in data collection. The logs are often more reliable and more detailed than any user report of a problem. Whether the problems are slow performance or user disconnects to any server or resource, specific errors are recorded for each task and performance results are collected.

Should the regular monitoring instance report problems, additional instances can be dropped into place quickly to further isolate the issue and test permutations. After the instance is in place, it is then possible to use the logs to pinpoint errors or use the post-processing scripts to identify performance or failure trends over multiple runs of the instance.


Conclusion

The ability to become more proactive in supporting your production environment and better use your current investment in Lotus Sametime is demonstrated by the practical use of the Watchit tool Creating new plug-ins using the application framework can provide additional value by modeling user activity with product toolkits. The inherent use of messaging technology can make applications a valuable resource as they better simulate mission-critical capabilities and alert the necessary teams instantly.

Using this existing tool, framework, and plug-ins, this solution provides better insight to the user experience, making it easier to collect data and reproduce problems. This outcome can lead to shorter outages and lower time to resolution of open issues. Being ahead of any problem and its user reports is critical to providing a satisfactory level of service to the user community as a whole.

Why wait until users have spent time duplicating the process of opening a trouble ticket with the help desk? Become more proactive in your approach to understanding your application environment while increasing your ability to trap errors upon their occurrence.


Appendix A: Watchit API to send alerts

The Watchit tool provides a static routine that any plug-in can invoke to send IM alerts easily.

Requirements: JRE 1.4.2 and later

Each plug-in shares the same information regarding the user that is defined to send the alerts, the server to log in, password, and a list of recipients. This sharing is done with the IMEasy.properties file, which is read when the tools call the following routine.

To send the alert to the list of administrators defined in the IMEasy.properties file, the sendchats method can be called from any plug-in that the Watchit tool is running:

void sendchats(String error_to_im[], int error_index, boolean debug)

This code is defined as the static method of the watchit class.

The instant message is sent after the watchit.sendchats() method is called from any plug-in.

static synchronized void sendchats(String error_to_im[], int error_index, boolean debug)
error_to_im  -  String array containing IM content
index  -  # of entries in String array that need to be sent
default is to print all entries (even if empty entries are at the end of the array
in_debug  -  turns on verbose logging to stdout
debug issues if IMs are not delivered

To run the tool, STComm.jar, IMEasy.jar, and IMEasy.properties need to be found in the classpath value. The watchit.bat and watchit.sh scripts automatically add these files to the execution of the application.

For example, listing 5 shows how to invoke this API. In this case, each plug-in provides a sendchats API that is a wrapper to the watchit.sendchats() API.

Lising 5. Invoking the API
void sendchats()
{
  if (!(Disable_IM))
  {
    watchit.sendchats(Errors, error_index,debug);
    
    if (service_log_failures)
      Printnow("Date/time of Check: " + loop_time); 
      
    if (debug)
      Printnow("chat thread is now completed");
      
    notification_complete=false;
    
    if (debug)
      Printnow("Alert delivered to user");
  }
}

Appendix B: Log API provided by Watchit bot

Any Watchit plug-in can write to the log file by use of the printall method of the watchit class.

To log to the watchit log file use: (from the watchit class)

static void printall(String printme)

NOTE: Try to use the convention of "MONITOR NAME: message text" The method adds the date and time. You add the message text.

For example:

watchit.printall("Network Check: Network Scan Begin");
would print:

07/01/09 12:59:14 Network Check: Network Scan Begin

The log file is written as watchit_YYMMDD_HH_MM_SS.log.


Download

For download instructions, please email the author at jdewan@us.ibm.com.

Resources

Learn

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into IBM collaboration and social software on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Lotus
ArticleID=460606
ArticleTitle=Monitoring availability, performance, infrastructure, and beyond using IBM Lotus Sametime
publish-date=08232012