The complete MoSKito integration guide – Step 5 – MoSKito-Central in remote mode

Eugen Smakula - February 3, 2014 - 3 comments

In the previous step we integrated MoSKito-Central in embedded mode, today is exactly the promised fine day to integrate MoSKito-Central in remote (standalone) mode.

You may ask “Why do we need it?”,  the answer is: our burgershop has become a real empire with multiple application instances and we want to monitor all of them and consolidate the obtained performance data in one place.

So, let’s start!

I. Adding dependencies


We’re just adding a dependency for the remote connector, removing moskito-central-storages and moskito-central-embedded-connector, since we don’t need them anymore.

II. Adding configurations

Now we ask our MoSKitorized app to use the remote connector and tell the app where to connect it.

In moskito.json, write RESTRemoteConnector instead of EmbeddedCentralConnector.

    "@pluginsConfig": {
        "@plugins": [
                "name": "RESTRemoteCentralConnector",
                "configurationName": "rest-connector",
                "className": ""


Now add config for rest-connector:

	host: "localhost",
	port: 8080,
	resourcePath: "/moskito-central/central/addSnapshot"

This config says where to connect.

We also remove moskito-centralmoskito-csv and moskito-fs configs from the shop and will configure them in the section below.

III. Configure standalone MoSKito-Central web app
To configure our remote web app, it would be nice to get it before 🙂

Download the latest version of moskito-central-rest-webapp  from Maven:, unpack, make changes to configs, and pack again.

Or, get the project from github:

git clone
cd moskito-central/moskito-central-server/moskito-central-rest-webapp/

Configure storages in the same way as in embedded mode.

    "@storages": [
            "name": "json-file",
            "clazz": "",
            "configName": "moskito-fs"
            "name": "csv-file",
            "clazz": "",
            "configName": "moskito-csv"


    "pattern": "/tmp/moskito-central/json/{host}/{component}/{producer}/{interval}/{date}/{date}_{time}_{producer}.json",
    "serializer": "",
    "includeIntervals": "*",
    "excludeIntervals": "15m",
    "includeProducers": "*",
    "excludeProducers": ""


    "pattern": "/tmp/moskito-central/csv/{host}/{component}/{producer}/{interval}/{producer}_{stat}.csv",
    "@entries": [
            "includedProducers": "SessionCount",
            "includedStats": "*",
            "includedIntervals": "*"
            "includedProducers": "RequestURIFilter",
            "includedStats": "cumulated",
            "includedIntervals": "5m,1h"
            "includedProducers": "sales",
            "includedStats": "*",
            "includedIntervals": "1m,1h"

IV. Run folks run!
Rebuild the shop and moskito-central-rest-webapp (if you have downloaded the source code) and deploy both applications.

Again, order your favourite burger if you have one, or just trust our choice 😉


In a moment, you’ll find new directories and data files in your local /tmp/moskito-central folder.

Voila … done!

A couple of notices to finish it all:

That’s is all for today, to sum it up: we have successfully integrated  MoSKito-Central in the remote mode.

Enjoy, and see you!


  1. Klaus Schaefers


    is there an easy way to introgate moskito in a not Java Web App? I was try to monitor some JMS based apps, which do not run in a container. Form what I understood normally the container takes care of setting up the connectors (RMI, HTTP). Is there I way to do this manually?



  2. Hi Klaus,

    sorry, the answer comes late, we don’t usually check the blog comments for questions regularly

    Yes, there is an easy way to do so, actually there is an example in the blog that does exactly that:

    Feel free to ask for help if you get stuck at some point, but use the mailing list next time


  3. Marek


    is it somehow possible to view via moskito inspector files stored by moskito center. Or is there any other UI for view this stats (csv, json, DB)?

    Thanks & Regards

Post a Comment

Your email address will not be published.