-
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('i5.las2peer.services.servicePackage.ExampleService@1.0')" interactiveNotice: The node and MobSOS Data Processing have to be in one las2peer network. Otherwise no data will be collected.
If you want to monitor a service add the following line to the property file of your service:
monitor = TRUETo publish a monitoring event please use the static L2pLogger.logEvent(...) methods. These special events are also written to the log file with log level FINER. This way they don't appear on the console with default levels. Since monitoring requires a las2peer context, it's only possible to log events from inside a L2pThread, which should be usually the case for a las2peer service. You can use the following line as a template:
L2pLogger.logEvent(Event.SERVICE_CUSTOM_MESSAGE_X, getContext().getMainAgent(), "Provide here some information that can be evaluated");For different events just replace X with a different number. There exist 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.