Postgres support

The tool requires Perl libraries to be able to communicate with the PostgreSQL database system running on the oVirt/RHV host server.
Make sure that perl-DBI and perl-DBD-Pg are installed on the LPAR2RRD server.
$ rpm -q perl-DBI perl-DBD-Pg
  perl-DBI-1.627-4.el7.x86_64
  perl-DBD-Pg-2.19.3-4.el7.x86_64
Make sure that it is working properly; it should not print error messages such as "Can't locate DBD/Pgd.pm ..."
$ cd /home/lpar2rrd/lpar2rrd
$ . etc/lpar2rrd.cfg
$ $PERL -MLWP -e 'use DBI; use DBD::Pg; print "ok\n"'
 ok
Install them if they are missing under root user
  • Linux Red Hat, CentOS
    # yum install perl-DBD-Pg
    
  • Linux Debian, Ubuntu
    # apt-get install libdbd-pg-perl
    
  • AIX
    • yum installation
      Download perl-DBI-1.623-1 and perl-DBD-Pg-3.7.4
      # yum install postgresql-libs
      # rpm -i perl-DBI-1.623-1.aix5.1.ppc.rpm
      # rpm -i perl-DBD-Pg-3.7-4.ppc.rpm
      
    • manual rpm installation
      Download and install these packages (get libgcc for your AIX version): Install them (in case of any dependecy issue use "--nodeps" rpm option ) under root user
      # rpm -Uvh libgcc-*.ppc.rpm
      # rpm -Uvh openldap-2.4.46-1.aix6.1.ppc.rpm cyrus-sasl-2.1.26-3.aix6.1.ppc.rpm
      # rpm -Uvh tcl-8.6.8-1.aix6.1.ppc.rpm 
      # rpm -i postgresql-libs-10.5-1.aix6.1.ppc.rpm --nodeps
      # rpm -i perl-DBI-1.623-1.aix5.1.ppc.rpm
      # rpm -i perl-DBD-Pg-3.7-4.ppc.rpm
      
    • Make sure that /opt/freeware/lib/perl5/vendor_perl/5.8.8/ppc-thread-multi is included in PERL5LIB (etc/lpar2rrd.cfg).
      $ grep PERL5LIB= /home/lpar2rrd/lpar2rrd/etc/lpar2rrd.cfg| grep /opt/freeware/lib/perl5/vendor_perl/5.8.8/ppc-thread-multi
        PERL5LIB=/home/lpar2rrd/lpar2rrd/bin:/home/lpar2rrd/lpar2rrd/vmware-lib:/opt/freeware/lib/perl/5.8.8:/usr/opt/perl5/lib/site_perl/5.8.8/aix-thread-multi:/opt/freeware/lib/perl5/vendor_perl/5.8.8/ppc-thread-multi:/home/lpar2rrd/lpar2rrd/lib
      
  • Solaris
    No solution yet, Postgres DBD module for Solaris (pm_dbd_pg) does not seem to work properly

  • Make sure that it is working properly; it should not print error messages such as "Can't locate DBD/Pgd.pm ..."
    cd /home/lpar2rrd/lpar2rrd
    . etc/lpar2rrd.cfg
    $PERL -MLWP -e 'use DBI; use DBD::Pg; print "ok\n"'
     ok