-
Notifications
You must be signed in to change notification settings - Fork 1
GSIP 143
Plugins should be able to easily report basic status information: the status page would benefit from this information, and the same information could be reported via rest api.
- Morgan Thompson
- Kevin Smith
- Jody Garnett
This is for GeoServer 2.10. (or 2.9 if available)
- Under Discussion
- In Progress
- Completed
- Rejected
- Deferred
It's tricky/tedious to tell which extensions are configured/installed. As per GEOS-6068 we would like an extension point to report configuration and installation details.
Proposed ExtensionStatus interface:
interface ExtensionStatus {
String getName();
String getVersion();
boolean isAvailable();
boolean isEnabled();
/** Optional status message */
String getMessage();
/** Relative documentation link link to user manual */
String getDocumentation();
// as requested by kevin
boolean canUserEnable();
boolean getUserEnabled();
void setUserEnabled( boolean enabled );
}Kevin has requested canUserDisable(), getUserEnabled() and setUserEnabled(boolean) to control services such as WFS, WFS and WCS in a single location.
Environment based extensions can be reported by gs-main, which would register several ExtensionStatus beans in applicationContext.xml:
<bean id="extensionStatus" class="org.geoserver.web.ExtensionStatus">
<property name="id" value="server.admin.extensionStatus" />
<property name="nameKey" value="ExtensionStatus.name" />
<property name="componenetClass" value="org.geoserver.web.admin.ExtensionStatusPage" />
</bean>Here is an example of reporting Java Rasterizer:
private String checkRenderer() {
try {
String renderer = sun.java2d.pipe.RenderingEngine.getInstance().getClass().getName();
return renderer;
} catch(Throwable e) {
return "Unknown";
}
}This can also be used to report webapp.xml settings such as speed strategy.
An extension such as libjpegturbo that requires native libraries would use:
Main would register several ExtensionStatus beans in applicationContext.xml:
<extension>
</extension>Many extensions, such as gs-oracle, just provide a maven dependency. To make use of ExtensionStatus an applicationContext.xml would be added configuring a prebuild DataStoreExtension bean.
<extension>
</extension>The DataStoreExtension bean references the GeoTools DataStoreFactorySPI (to check the isAvaialble) method, and lists several additional classes to check using Class.forName (to verify oracle driver is available).
Open to suggestions, recommend adding an "extensions" tab to the existing status page, with extensions listed on the right alphabetically and a table on the right showing the details.
Similar to about/manifest we propose an about/extension.xml (or json) endpoint:
<about>
<extension>
<name>gs-main/rasterizer</name>
<version>0.7.3</version>
<enabled>true</enabled>
<status>available</status>
<message>
Java 2D configured with org.marlin.pisces.PicesRenderingEngine.
System property: -Dsun.java2d.renderer=org.marlin.pisces.PiscesRenderingEngine.
Boot classpath contains marlin-0.7.3.jar
</message>
</extension>
<extension>
<name>gs-libjpeg-turbo</name>
<version>2.9.0</version>
<status>available</status>
<enabled>true</enabled>
<message>
Using lib-jepg-turbo 1.4.2.
System property -Ddisable.turbojpeg=(unset)
<message>
<documentation>
http://docs.geoserver.org/latest/en/user/extensions/libjpeg-turbo/index.html
</documentation>
</extension>
<extension>
<name>gs-oracle</name>
<version>2.9.0</version>
<status>unavailable</status>
<enabled>true</enabled>
<message>
JDBC Driver not installed (add ojdbc7 to WEB-INF/lib directory).
<message>
<documentation>
http://docs.geoserver.org/stable/en/user/data/database/oracle.html
</documentation>
</extension>
</about>Jody wonders if we should consider MBeans (or is that overkill).
Project Steering Committee:
- Alessio Fabiani:
- Andrea Aime:
- Ben Caradoc-Davies:
- Brad Hards:
- Christian Mueller:
- Ian Turton:
- Jody Garnett:
- Jukka Rahkonen:
- Kevin Smith:
- Simone Giannecchini:
- [Bug Report] https://osgeo-org.atlassian.net/browse/GEOS-6068
- [Email Discussion]
©2020 Open Source Geospatial Foundation