I'm working on developing a package that interacts with a non-default
database.  I've got 2 datasources specified in my server.ini (both Pgsql),
and a test_db shows both datasources with no errors.  My datasource entry
and spops.perl follows:
***************************
***************************
[db_info nagios]
db_owner      =
username      = nagios
password      = <password>
dsn           = dbname=nagios
db_name       =
driver_name   = Pg
sql_install   =
long_read_len = 65536
long_trunc_ok = 0
***************************
***************************
$spops = {
   'nagios_host_status' => {
      class        => 'OpenInteract::NMS',
      isa          => [ qw/ OpenInteract::SPOPS  SPOPS::Secure
                            SPOPS::DBI::Pg  SPOPS::DBI / ],
      field        => [],
      field_discover => 'yes',
      id_field     => 'host_name',
      no_update    => [ qw/ host_name / ],
      skip_undef   => [ qw/ host_name / ],
      datasource   => 'nagios',
      base_table   => 'hoststatus',
      creation_security => {
         u   => 'WRITE',
         g   => { 3 => 'WRITE' },
         w   => 'READ',
      },
      display => { url => '/Status/hosts/' },
      name => 'host_name',
      object_name => 'nagios_host_status',
   },
};
***************************
***************************
I have no struct or data definitions for this package, since OI will not
be creating or initially populating the table.
My template and handler routines appear to be correct.  (They were mostly
borrowed & modified from the fruit example package.)  However, I get no
data in the output HTML table, and no errors in the error log.  I've set
DEBUG to 5 in the server.ini, but still didn't see any helpful messges.
How can I go about troubleshooting what is falling short?  I'm suspecting
it is something with the datasource.
I've confirmed that there is data in the target table. Even if I change
the base_table in my spops.perl to a table that does not exist in the DB,
I don't get any errors, so I'm not quite sure where to go from here.
Thanks.
-----
 Eric Reeves - Network / Systems Administrator
 1st Contact Technologies - 281.333.1444
 |