summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/man/bcfg2.conf.txt41
-rw-r--r--doc/reports/dynamic.txt21
-rw-r--r--doc/server/database.txt82
3 files changed, 116 insertions, 28 deletions
diff --git a/doc/man/bcfg2.conf.txt b/doc/man/bcfg2.conf.txt
index df49f3d4a..36776b5cb 100644
--- a/doc/man/bcfg2.conf.txt
+++ b/doc/man/bcfg2.conf.txt
@@ -632,7 +632,7 @@ Server-only, specified in the **[database]** section. These options
control the database connection of the server.
engine
- The database engine used by the statistics module. One of the
+ The database engine used by server plugins. One of the
following::
postgresql
@@ -641,9 +641,9 @@ control the database connection of the server.
ado_mssql
name
- The name of the database to use for statistics data. If
+ The name of the database to use for server data. If
'database_engine' is set to 'sqlite3' this is a file path to
- the sqlite file and defaults to ``$REPOSITORY_DIR/etc/brpt.sqlite``.
+ the sqlite file and defaults to ``$REPOSITORY_DIR/etc/bcfg2.sqlite``.
user
User for database connections. Not used for sqlite3.
@@ -662,6 +662,41 @@ control the database connection of the server.
expected as multiple key=value pairs, separated with commas.
The concrete value depends on the database engine.
+ reporting_engine
+ The database engine used by the Reporting plugin. One of the
+ following::
+
+ postgresql
+ mysql
+ sqlite3
+ ado_mssql
+
+ If reporting_engine is not specified, the Reporting plugin uses
+ the same database as the other server plugins.
+
+ reporting_name
+ The name of the database to use for reporting data. If
+ 'database_engine' is set to 'sqlite3' this is a file path to
+ the sqlite file and defaults to
+ ``$REPOSITORY_DIR/etc/reporting.sqlite``.
+
+ reporting_user
+ User for reporting database connections. Not used for sqlite3.
+
+ reporting_password
+ Password for reporting database connections. Not used for sqlite3.
+
+ reporting_host
+ Host for reporting database connections. Not used for sqlite3.
+
+ reporting_port
+ Port for reporting database connections. Not used for sqlite3.
+
+ reporting_options
+ Various options for the reporting database connection. The value
+ is expected as multiple key=value pairs, separated with commas.
+ The concrete value depends on the database engine.
+
Reporting options
-----------------
diff --git a/doc/reports/dynamic.txt b/doc/reports/dynamic.txt
index 6b8a1f467..53bdef24e 100644
--- a/doc/reports/dynamic.txt
+++ b/doc/reports/dynamic.txt
@@ -25,6 +25,7 @@ configuration. Specific features in the new system include:
users to drill down to find out about a :ref:`specific host
<reports-client-detail>`, rather than only having one huge page with
too much information.
+* Ability to store reporting data separately from other server data.
Installation
============
@@ -214,8 +215,8 @@ database
^^^^^^^^
If you choose to use a different database, you'll need to edit
-``/etc/bcfg2.conf``. These fields should be updated in the [database]
-section:
+``/etc/bcfg2.conf``. These fields should be updated in the
+``[database]`` section:
* engine
@@ -228,11 +229,27 @@ section:
* host
* port (optional)
+To store reporting data separately from the main server data, use
+the following options:
+
+* reporting_engine
+
+ * ex: reporting_engine = mysql
+ * ex: reporting_engine = postgresql_psycopg2
+
+* reporting_name
+* reporting_user
+* reporting_password
+* reporting_host
+* reporting_port (optional)
+
.. warning::
If mysql is used as a backend, it is recommended to use InnoDB for
the `storage engine <http://dev.mysql.com/doc/refman/5.1/en/storage-engine-setting.html>`_.
+Refer to :ref:`server-database` for a full listing of
+available options.
statistics
^^^^^^^^^^
diff --git a/doc/server/database.txt b/doc/server/database.txt
index 3c8970f68..fdb3ab04c 100644
--- a/doc/server/database.txt
+++ b/doc/server/database.txt
@@ -1,4 +1,5 @@
.. -*- mode: rst -*-
+.. vim: ft=rst
.. _server-database:
@@ -25,35 +26,70 @@ settings in ``bcfg2.conf``, described in this document, to connect.
recommended that you use a higher performance database backend.
+Separate Reporting Database
+===========================
+
+.. versionadded:: 1.4.0
+
+Bcfg2 supports storing the data generated by the
+:ref:`server-plugins-statistics-reporting` in a separate database
+from the data generated by the other plugins (e.g.
+:ref:`server-plugins-grouping-metadata` and
+:ref:`server-plugins-probes-index`). To activate this support, set
+the ``reporting_engine``, ``reporting_name``, ``reporting_user``, etc.
+options in the ``[database]`` section of the config file. The valid values
+for the ``reporting_*`` options are the same as for the standard database
+options. See :ref:`server-database-configuration-options` for a full listing.
+
+.. _server-database-configuration-options:
+
Configuration Options
=====================
All of the following options should go in the ``[database]`` section
of ``/etc/bcfg2.conf``.
-+-------------+------------------------------------------------------------+-------------------------------+
-| Option name | Description | Default |
-+=============+============================================================+===============================+
-| engine | The name of the Django database backend to use. See | "sqlite3" |
-| | https://docs.djangoproject.com/en/dev/ref/settings/#engine | |
-| | for available options (note that django.db.backends is not | |
-| | included in the engine name) | |
-+-------------+------------------------------------------------------------+-------------------------------+
-| name | The name of the database | "/var/lib/bcfg2/bcfg2.sqlite" |
-+-------------+------------------------------------------------------------+-------------------------------+
-| user | The user to connect to the database as | None |
-+-------------+------------------------------------------------------------+-------------------------------+
-| password | The password to connect to the database with | None |
-+-------------+------------------------------------------------------------+-------------------------------+
-| host | The host to connect to | "localhost" |
-+-------------+------------------------------------------------------------+-------------------------------+
-| port | The port to connect to | None |
-+-------------+------------------------------------------------------------+-------------------------------+
-| options | Extra parameters to use when connecting to the database. | None |
-| | Available parameters vary depending on your database | |
-| | backend. The parameters are supplied as comma separated | |
-| | key=value pairs. | |
-+-------------+------------------------------------------------------------+-------------------------------+
++--------------------+------------------------------------------------------------+---------------------------------------+
+| Option name | Description | Default |
++====================+============================================================+=======================================+
+| engine | The name of the Django database backend to use. See | "sqlite3" |
+| | https://docs.djangoproject.com/en/dev/ref/settings/#engine | |
+| | for available options (note that django.db.backends is not | |
+| | included in the engine name) | |
++--------------------+------------------------------------------------------------+---------------------------------------+
+| name | The name of the database | "/var/lib/bcfg2/etc/bcfg2.sqlite" |
++--------------------+------------------------------------------------------------+---------------------------------------+
+| user | The user to connect to the database as | None |
++--------------------+------------------------------------------------------------+---------------------------------------+
+| password | The password to connect to the database with | None |
++--------------------+------------------------------------------------------------+---------------------------------------+
+| host | The host to connect to | "localhost" |
++--------------------+------------------------------------------------------------+---------------------------------------+
+| port | The port to connect to | None |
++--------------------+------------------------------------------------------------+---------------------------------------+
+| options | Extra parameters to use when connecting to the database. | None |
+| | Available parameters vary depending on your database | |
+| | backend. The parameters are supplied as comma separated | |
+| | key=value pairs. | |
++--------------------+------------------------------------------------------------+---------------------------------------+
+| reporting_engine | The name of the Django database backend to use for the | None |
+| | reporting database. Takes the same values as ``engine``. | |
++--------------------+------------------------------------------------------------+---------------------------------------+
+| reporting_name | The name of the reporting database | "/var/lib/bcfg2/etc/reporting.sqlite" |
++--------------------+------------------------------------------------------------+---------------------------------------+
+| reporting_user | The user to connect to the reporting database as | None |
++--------------------+------------------------------------------------------------+---------------------------------------+
+| reporting_password | The password to connect to the reporting database with | None |
++--------------------+------------------------------------------------------------+---------------------------------------+
+| reporting_host | The host to connect to for the reporting database | "localhost" |
++--------------------+------------------------------------------------------------+---------------------------------------+
+| reporting_port | The port to connect to for the reporting database | None |
++--------------------+------------------------------------------------------------+---------------------------------------+
+| reporting_options | Extra parameters to use when connecting to the reporting | None |
+| | database. Available parameters vary depending on your | |
+| | database backend. The parameters are supplied as comma | |
+| | separated key=value pairs. | |
++--------------------+------------------------------------------------------------+---------------------------------------+
Database Schema Sync