Skip to content

Commit

Permalink
[GEOS-8743] Move monitoring-hibernate extension down to community mod…
Browse files Browse the repository at this point in the history
…ule level
  • Loading branch information
aaime committed May 14, 2018
1 parent 0d47f8e commit d033c6c
Show file tree
Hide file tree
Showing 38 changed files with 101 additions and 49 deletions.
1 change: 1 addition & 0 deletions doc/en/user/source/community/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ officially part of the GeoServer releases. They are however built along with the
status-monitoring/index
nsg-profile/index
netcdf-ghrsst/index
monitor-hibernate/index
30 changes: 30 additions & 0 deletions doc/en/user/source/community/monitor-hibernate/configuration.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.. _monitor_hibernate_configuration:

Hibernate storage Configuration
===============================

Many aspects of the monitor extension are configurable. The configuration files
are stored in the data directory under the ``monitoring`` directory::

<data_directory>
monitoring/
db.properties
hibernate.properties


In particular:
* **db.properties** - Database configuration when using database persistence.
* **hibernate.properties** - Hibernate configuration when using database persistence.

Monitor Storage
---------------

How request data is persisted is configurable via the ``storage`` property defined in the
``monitor.properties`` file. The following values are supported for the ``storage`` property:

* **memory** - Request data is to be persisted in memory alone.
* **hibernate** - Request data is to be persisted in a relational database via Hibernate.

The default value is ``memory``, in order to use hibernate the ``storage`` configuration needs
to be switced to ``hibernate``.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions doc/en/user/source/community/monitor-hibernate/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.. _monitor_hibernate_extension:

Monitoring Hibernate storage
============================

The monitor hibernate storage allows to track the requests made against a GeoServer instance
in a relational database, as opposed to keeping the data in memory for a short time, or
logging it on a audit file.

.. toctree::
:maxdepth: 2

installation/
configuration/
db/
upgrade/


17 changes: 17 additions & 0 deletions doc/en/user/source/community/monitor-hibernate/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.. _monitor_hibernate_installation:

Installing the Hibernate Monitor Extension
==========================================

.. note::

If performing an upgrade of the monitor extension please see :ref:`monitor_upgrade`.

As a community module, the package needs to be downloaded from the `nightly builds <https://build.geoserver.org/geoserver/>`_,
picking the community folder of the corresponding GeoServer series (e.g. if working on GeoServer master nightly
builds, pick the zip file form ``master/community-latest``).

To install the module, unpack the zip file contents into GeoServer own ``WEB-INF/lib`` directory and
restart GeoServer.

For the module to work, the :ref:`monitor_extension` extensions must also be installed.
20 changes: 4 additions & 16 deletions doc/en/user/source/extensions/monitoring/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,13 @@ are stored in the data directory under the ``monitoring`` directory::

<data_directory>
monitoring/
db.properties
filter.properties
hibernate.properties
monitor.properties


The ``monitor.properties`` file is the main configuration file whose contents are
described in the following sections. Other configuration files include:

* **filter.properties** - Allows for :ref:`filtering <request_filters>` out those
requests from being monitored.
* **db.properties** - Database configuration when using database persistence.
* **hibernate.properties** - Hibernate configuration when using database persistence.
described in the following sections. The ``filter.properties``
allows for :ref:`filtering <request_filters>` out those requests from being monitored.

Database persistence with hibernate is described in more detail in the :ref:`monitor_db` section.

Expand All @@ -33,24 +27,18 @@ How request data is persisted is configurable via the ``storage`` property defin
``monitor.properties`` file. The following values are supported for the ``storage`` property:

* **memory** - Request data is to be persisted in memory alone.
* **hibernate** - Request data is to be persisted in a relational database via Hibernate.

The default value is ``memory``.

The "monitor hibernate" community module allows to also store the requests in a relational database.

Memory Storage
^^^^^^^^^^^^^^

With memory storage only the most recent 100 requests are stored. And by definition this
storage is volatile in that if the GeoServer instance is restarted, shutdown, or crashes
this data is lost.

Hibernate Storage
^^^^^^^^^^^^^^^^^

Hibernate storage is described in detail in the :ref:`monitor_db` section.

.. _monitor_mode:

Monitor Mode
------------

Expand Down
2 changes: 0 additions & 2 deletions doc/en/user/source/extensions/monitoring/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ it works jump to the :ref:`monitor_overview` section.
:maxdepth: 2

installation/
upgrade/
overview/
reference/
configuration/
db/
audit/
query/
geoip/
Expand Down
6 changes: 0 additions & 6 deletions doc/en/user/source/extensions/monitoring/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ The monitor extension is not part of the GeoServer core and must be installed as
#. Find the page that matches the version of the running GeoServer.
#. Download the monitor extension. The download link will be in the :guilabel:`Extensions`
section under :guilabel:`Other`.

.. note::

The :ref:`monitor_db` function is packaged as a separate extension. If you plan to use it
both the core "monitor" and "monitor-hibernate" extensions must be installed.

#. Extract the files in this archive to the :file:`WEB-INF/lib` directory of your GeoServer installation.
#. Restart GeoServer

Expand Down
26 changes: 13 additions & 13 deletions doc/en/user/source/extensions/monitoring/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -205,18 +205,18 @@ GWC
The following attributes are specific to tile cached requests.

.. list-table::
:widths: 20 65 15
:widths: 20 65 15
:header-rows: 1

* - Attribute
- Description
- Type
* - CacheResult
- "HIT" or "MISS" (can be empty if GWC was not involved)
- String
* - MissReason
- A description of why the cache was not used. Available only on requests hitting a cached layer on direct WMS integration,
applies to cases where the request was not forwarded to GWC, for example "no parameter filter exists for FEATUREID",
"request does not align to grid(s) "EPSG:4326" or "not a tile layer". Will be missing for
any request not hitting the direct integration (e.g., direct WMTS requests, for example)
- String
* - Attribute
- Description
- Type
* - CacheResult
- "HIT" or "MISS" (can be empty if GWC was not involved)
- String
* - MissReason
- A description of why the cache was not used. Available only on requests hitting a cached layer on direct WMS integration,
applies to cases where the request was not forwarded to GWC, for example "no parameter filter exists for FEATUREID",
"request does not align to grid(s) "EPSG:4326" or "not a tile layer". Will be missing for
any request not hitting the direct integration (e.g., direct WMTS requests, for example)
- String
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-monitor</artifactId>
<groupId>org.geoserver</groupId>
<artifactId>community</artifactId>
<version>2.14-SNAPSHOT</version>
</parent>
<groupId>org.geoserver.extension</groupId>
<groupId>org.geoserver.community</groupId>
<artifactId>gs-monitor-hibernate</artifactId>
<packaging>jar</packaging>
<name>Monitor Hibernate Extension</name>
Expand Down
8 changes: 8 additions & 0 deletions src/community/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<descriptor>release/ext-nsg-wfs-profile.xml</descriptor>
<descriptor>release/ext-netcdf-ghrsst.xml</descriptor>
<descriptor>release/ext-wfs3.xml</descriptor>
<descriptor>release/ext-monitor-hibernate.xml</descriptor>
</descriptors>
</configuration>
</plugin>
Expand Down Expand Up @@ -257,6 +258,7 @@
<module>netcdf-ghrsst</module>
<module>taskmanager</module>
<module>wfs3</module>
<module>monitor-hibernate</module>
</modules>
</profile>
<profile>
Expand Down Expand Up @@ -588,5 +590,11 @@
<module>wfs3</module>
</modules>
</profile>
<profile>
<id>monitor-hibernate</id>
<modules>
<module>monitor-hibernate</module>
</modules>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<outputDirectory></outputDirectory>
<includes>
<include>gs-monitor-hibernate-*.jar</include>
<include>antlr-*.jar</include>
<include>asm*.jar</include>
<include>antlr-2.7.6.jar</include>
<include>asm-3.1.jar</include>
<include>dom4j-*.jar</include>
<include>ejb3-*.jar</include>
<include>ehcache-*.jar</include>
Expand Down
5 changes: 5 additions & 0 deletions src/community/release/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,11 @@
<artifactId>gs-wfs3</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-monitor-hibernate</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
1 change: 0 additions & 1 deletion src/extension/monitor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@

<modules>
<module>core</module>
<module>hibernate</module>
</modules>

</project>
1 change: 0 additions & 1 deletion src/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,6 @@
<descriptor>release/ext-teradata.xml</descriptor>
<descriptor>release/ext-cas.xml</descriptor>
<descriptor>release/ext-monitor.xml</descriptor>
<descriptor>release/ext-monitor-hibernate.xml</descriptor>
<descriptor>release/ext-mongodb.xml</descriptor>
<descriptor>release/ext-xslt.xml</descriptor>
<descriptor>release/ext-inspire.xml</descriptor>
Expand Down
5 changes: 0 additions & 5 deletions src/release/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,6 @@
<artifactId>gs-monitor-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-monitor-hibernate</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.geoserver.security</groupId>
<artifactId>gs-sec-cas</artifactId>
Expand Down

0 comments on commit d033c6c

Please sign in to comment.