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.
To configure Monitoring PlugIn you are required to uncomment the plugIn from the server configuration file:
<!-- 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>
<!-- 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>
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.
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:
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
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.
Copyright © 2013 Innotrade GmbH. All rights reserved.