Changes for page Wonder JavaMonitor and wotaskd
Last modified by Pascal Robert on 2023/08/10 22:21
From version 168.1
edited by Pascal Robert
on 2012/02/11 08:42
on 2012/02/11 08:42
Change comment:
There is no comment for this version
To version 174.1
edited by Pascal Robert
on 2012/08/10 06:41
on 2012/08/10 06:41
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- 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,12 +102,20 @@ 102 102 103 103 {{/code}} 104 104 105 - If JavaMonitor is configured with a password, and I hope you do, pass //pw=monitorpassword// as a argument to the query :105 +{{info}} 106 106 107 - ##[[http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/wa/statistics?pw=monitorpassword]]##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 -==== Direct Actions for Management Tasks ==== 109 +{code} 110 +http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/wa/statistics?pw=monitorpassword 110 110 112 +wget http://monitorhost:56789/cgi-bin/WebObjects/JavaMonitor.woa/admin/stop?type=app&name=InstanceName&pw=yourPassword 113 +{code} 114 + 115 +{{/info}} 116 + 117 +==== Direct Actions in JavaMonitor for Management Tasks ==== 118 + 111 111 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. 112 112 113 113 List of available direct actions : ... ... @@ -184,9 +184,9 @@ 184 184 To get details about instance **1** of the **AjaxExample** application: 185 185 ##[[http://monitorhost:port/cgi-bin/WebObjects/JavaMonitor.woa/admin/info?type=ins&name=AjaxExample-1]]## 186 186 187 -==== Remote Control via REST Routes ==== 195 +==== Remote Control via REST Routes (for JavaMonitor) ==== 188 188 189 -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. 190 190 191 191 Examples of REST calls : 192 192 ... ... @@ -234,6 +234,154 @@ 234 234 235 235 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. 236 236 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 + 237 237 === Troubleshooting === 238 238 239 -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.