-
Notifications
You must be signed in to change notification settings - Fork 2
Manual
In this manual, we describe how to get started with MobSOS Data Processing. You will learn how to monitor a node and log data of a service.
Add the --observer
when you start a las2peer node with the L2pNodeLauncher. For example:
java -cp "lib/*" i5.las2peer.tools.L2pNodeLauncher -p 9010 --observer "startService('[email protected]')" interactive
Notice: The node and MobSOS Data Processing have to be in one las2peer network. Otherwise no data will be collected.
To publish a monitoring event please use the Context.get().monitorEvent(...) methods. These special events are also written into a separate log file, so that they are distinguishable from the standard logs.
Choose the monitoring over the local logging whenever you can, so that you enable rich analytics for your application.
You can use the following line as a template:
Context.get().monitorEvent(MonitoringEvent.SERVICE_CUSTOM_MESSAGE_X, "Provide here some information that can be evaluated");
For different events just replace X with a different number. There exists a list of built-in monitoring events. The logged data can be evaluated by the MobSOS Success Modeling by an xml file containing the specified success model.
For more information see the las2peer Wiki