Re: REST routes in JavaMonitor
Le 2010-10-08 à 11:52, Simon a écrit : > i've just started using these for auto-configuring production servers. > it's cracking stuff - thanks! Good to know that people are using it! > is there any javadoc, or a list somewhere of all the functions > available ? I added a couple of examples in the wiki : http://wiki.objectstyle.org/confluence/display/WO/Project+Wonder+additions+to+wotaskd+and+JavaMonitor > if not, where do they live in the code (i.e what class > handles them ?). stupid question, i know, but i'm new to rest and i > can't find them anywhere! The routes are in the JavaMonitor source, in the com.webobjects.monitor.rest package. > i'm still having to mangle the SiteConfig.xml with sed to set things > like the adaptor URL, javamonitor password etc. are their functions > for this kind of stuff ? The routes only have support to add hosts and do everything related to applications, basic setup of wotaskd is not supported right now, but it should be easy to add routes for that. Patches welcome :-) > thanks, simon > > On 29 September 2010 11:55, Pascal Robert wrote: >> Good morning! >> >> Yesterday, I committed REST routes inside JavaMonitor, this is the stuff >> that was demonstrated at WOWODC 2010. With those routes + the direct actions >> Anjo added last year, you can control almost everything remotely (make sure >> JavaMonitor is not open to the world!). The code was added to the trunk of >> Wonder (the Wonder53 build) so if you want to play with it, make sure you >> get it from this build. >> >> Below is a couple of call examples. Please note that if JavaMonitor requires >> a password, you need to append ?passwd=X at the end of the URLs. >> >> >> >> Fetching the details of all applications : >> >> curl -X GET >> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json >> >> Adding a new application : >> >> 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://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json >> >> Adding a new instance : >> >> curl -X GET >> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/addInstance&host=localhost >> >> Delete an application : >> >> curl -X DELETE >> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample.json >> >> Delete an instance : >> >> curl -X GET >> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/deleteInstance?id=1 >> >> Adding a new host : >> >> curl -X POST -d "{id: 'otherserver.com',type: 'MHost', osType: >> 'MACOSX',address: '192.168.20.5', name: 'otherserver.com'}" >> http://127.0.0.1:56789/apps/WebObjects/JavaMonitor.woa/ra/mHosts.json >> >> >> -- >> Pascal Robert >> prob...@macti.ca >> >> AIM/iChat : MacTICanada >> LinkedIn : http://www.linkedin.com/in/macti >> Twitter : pascal_robert >> >> ___ >> Do not post admin requests to the list. They will be ignored. >> Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) >> Help/Unsubscribe/Update your Subscription: >> http://lists.apple.com/mailman/options/webobjects-dev/simon%40potwells.co.uk >> >> This email sent to si...@potwells.co.uk >> ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: REST routes in JavaMonitor
i've just started using these for auto-configuring production servers. it's cracking stuff - thanks! is there any javadoc, or a list somewhere of all the functions available ? if not, where do they live in the code (i.e what class handles them ?). stupid question, i know, but i'm new to rest and i can't find them anywhere! i'm still having to mangle the SiteConfig.xml with sed to set things like the adaptor URL, javamonitor password etc. are their functions for this kind of stuff ? thanks, simon On 29 September 2010 11:55, Pascal Robert wrote: > Good morning! > > Yesterday, I committed REST routes inside JavaMonitor, this is the stuff that > was demonstrated at WOWODC 2010. With those routes + the direct actions Anjo > added last year, you can control almost everything remotely (make sure > JavaMonitor is not open to the world!). The code was added to the trunk of > Wonder (the Wonder53 build) so if you want to play with it, make sure you get > it from this build. > > Below is a couple of call examples. Please note that if JavaMonitor requires > a password, you need to append ?passwd=X at the end of the URLs. > > > > Fetching the details of all applications : > > curl -X GET > http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json > > Adding a new application : > > 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://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json > > Adding a new instance : > > curl -X GET > http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/addInstance&host=localhost > > Delete an application : > > curl -X DELETE > http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample.json > > Delete an instance : > > curl -X GET > http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/deleteInstance?id=1 > > Adding a new host : > > curl -X POST -d "{id: 'otherserver.com',type: 'MHost', osType: > 'MACOSX',address: '192.168.20.5', name: 'otherserver.com'}" > http://127.0.0.1:56789/apps/WebObjects/JavaMonitor.woa/ra/mHosts.json > > > -- > Pascal Robert > prob...@macti.ca > > AIM/iChat : MacTICanada > LinkedIn : http://www.linkedin.com/in/macti > Twitter : pascal_robert > > ___ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/webobjects-dev/simon%40potwells.co.uk > > This email sent to si...@potwells.co.uk > ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: REST routes in JavaMonitor
I'm not dead yet! I think I'll go for a walk... (thump) Yes, my pre-burial grave site just had a small earth tremor. Busy finishing up old projects and about to jump back into the latest 3.6.1 w/ Wonder 5.4 branch goodness for ERModern stuff. Hopefully its not breaking daily at this point. D2W mind binding will commence next week as I hope to relearn (or learn) that state of mind. In all seriousness, I'm unsure of what should be done with JavaMonitor and passwords to alleviate the obvious potential weaknesses. SSL is a chore and not worth the hassle for this per se, but I still think some hash approach for ?pwhash=123456ABCDEF that could be longish (think WEP?) that is evaluated by the REST service on its end to compare hashes seems to be a least more proper approach. Yes, the hash could be replayed if caught over the air, but its still just a computed representation of the password, and not the password itself. This still keeps the clear text password secret from the net since this may be in use at other places (db pass, user account, etc) On Wed, Sep 29, 2010 at 4:18 AM, David Avendasora wrote: > > On Sep 29, 2010, at 6:55 AM, Pascal Robert wrote: > >> Good morning! >> >> Yesterday, I committed REST routes inside JavaMonitor, this is the stuff >> that was demonstrated at WOWODC 2010. With those routes + the direct actions >> Anjo added last year, you can control almost everything remotely (make sure >> JavaMonitor is not open to the world!). The code was added to the trunk of >> Wonder (the Wonder53 build) so if you want to play with it, make sure you >> get it from this build. > > Whoo hoo! > >> Please note that if JavaMonitor requires a password, you need to append >> ?passwd=X at the end of the URLs. > > I think Joe Little just turned over in his grave. > > I mean, he would have if he were dead. > > He's not dead, is he? I haven't seen him around much lately. > > *sob* He never writes, I guess we're not important to him anymore. He's > probably off single-signing-on with a Ruby developer. > > Dave > >> >> >> >> Fetching the details of all applications : >> >> curl -X GET >> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json >> >> Adding a new application : >> >> 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://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json >> >> Adding a new instance : >> >> curl -X GET >> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/addInstance&host=localhost >> >> Delete an application : >> >> curl -X DELETE >> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample.json >> >> Delete an instance : >> >> curl -X GET >> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/deleteInstance?id=1 >> >> Adding a new host : >> >> curl -X POST -d "{id: 'otherserver.com',type: 'MHost', osType: >> 'MACOSX',address: '192.168.20.5', name: 'otherserver.com'}" >> http://127.0.0.1:56789/apps/WebObjects/JavaMonitor.woa/ra/mHosts.json >> >> >> -- >> Pascal Robert >> prob...@macti.ca >> >> AIM/iChat : MacTICanada >> LinkedIn : http://www.linkedin.com/in/macti >> Twitter : pascal_robert >> >> ___ >> Do not post admin requests to the list. They will be ignored. >> Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) >> Help/Unsubscribe/Update your Subscription: >> http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com >> >> This email sent to webobje...@avendasora.com >> >> > > ___ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/webobjects-dev/jmlittle%40gmail.com > > This email sent to jmlit...@gmail.com > ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: REST routes in JavaMonitor
Le 2010-09-29 à 10:10, Kieran Kelleher a écrit : > Good job Robert, er, sorry I meant Elvis ;-) Just a note, it's not for Elvis the singer, it's for Elvis Gratton : http://www.youtube.com/watch?v=FVHs12e-Fgc > On Sep 29, 2010, at 6:55 AM, Pascal Robert wrote: > >> Good morning! >> >> Yesterday, I committed REST routes inside JavaMonitor, this is the stuff >> that was demonstrated at WOWODC 2010. With those routes + the direct actions >> Anjo added last year, you can control almost everything remotely (make sure >> JavaMonitor is not open to the world!). The code was added to the trunk of >> Wonder (the Wonder53 build) so if you want to play with it, make sure you >> get it from this build. >> >> Below is a couple of call examples. Please note that if JavaMonitor requires >> a password, you need to append ?passwd=X at the end of the URLs. >> >> >> >> Fetching the details of all applications : >> >> curl -X GET >> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json >> >> Adding a new application : >> >> 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://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json >> >> Adding a new instance : >> >> curl -X GET >> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/addInstance&host=localhost >> >> Delete an application : >> >> curl -X DELETE >> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample.json >> >> Delete an instance : >> >> curl -X GET >> http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/deleteInstance?id=1 >> >> Adding a new host : >> >> curl -X POST -d "{id: 'otherserver.com',type: 'MHost', osType: >> 'MACOSX',address: '192.168.20.5', name: 'otherserver.com'}" >> http://127.0.0.1:56789/apps/WebObjects/JavaMonitor.woa/ra/mHosts.json >> >> >> -- >> Pascal Robert >> prob...@macti.ca >> >> AIM/iChat : MacTICanada >> LinkedIn : http://www.linkedin.com/in/macti >> Twitter : pascal_robert >> >> ___ >> Do not post admin requests to the list. They will be ignored. >> Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) >> Help/Unsubscribe/Update your Subscription: >> http://lists.apple.com/mailman/options/webobjects-dev/kelleherk%40gmail.com >> >> This email sent to kelleh...@gmail.com > ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: REST routes in JavaMonitor
Good job Robert, er, sorry I meant Elvis ;-) On Sep 29, 2010, at 6:55 AM, Pascal Robert wrote: > Good morning! > > Yesterday, I committed REST routes inside JavaMonitor, this is the stuff that > was demonstrated at WOWODC 2010. With those routes + the direct actions Anjo > added last year, you can control almost everything remotely (make sure > JavaMonitor is not open to the world!). The code was added to the trunk of > Wonder (the Wonder53 build) so if you want to play with it, make sure you get > it from this build. > > Below is a couple of call examples. Please note that if JavaMonitor requires > a password, you need to append ?passwd=X at the end of the URLs. > > > > Fetching the details of all applications : > > curl -X GET > http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json > > Adding a new application : > > 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://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json > > Adding a new instance : > > curl -X GET > http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/addInstance&host=localhost > > Delete an application : > > curl -X DELETE > http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample.json > > Delete an instance : > > curl -X GET > http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/deleteInstance?id=1 > > Adding a new host : > > curl -X POST -d "{id: 'otherserver.com',type: 'MHost', osType: > 'MACOSX',address: '192.168.20.5', name: 'otherserver.com'}" > http://127.0.0.1:56789/apps/WebObjects/JavaMonitor.woa/ra/mHosts.json > > > -- > Pascal Robert > prob...@macti.ca > > AIM/iChat : MacTICanada > LinkedIn : http://www.linkedin.com/in/macti > Twitter : pascal_robert > > ___ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/webobjects-dev/kelleherk%40gmail.com > > This email sent to kelleh...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: REST routes in JavaMonitor
On Sep 29, 2010, at 6:55 AM, Pascal Robert wrote: > Good morning! > > Yesterday, I committed REST routes inside JavaMonitor, this is the stuff that > was demonstrated at WOWODC 2010. With those routes + the direct actions Anjo > added last year, you can control almost everything remotely (make sure > JavaMonitor is not open to the world!). The code was added to the trunk of > Wonder (the Wonder53 build) so if you want to play with it, make sure you get > it from this build. Whoo hoo! > Please note that if JavaMonitor requires a password, you need to append > ?passwd=X at the end of the URLs. I think Joe Little just turned over in his grave. I mean, he would have if he were dead. He's not dead, is he? I haven't seen him around much lately. *sob* He never writes, I guess we're not important to him anymore. He's probably off single-signing-on with a Ruby developer. Dave > > > > Fetching the details of all applications : > > curl -X GET > http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json > > Adding a new application : > > 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://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json > > Adding a new instance : > > curl -X GET > http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/addInstance&host=localhost > > Delete an application : > > curl -X DELETE > http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample.json > > Delete an instance : > > curl -X GET > http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/deleteInstance?id=1 > > Adding a new host : > > curl -X POST -d "{id: 'otherserver.com',type: 'MHost', osType: > 'MACOSX',address: '192.168.20.5', name: 'otherserver.com'}" > http://127.0.0.1:56789/apps/WebObjects/JavaMonitor.woa/ra/mHosts.json > > > -- > Pascal Robert > prob...@macti.ca > > AIM/iChat : MacTICanada > LinkedIn : http://www.linkedin.com/in/macti > Twitter : pascal_robert > > ___ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com > > This email sent to webobje...@avendasora.com > > ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
REST routes in JavaMonitor
Good morning! Yesterday, I committed REST routes inside JavaMonitor, this is the stuff that was demonstrated at WOWODC 2010. With those routes + the direct actions Anjo added last year, you can control almost everything remotely (make sure JavaMonitor is not open to the world!). The code was added to the trunk of Wonder (the Wonder53 build) so if you want to play with it, make sure you get it from this build. Below is a couple of call examples. Please note that if JavaMonitor requires a password, you need to append ?passwd=X at the end of the URLs. Fetching the details of all applications : curl -X GET http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json Adding a new application : 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://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications.json Adding a new instance : curl -X GET http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/addInstance&host=localhost Delete an application : curl -X DELETE http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample.json Delete an instance : curl -X GET http://127.0.0.1:56789/cgi-bin/WebObjects/JavaMonitor.woa/ra/mApplications/AjaxExample/deleteInstance?id=1 Adding a new host : curl -X POST -d "{id: 'otherserver.com',type: 'MHost', osType: 'MACOSX',address: '192.168.20.5', name: 'otherserver.com'}" http://127.0.0.1:56789/apps/WebObjects/JavaMonitor.woa/ra/mHosts.json -- Pascal Robert prob...@macti.ca AIM/iChat : MacTICanada LinkedIn : http://www.linkedin.com/in/macti Twitter : pascal_robert ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com