Hi,
we (GeoSolutions) would like to propose (and code) an improvement for
the monitoring
code.
We want to integrate monitoring in a setup where there already is a centralized
auditing system (that's the proper name for request by request logging)
that expects to be fed with XML files in a specific format.
What we'd like to add is an asynchronous logger that would play in
parallel with the in-memory DAO and would log all requests on
files. The files would be rolled after N requests and every 24 hours
(first of the two limits that is hit).
We don't want to have a specific xml format, so we were thinking of using
a configurable freemarker template that would be used to save the
requests (so if someone wants to do a non xml format, maybe similar to
the apache one, they are free to do so).
This new thing would not be a DAO per se, but something that would
work in parallel to it, especially if one considers the in memory dao.
A straightforward way would be modify the memory dao to talk
to this new auditor block, but I guess it might not be well received.
What about a pluggable extension point for Monitor instead, a RequestListener?
public void requestListener() {
void requestStarted(RequestData rd);
void requestUpdated(RequestData rd);
void requestSaved(RequestData rd);
}
The auditor would find its config properties from the property file
config as well,
something like:
audit=true
template=audit_template.ftl
extension=xml
path=/var/logs/gs_audit
roll_limit=1000
Wondering, can we have the MonitorConfig expose a property getter like:
<T> T getProperty(String name, Class<T> target)
so that eventual additions to the monitoring (thinking also post processors
here) can grab stuff from there in a type safe way?
Cheers
Andrea
--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-------------------------------------------------------