From 95dba5886e06da960c089611f1969f43f8d4aeb2 Mon Sep 17 00:00:00 2001 From: Basheeruddin Ahmed Date: Fri, 17 Apr 2015 17:41:16 -0700 Subject: [PATCH] TSDR H2 user and install documentation : incorporated review comments and updated the tsdr:list command details : incorporated review comments : fixing some grammar/formatting issues Change-Id: I615bc1eab76407096ddcde2184df205067168595 Signed-off-by: Basheeruddin Ahmed Signed-off-by: Basheeruddin --- .../main/asciidoc/tsdr/tsdr-h2-install.adoc | 43 ++++++++++++++++ .../src/main/asciidoc/tsdr/tsdr-h2-user.adoc | 49 ++++++++++--------- 2 files changed, 68 insertions(+), 24 deletions(-) create mode 100644 manuals/install-guide/src/main/asciidoc/tsdr/tsdr-h2-install.adoc diff --git a/manuals/install-guide/src/main/asciidoc/tsdr/tsdr-h2-install.adoc b/manuals/install-guide/src/main/asciidoc/tsdr/tsdr-h2-install.adoc new file mode 100644 index 000000000..0283cf373 --- /dev/null +++ b/manuals/install-guide/src/main/asciidoc/tsdr/tsdr-h2-install.adoc @@ -0,0 +1,43 @@ +== TSDR H2 Default Datastore Installation Guide +This document is for the user to install the artifacts that are needed +for using Time Series Data Repository (TSDR) functionality in the ODL Controller by enabling the default JPA (H2) Datastore. TSDR is new functionality added in OpenDayLight in Lithium Release. + +=== Overview +In Lithium Release the time deries data records of OpenFlow statistics are collected periodically and stored in a persistent store. For non-production usage, the bundled default JPA based datastore (H2) is utilized based on odl-tsdr-all feature installation. The TSDR records get persisted in H2 store in /tsdr/ folder by default. + +=== Pre Requisites for Installing TSDR with default H2 datastore +There are no additional pre-requisites for TSDR based on default datastore + +=== Preparing for Installation +No additional steps required for preparation of installing TSDR feature + +=== Installing TSDR with default H2 datastore +Once Opendaylight distribution is up, from karaf console install the TSDR feature with default datastore (JPA based datastore H2 store used) can be installed by + +feature:install odl-tsdr-all + +This will install all dependency features (and can take sometime) before returning control to the console. + +=== Verifying your Installation +If the feature install was successful you should be able to see the following tsdr commands added + +**tsdr:list +**tsdr:purgeAll + +==== Troubleshooting +Check the ../data/log/karaf.log for any exception related to TSDR or JPA related features + +=== Post Installation Configuration +The feature installation takes care of automated configuration of the datasource by installing a file in /etc named org.ops4j.datasource-metric.cfg. This contains the default location of /tsdr where the H2 datastore files are stored. If you want to change the default location of the datastore files to some other location update the last portion of the url property in the org.ops4j.datasource-metric.cfg and then restart the karaf container + +=== Upgrading From a Previous Release +Lithium being the first release supporting TSDR functionality, only fresh installation is possible.However if you want to move to production usage by enabling the store HBase for TSDR usage, you can do it by uninstalling the TSDR with default H2 datastore, restarting the Karaf container and then enabling the TSDR with HBase store as documented in tsdr-hbase-install.doc + +=== Uninstalling TSDR with default H2 datastore +To uninstall the TSDR functionality with the default store, you need to do the following from karaf console +* feature:uninstall odl-tsdr-all +* feature:uninstall odl-tsdr-core +* feature:uninstall odl-tsdr-H2-persistence + +Its recommended to restart the Karaf container after uninstallation of the TSDR functionality with the default store + diff --git a/manuals/user-guide/src/main/asciidoc/tsdr/tsdr-h2-user.adoc b/manuals/user-guide/src/main/asciidoc/tsdr/tsdr-h2-user.adoc index d626be092..9d1cbacea 100644 --- a/manuals/user-guide/src/main/asciidoc/tsdr/tsdr-h2-user.adoc +++ b/manuals/user-guide/src/main/asciidoc/tsdr/tsdr-h2-user.adoc @@ -1,36 +1,37 @@ -== TSDR H2 data store User Guide -This document describes how to use the embedded JDBC data store H2 -inside the controller to capture time series data using Time Series Data -Repository (TSDR) feature in OpenDaylight Lithium release. This document contains -configuration, administration, management, using, and troubleshooting +== TSDR H2 datastore User Guide +This document describes how to use the embedded JPA datastore H2, which is the default datastore (recommended for non-production use case) introduced as part of OpenDaylight Time Series Data Respository(TSDR) project. This store captures the time series data. This document contains configuration, administration, management, using, and troubleshooting sections for the feature. === Overview -TBD. +In the Lithium Release of Time Series Data Repository (TSDR), time series metrics corresponding to the OpenFlow statistics are captured. For users trying out things on their laptop or non-production environment, TSDR functionality can be enabled with default datastore H2 by installing the feature odl-tsdr-all. -=== Architecture -TBD. +=== TSDR Architecture +The following wiki pages capture the TSDR Model/Architecture -=== Configuring -TBD. +a. https://wiki.opendaylight.org/view/TSDR_Data_Storage_Service_and_Persistence_with_HBase_Plugin +b. https://wiki.opendaylight.org/view/TSDR_Data_Collection_Service -=== Administering or Managing -TBD. +Note in Lithium the DataCollection Service is implemented just for OpenFlow Statistics metrics. -=== Tutorials -TBD. -==== -TBD. +=== Configuring TSDR with default datastore H2 +The H2 based storage files get stored automatically in /tsdr/ directory. If you want to change the default storage location, the configuration file to change can be found in /etc directory. The filename is org.ops4j.datasource-metric.cfg. Change the last portion of the url=jdbc:h2:./tsdr/metric to point to different directory. + +=== Administering or Managing TSDR with default datastore H2 +Once the TSDR default datastore feature (odl-tsdr-all) is enabled, the TSDR captured OpenFlow statistics metrics can be accessed from Karaf Console by executing the command -===== Overview -TBD. + tsdr:list -===== Prerequisites -TBD. +wherein -===== Target Environment -TBD. +* = any one of the following categories FlowGroupStats, FlowMeterStats, FlowStats, FlowTableStats, PortStats, QueueStats +* = to filter the list of metrics starting this timestamp +* = to filter the list of metrics ending this timestamp -===== Instructions -TBD. +If either of or is not specified, this command displays the latest 1000 metrics captured. + +With TSDR functionality with default H2 datastore you get an additional command + + tsdr:purgeAll + +This will purge the entire collected tsdr metrics record. -- 2.36.6