-
Language:
English
-
Language:
English
22.2.5. Connecting to the History Database
The
ovirt_engine_history
database resides within the instance of PostgreSQL that the installer creates during Red Hat Enterprise Virtualization Manager installation.
For local connections to the database, use a PostgreSQL compatible query or reporting tool with the credentials used in Red Hat Enterprise Virtualization Manager installation.
Summary
The history data warehouse can also be accessed remotely. All of the PostgreSQL configuration files that you need to change are located in /var/lib/pgsql/data
Procedure 22.1. Enabling Remote Access to the History Database
- Edit the
postgresql.conf
file, and add two parameters.ssl=on
listen_addresses = "*"
To allow access by specific hosts, use a comma-separated list of IP addresses or hostnames instead of "*".
- Edit
pg_hba.conf
to add:hostssl all all <net address/mask> md5
Where <net address/mask> is the IP address and netmask of allowed hosts; for example, 192.168.0.0/24. - Create soft links for the following certificate and key, so that they can be located by PostgreSQL:
# ln -s /etc/pki/ovirt-engine/certs/engine.cer /var/lib/pgsql/data/server.crt
# ln -s /etc/pki/ovirt-engine/keys/engine_id_rsa /var/lib/pgsql/data/server.key
The certificate and key were created by the Red Hat Enterprise Virtualization Manager during installation. However, PostgreSQL requires a specific location (/var/lib/pgsql/data/
) and file names (server.crt
andserver.key
) for the certificate and key.Alternatively, you can create new certificate and key files using the commands documented in the PostgreSQL Manual. - Stop the engine service:
# service ovirt-engine stop
- Restart the PostgreSQL service:
# service postgresql restart
- Remove and then deploy the Jasper WAR files:
- Remove the
.deployed
file:# rm /var/lib/ovirt-engine/deployments/rhevm-reports.war.deployed
This creates an.undeployed
file:/var/lib/ovirt-engine/deployments/rhevm-reports.war.undeployed
If the.undeployed
file is present, then the application is down. - Remove the
.undeployed
file:# rm /var/lib/ovirt-engine/deployments/rhevm-reports.war.undeployed
- Deploy the WAR file:
# touch /var/lib/ovirt-engine/deployments/rhevm-reports.war.dodeploy
This creates a.deployed
file:/var/lib/ovirt-engine/deployments/rhevm-reports.war.deployed
- Add an iptables rule to allow external machines to connect to the Manager and access PostgreSQL. For example, in a default iptables configuration, the following command inserts a new rule after the SSH rule:
iptables -I INPUT 5 -p tcp -m state --state NEW --dport 5432 -j ACCEPT
- Start the engine service.
# service ovirt-engine start
Result
You have enabled a remote user with acceptable credentials to access the Red Hat Enterprise Virtualization history database.