Child pages
  • Wonder JavaMonitor and wotaskd

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 :

Code Block
nonenone
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
Code Block
nonenone
titleFetching Details for All Applications
none
curl -X GET http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json
Code Block
nonenone
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
Code Block
nonenone
titleDelete an Application
none
curl -X DELETE http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample.json
Code Block
nonenone
titleAdding a New Instance
none
curl -X GET http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/addInstance&host=localhost
Code Block
nonenone
titleDelete an Instance
none
curl -X GET http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/deleteInstance?id=1
Code Block
nonenone
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.

Code Block
nonenone
titleFetching Details for All Applications
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json
Code Block
nonenone
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
Code Block
nonenone
titleDelete an Application
none
curl -X DELETE http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample.json
Code Block
nonenone
titleAdding a New Instance
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/addInstance&host=localhost
Code Block
nonenone
titleDelete an Instance
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/deleteInstance?id=1
Code Block
nonenone
titleConfiguring the Site
none
curl -X PUT -d "{woAdaptor:'www.mydomain.com'}" http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mSiteConfig.json
Code Block
nonenone
titleStarting all applications
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/start
Code Block
nonenone
titleStarting a specific application (AjaxExample in this example)
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/start
Code Block
nonenone
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
Code Block
nonenone
titleStopping all applications
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/stop
Code Block
nonenone
titleStopping a specific application (AjaxExample in this example)
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/stop
Code Block
nonenone
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
Code Block
nonenone
titleForce quit all applications
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/forceQuit
Code Block
nonenone
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
Code Block
nonenone
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
Code Block
nonenone
titleInformation about all applications
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/info
Code Block
nonenone
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
Code Block
nonenone
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
Code Block
nonenone
titleCheck if all applications are running
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/isRunning
Code Block
nonenone
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
Code Block
nonenone
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
Code Block
nonenone
titleCheck if all applications are stopped
none
curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/isStopped
Code Block
nonenone
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
Code Block
nonenone
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

...