Monitoring Plugin Administrator Guide

Downloading Monitoring PlugIn

For the installation of the Monitoring PlugIn, the user should be downloading the packages containing in the jWebSocket server. The user can find that in our Download area.

Configuring the PlugIn

To configure Monitoring PlugIn you are required to uncomment the plugIn from the server configuration file:

  1. Open the file JWEBSOCKET_HOME/conf/jWebSocket.xml
  2. Find the occurrence of "jWebSocketMonitoringPlugIn" under the "plugins" section and uncomment the complete plug-in, it may look as follows:
  3. <!-- Monitoring plugin -->
    <plugin>
    	<name>org.jwebsocket.plugins.monitoring.MonitoringPlugIn</name>
    	<id>MonitoringPlugIn</id>
    	<jar>jWebSocketMonitoringPlugIn-1.0.jar</jar>
    	<server-assignments>
    		<server-assignment>ts0</server-assignment>
    	</server-assignments>
    </plugin>
  4. Find the occurrence "org.jwebsocket.filters.monitoring.MonitoringFilter" under the "filters" section and uncomment the complete filter, it may look as follows:
  5. <!-- this filter is required to capture all events for the monitoring plug-in -->
    <filter>
    	<name>org.jwebsocket.filters.monitoring.MonitoringFilter</name>
    	<id>jws.monitoringFilter</id>
    	<ns>org.jwebsocket.plugins.monitoring</ns>
    	<jar>jWebSocketMonitoringPlugIn-1.0.jar</jar>
    	<server-assignments>
    		<server-assignment>ts0</server-assignment>
    	</server-assignments>
    </filter>
Running the Monitoring PlugIn

Now that we configured properly our MonitoringPlugIn we are able to run by first time the monitoring to extract information from your server and show it to the users. You should keep in mind that once the plug-in is loaded on the server configuration, we just need to run jWebSocketServer and it will automatically execute your jWebSocketMonitoringPlugIn and it's dependencies.

Once you have run the server, you may still see an exception appearing on the server logs:

2015-06-26 10:31:46,023 ERROR - MonitoringPlugIn$getInfo: UnsatisfiedLinkError on gathering computer info, scan thread stopped, please install Sigar JNI libraries: org.hyperic.sigar.Mem.gather(Lorg/hyperic/sigar/Sigar;)V

This error is because you may not have Sigar's libraries already included in the Java Classpath, if you see this error, please don't alarm and follow steps below.

Missing Sigar's libraries?

The Monitoring PlugIn uses the Sigar libraries from Hyperic project. The System Information Collector and Reporter (Sigar), is a library under the GNU GPL for obtaining data from our computer. It is also a multi-platform API that cross-language library and command-line tool can access the operating system and hardware level information in Java, Perl and NET.

For the full operation of this application please copy the native Sigar library to your OS Java libs folder, this library allows us to extract data from our server. It is possible to extract the appropriate information for each Operating System, only please keep in mind that the sigar .so or .dll libraries must be included in any case under the libs folder of your java installation or in the user libs folder.

The following table shows the various versions of the Sigar library and to which location they have to be copied for some Operating Systems.

Files Linux Solaris Windows
32 bits libsigar-x86-linux-1.6.4.so libsigar-x86-solaris.so sigar-x86-winnt.dll
64 bits libsigar-amd64-linux.so libsigar-amd64-solaris.so sigar-amd64-winnt.dll
Address /usr/lib /usr/lib c:\program file\java\jdk\bin

This is because the Sigar API is a multi-platform cross-language library can access the operating system information.

Sigar includes support for Linux, FreeBSD, Windows, Solaris, AIX, HP-UX and Mac OS X through a variety of versions and architectures. Provides portable access to inventory and monitoring data, including:

  • CPU info.
  • Available disk space.
  • Amount of RAM available and in use.
  • Information about the Network (IP address, opent ports, routing tables).
  • Information about the processes currently running on your system.
  • Name and version of operating system.

This is the URL to download the Sigar library: http://sourceforge.net/projects/sigar/files/
If you are looking for the latest download, please click the following link: http://sourceforge.net/projects/sigar/files/latest/download?source=files

MongoDB is also a dependency of MonitoringPlugIn

As jWebSocket stores all information and counters about the tokens sent/received in the server over the time, you may find out that MonitoringPlugIn also needs MongoDB. All that information can later be seen by using the Charting Demo, by opening the section "Server Requests". In that section you will be able to see all incoming and outgoing requests to the server since 2013 until today per hour, day, month, year.
MongoDB is already a requirement from this PlugIn, so, only make sure that you have it installed and running in your localhost and that will be enough for running the plug-in.

Publications

Learn more about WebSockets in general, get background information and gain deeper insight!

Join jWebSocket

Wether developer, designer or translator – join the jWebSocket team and grow together with our success!

Copyright © 2013 Innotrade GmbH. All rights reserved.