Last modified by Pascal Robert on 2023/08/10 22:21

From version 169.1
edited by pyu
on 2012/04/28 00:11
Change comment: There is no comment for this version
To version 173.1
edited by David Avendasora
on 2013/04/18 02:05
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.pyu
1 +XWiki.avendasora
Content
... ... @@ -14,7 +14,7 @@
14 14  
15 15  You can either download them pre-built from [[Wonder's Jenkins build server>>http://jenkins.wocommunity.org/job/Wonder/lastSuccessfulBuild/]] or build them from the source code.
16 16  
17 -To build them from the [[Wonder source code>>WONDER:Getting the Wonder Source Code]], simply run the following command from the Wonder directory at the root of the Wonder source.
17 +To build them from the [[Wonder source code>>Getting the Wonder Source Code]], simply run the following command from the Wonder directory at the root of the Wonder source.
18 18  
19 19  {{code}}
20 20  ant frameworks deployment.tools -Ddeployment.standalone=true
... ... @@ -102,17 +102,19 @@
102 102  
103 103  {{/code}}
104 104  
105 -{{code}}
105 +{{info}}
106 106  
107 107  If JavaMonitor is configured with a password, and I hope you do, pass _pw=monitorpassword_ as a argument to the query :
108 108  
109 -{{[http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/wa/statistics?pw=monitorpassword]}}
109 +{code}
110 +http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/wa/statistics?pw=monitorpassword
110 110  
111 -{{[wget http://monitorhost:56789/cgi-bin/WebObjects/JavaMonitor.woa/admin/stop?type=app&name=InstanceName&pw=yourPassword]}}
112 +wget http://monitorhost:56789/cgi-bin/WebObjects/JavaMonitor.woa/admin/stop?type=app&name=InstanceName&pw=yourPassword
113 +{code}
112 112  
113 -{{/code}}
115 +{{/info}}
114 114  
115 -==== Direct Actions for Management Tasks ====
117 +==== Direct Actions in JavaMonitor for Management Tasks ====
116 116  
117 117  You can do most of the standard management tasks you'd normally do in JavaMonitor's web UI by calling standard WebObjects Direct Actions. Instead of using the ##/wa/## request handler though, these management tasks use a new ##/admin/## request handler. These Direct Actions can be very useful, especially if you need to restart instances or other do tasks from the command line, from within Ant or other build or deployment systems.
118 118  
... ... @@ -152,9 +152,9 @@
152 152  ##turnRefuseNewSessionsOn?##{{{}{*}type=ins&name=*{}}}{{color value="maroon"}}{{{}{*}AppName{*}{}}}{{/color}}{{{}*\-*{}}}{{color value="maroon"}}{{{}{*}InstanceNumber{*}{}}}{{/color}}
153 153  
154 154  * {{{*}turnRefuseNewSessionsOff{*}}} : Returns {{{*}OK{*}}} after turning off "Refuse new sessions" as specified
155 -##turnRefuseNewSessionsOn?##{{{}{*}type=all{*}}}
156 -##turnRefuseNewSessionsOn?##{{{}{*}type=app&name=*{}}}{{color value="maroon"}}{{{}{*}AppName{*}{}}}{{/color}}
157 -##turnRefuseNewSessionsOn?##{{{}{*}type=ins&name=*{}}}{{color value="maroon"}}{{{}{*}AppName{*}{}}}{{/color}}{{{}*\-*{}}}{{color value="maroon"}}{{{}{*}InstanceNumber{*}{}}}{{/color}}
157 +##turnRefuseNewSessionsOff?##{{{}{*}type=all{*}}}
158 +##turnRefuseNewSessionsOff?##{{{}{*}type=app&name=*{}}}{{color value="maroon"}}{{{}{*}AppName{*}{}}}{{/color}}
159 +##turnRefuseNewSessionsOff?##{{{}{*}type=ins&name=*{}}}{{color value="maroon"}}{{{}{*}AppName{*}{}}}{{/color}}{{{}*\-*{}}}{{color value="maroon"}}{{{}{*}InstanceNumber{*}{}}}{{/color}}
158 158  
159 159  * {{{*}turnAutoRecoverOn{*}}} : Returns {{{*}OK{*}}} after turning on "Auto Recover" as specified
160 160  ##turnAutoRecoverOn?##{{{}{*}type=all{*}}}
... ... @@ -190,9 +190,9 @@
190 190  To get details about instance **1** of the **AjaxExample** application:
191 191  ##[[http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/admin/info?type=ins&name=AjaxExample-1]]##
192 192  
193 -==== Remote Control via REST Routes ====
195 +==== Remote Control via REST Routes (for JavaMonitor) ====
194 194  
195 -If the control offered by the Direct Actions isn't enough, JavaMonitor allows additional control via [[REST>>WONDER:ERRest Framework]] calls. Between the two methods (Direct Actions, REST) you have almost full remote-control of JavaMonitor. Just make sure that your JavaMonitor installation is secure Just like with Direct Actions, you need to append ##?pw=XXXX## to the URLs if your JavaMonitor is password protected.
197 +If the control offered by the Direct Actions isn't enough, JavaMonitor allows additional control via [[REST>>ERRest Framework]] calls. Between the two methods (Direct Actions, REST) you have almost full remote-control of JavaMonitor. Just make sure that your JavaMonitor installation is secure Just like with Direct Actions, you need to append ##?pw=XXXX## to the URLs if your JavaMonitor is password protected.
196 196  
197 197  Examples of REST calls :
198 198  
... ... @@ -240,6 +240,154 @@
240 240  
241 241  Note that before configuring the site you must first add a host. If you attempt to configure the site prior to adding a host you will get an InvalidStateException.
242 242  
245 +==== Remote Control via REST Routes (for wotaskd) ====
246 +
247 +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.
248 +
249 +{{code title="Fetching Details for All Applications"}}
250 +
251 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json
252 +
253 +{{/code}}
254 +
255 +{{code title="Adding a New Application"}}
256 +
257 +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
258 +
259 +{{/code}}
260 +
261 +{{code title="Delete an Application"}}
262 +
263 +curl -X DELETE http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample.json
264 +
265 +{{/code}}
266 +
267 +{{code title="Adding a New Instance"}}
268 +
269 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/addInstance&host=localhost
270 +
271 +{{/code}}
272 +
273 +{{code title="Delete an Instance"}}
274 +
275 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/deleteInstance?id=1
276 +
277 +{{/code}}
278 +
279 +{{code title="Configuring the Site"}}
280 +
281 +curl -X PUT -d "{woAdaptor:'www.mydomain.com'}" http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mSiteConfig.json
282 +
283 +{{/code}}
284 +
285 +{{code title="Starting all applications"}}
286 +
287 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/start
288 +
289 +{{/code}}
290 +
291 +{{code title="Starting a specific application (AjaxExample in this example)"}}
292 +
293 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/start
294 +
295 +{{/code}}
296 +
297 +{{code title="Starting a specific instance of an application (instance 1 of AjaxExample in this example)"}}
298 +
299 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/start?id=1
300 +
301 +{{/code}}
302 +
303 +{{code title="Stopping all applications"}}
304 +
305 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/stop
306 +
307 +{{/code}}
308 +
309 +{{code title="Stopping a specific application (AjaxExample in this example)"}}
310 +
311 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/stop
312 +
313 +{{/code}}
314 +
315 +{{code title="Stopping a specific instance of an application (instance 1 of AjaxExample in this example)"}}
316 +
317 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/stop?id=1
318 +
319 +{{/code}}
320 +
321 +{{code title="Force quit all applications"}}
322 +
323 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/forceQuit
324 +
325 +{{/code}}
326 +
327 +{{code title="Force quit a specific application (AjaxExample in this example)"}}
328 +
329 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/forceQuit
330 +
331 +{{/code}}
332 +
333 +{{code title="Force quit a specific instance of an application (instance 1 of AjaxExample in this example)"}}
334 +
335 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/forceQuit?id=1
336 +
337 +{{/code}}
338 +
339 +{{code title="Information about all applications"}}
340 +
341 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/info
342 +
343 +{{/code}}
344 +
345 +{{code title="Information about a specific application (AjaxExample in this example)"}}
346 +
347 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/info
348 +
349 +{{/code}}
350 +
351 +{{code title="Information about a specific instance of an application (instance 1 of AjaxExample in this example)"}}
352 +
353 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/info?id=1
354 +
355 +{{/code}}
356 +
357 +{{code title="Check if all applications are running"}}
358 +
359 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/isRunning
360 +
361 +{{/code}}
362 +
363 +{{code title="Check if a specific application is running (AjaxExample in this example)"}}
364 +
365 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/isRunning
366 +
367 +{{/code}}
368 +
369 +{{code title="Check if a specific instance of an application is running (instance 1 of AjaxExample in this example)"}}
370 +
371 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/isRunning?id=1
372 +
373 +{{/code}}
374 +
375 +{{code title="Check if all applications are stopped"}}
376 +
377 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/isStopped
378 +
379 +{{/code}}
380 +
381 +{{code title="Check if a specific application is stopped (AjaxExample in this example)"}}
382 +
383 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/isStopped
384 +
385 +{{/code}}
386 +
387 +{{code title="Check if a specific instance of an application is stopped (instance 1 of AjaxExample in this example)"}}
388 +
389 +curl -X GET http://wotaskdhost:port/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/isStopped?id=1
390 +
391 +{{/code}}
392 +
243 243  === Troubleshooting ===
244 244  
245 -If JavaMonitor won't start up check the [[troubleshooting deployment>>WO:Troubleshooting Deployment]] section. In particular pay attention to the [[WOTaskd Didn't Start>>WO:Troubleshooting Deployment]] Q&A.
395 +If JavaMonitor won't start up check the [[troubleshooting deployment>>Troubleshooting Deployment]] section. In particular pay attention to the [[WOTaskd Didn't Start>>Troubleshooting Deployment]] Q&A.