Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can either download them pre-built from Wonder's Jenkins build server or build them from the source code.

To build them from the Wonder source code, simply run the following command from the Wonder directory at the root of the Wonder source.

...

If you call http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/wa/statistics, JavaMonitor will send you back statistics, in serialized Property List format, about instances, per application.

Code Block
nonenone
titleStatistics Example Results
none
(
	{
		"configuredInstances" = "2";
		"maxSessions" = "0";
		"maxAvgIdleTime" = "2.078";
		"avgTransactions" = "44.0000";
		"sumSessions" = "0";
		"avgAvgTransactionTime" = "0.0985000";
		"refusingInstances" = "0";
		"avgSessions" = "0.0000";
		"maxTransactions" = "88";
		"applicationName" = "AjaxExample";
		"avgAvgIdleTime" = "1.0390000";
		"maxAvgTransactionTime" = "0.197";
		"runningInstances" = "2";
		"sumTransactions" = "88";
	},
	{
		"configuredInstances" = "2";
		"maxSessions" = "0";
		"maxAvgIdleTime" = "325.443";
		"avgTransactions" = "0.5000";
		"sumSessions" = "0";
		"avgAvgTransactionTime" = "0.00000";
		"refusingInstances" = "0";
		"avgSessions" = "0.0000";
		"maxTransactions" = "1";
		"applicationName" = "AjaxExample2";
		"avgAvgIdleTime" = "162.7215000";
		"maxAvgTransactionTime" = "0.0";
		"runningInstances" = "2";
		"sumTransactions" = "1";
	}
)

...

Examples of REST calls :

none
Code Block
none
titleAdding a New Host
none
curl -X POST -d "{id: 'otherserver.com',type: 'MHost', osType: 'MACOSX',address: '192.168.20.5', name: 'otherserver.com'}" http://monitorhost:port/apps/WebObjects/JavaMonitor.woa/ra/mHosts.json
none
Code Block
none
titleFetching Details for All Applications
none
curl -X GET http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json
none
Code Block
none
titleAdding a New Application
none
curl -X POST -d "{id: 'AjaxExample',type: 'MApplication', name: 'AjaxExample',unixOutputPath: '/opt/Local/Library/WebObjects/Logs', unixPath: '/opt/Local/Library/WebObjects/Applications/AjaxExample.woa/AjaxExample'}" http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json
none
Code Block
none
titleDelete an Application
none
curl -X DELETE http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample.json
none
Code Block
none
titleAdding a New Instance
none
curl -X GET http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/addInstance&host=localhost
none
Code Block
none
titleDelete an Instance
none
curl -X GET http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/deleteInstance?id=1
none
Code Block
none
titleConfiguring the Site
none
curl -X PUT -d "{woAdaptor:'www.mydomain.com'}" http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mSiteConfig.json

...

Starting on August 10th 2012, wotaskd also have REST routes. By using them, you can do most of the tasks using REST and you might not even need JavaMonitor. Just like the JavaMonitor REST and Direct Actions, you need to append ?pw=XXXX to the URLs if wotaskd is password protected.

none
Code Block
none
titleFetching Details for All Applications
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json
none
Code Block
none
titleAdding a New Application
none
curl -X POST -d "{id: 'AjaxExample',type: 'MApplication', name: 'AjaxExample',unixOutputPath: '/opt/Local/Library/WebObjects/Logs', unixPath: '/opt/Local/Library/WebObjects/Applications/AjaxExample.woa/AjaxExample'}" http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json
none
Code Block
none
titleDelete an Application
none
curl -X DELETE http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample.json
none
Code Block
none
titleAdding a New Instance
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/addInstance&host=localhost
none
Code Block
none
titleDelete an Instance
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/deleteInstance?id=1
none
Code Block
none
titleConfiguring the Site
none
curl -X PUT -d "{woAdaptor:'www.mydomain.com'}" http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mSiteConfig.json
none
Code Block
none
titleStarting all applications
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/start
none
Code Block
none
titleStarting a specific application (AjaxExample in this example)
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/start
none
Code Block
none
titleStarting a specific instance of an application (instance 1 of AjaxExample in this example)
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/start?id=1
none
Code Block
none
titleStopping all applications
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/stop
none
Code Block
none
titleStopping a specific application (AjaxExample in this example)
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/stop
none
Code Block
none
titleStopping a specific instance of an application (instance 1 of AjaxExample in this example)
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/stop?id=1
none
Code Block
none
titleForce quit all applications
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/forceQuit
none
Code Block
none
titleForce quit a specific application (AjaxExample in this example)
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/forceQuit
none
Code Block
none
titleForce quit a specific instance of an application (instance 1 of AjaxExample in this example)
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/forceQuit?id=1
none
Code Block
none
titleInformation about all applications
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/info
none
Code Block
none
titleInformation about a specific application (AjaxExample in this example)
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/info
none
Code Block
none
titleInformation about a specific instance of an application (instance 1 of AjaxExample in this example)
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/info?id=1
none
Code Block
none
titleCheck if all applications are running
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/isRunning
none
Code Block
none
titleCheck if a specific application is running (AjaxExample in this example)
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/isRunning
none
Code Block
none
titleCheck if a specific instance of an application is running (instance 1 of AjaxExample in this example)
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/isRunning?id=1
none
Code Block
none
titleCheck if all applications are stopped
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/isStopped
none
Code Block
none
titleCheck if a specific application is stopped (AjaxExample in this example)
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/isStopped
none
Code Block
none
titleCheck if a specific instance of an application is stopped (instance 1 of AjaxExample in this example)
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/isStopped?id=1

...