A bunch of questions...

John Mazzitelli mazz at redhat.com
Fri Aug 12 18:23:21 UTC 2011


RHQ Server doesn't support HTTP DELETE.

See org.rhq.enterprise.gui.download.DownloadServlet.getRootDownloadsDir()

for an example how the download servlet finds the downloads location.

We should probably add a API on CoreServerMBean to get the downloads 
directory, just so we don't hve to hardcode that relative directory (we 
do that in a few places in the server).

On 08/12/2011 01:58 PM, Steven North wrote:
> Hi,
>
> I'm glad you pointed this out.  At the moment I am going the route of
> adding some serverplugin operations to list snapshots and to remove
> snapshots based on time.  Eventually, we could schedule those
> operations, as suggested.  One issue I am trying to resolve is how to
> map the URL returned by supportManager.getSnapshotReport() to the
> location on disk where the file resides so I can delete the file.  Is
> there some server API that would return the directory path to the
> "downloads" directory
> ($RHQ_SERVER_HOME/server/default/deploy/rhq.ear/rhq-downloads/)?  Or can
> I use an HTTP DELETE request to delete the files?
>
> Thanks,
>
> Steve
>
> On 8/3/2011 11:36 AM, John Mazzitelli wrote:
>> Is there any way to manage the snapshot reports on the JON server?  At a
>> minimum we would probably want to age them off to prevent using all the
>> disk space.  Ideally, the user would manage them via the JON UI--is
>> there any support for this?  Can periodic scripts be scheduled on the
>> JON server to clean up these snapshots?  Our current default is to
>> schedule a periodic operation in the JON Server RHQ Agent, if available.
>> Obviously, as you know, the snapshot stuff is not at all considered
>> filled out. We don't do any managing of that such that we purge old ones.
>>
>> That said, you can easily write a server plugin that defines a scheduled
>> job (you can do this easily via the server plugin descriptor metadata)
>> and that scheduled job runs periodically every X (minutes, days, hours,
>> whatever) and does whatever it is you want - such as purge a downloads
>> directory of old files.
>>
>> If you already have a server plugin (which you do), just add this
>> metadata to your plugin's descriptor. In your server plugin descriptor,
>> you add to it a scheduled job and your plugin's job method (which you
>> write and add to your server plugin component) will be called periodically.
>>
>> See:
>> http://rhq-project.org/display/RHQ/Server+Plugin+Development#ServerPluginDevelopment-ScheduledJobs
>>
>> This should be easy to do.
>>
>
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/rhq-devel


More information about the rhq-devel mailing list