Skip to end of metadata
Go to start of metadata

Netmail Archive utilizes a logging database to monitor performance. By default, Netmail Archive uses a PostgreSQL database. PostgreSQL is the recommended database, though Netmail Archive supports several other databases.

Database Table Structure

If you choose to create your own logging database, the following section provides detailed information about the table structure used by Netmail Archive.

<?xml version="1.0" encoding="utf-8" ?>
<sqlscript>
<sqlstmnts>
<sqlstmnt>
DROP TABLE IF EXISTS mplus_accountsummary;
CREATE TABLE mplus_accountsummary
(
id serial NOT NULL,
jobid character varying(255) NOT NULL,
jobdatetime character varying(50) NOT NULL,
logtimestamp character varying(50) NOT NULL,
account character varying(255) NOT NULL,
nb_scanned integer,
nb_eligible integer,
nb_succeed integer,
nb_errors integer,
nb_warnings integer,
nb_indexed integer,
nb_index_errors integer,
nb_transacted integer,
nb_transact_errors integer,
status character varying(50) NOT NULL,
nodeid character varying(50) NOT NULL,
readtime integer DEFAULT 0,
processtime integer DEFAULT 0,
indextime integer DEFAULT 0,
transacttime integer DEFAULT 0,
CONSTRAINT mplus_accountsummary_pkey PRIMARY KEY (id),
CONSTRAINT mplus_accountsummary_jobid_key UNIQUE (jobid, jobdatetime, account)
)
WITHOUT OIDS;
</sqlstmnt>
<sqlstmnt>
DROP TABLE IF EXISTS mplus_error;
CREATE TABLE mplus_error
(
id serial NOT NULL,
jobid character varying(255) NOT NULL,
jobdatetime character varying(50) NOT NULL,
logtimestamp character varying(50) NOT NULL,
account character varying(255) NOT NULL,
errorsource character varying(255),
errordescription character varying(8000),
errorstacktrace character varying(8000),
messageid character varying(255),
messagesubject character varying(255),
messagecreationdate character varying(50),
CONSTRAINT mplus_error_pkey PRIMARY KEY (id)
)
</sqlstmnt>
<sqlstmnt>
DROP TABLE IF EXISTS mplus_jobhistory;
CREATE TABLE mplus_jobhistory
(
id serial NOT NULL,
jobid character varying(255) NOT NULL,
jobdatetime character varying(50) NOT NULL,
logtimestamp character varying(50) NOT NULL,
jobtype integer NOT NULL,
jobenddatetime character varying(50) NOT NULL,
jobdatetime_int numeric(10) NOT NULL,
status character varying(50) NOT NULL,
CONSTRAINT mplus_jobhistory_pkey PRIMARY KEY (id),
CONSTRAINT mplus_jobhistory_jobid_key UNIQUE (jobid, jobdatetime)
) WITHOUT OIDS;
</sqlstmnt>
<sqlstmnt>
DROP TABLE IF EXISTS mplus_trace;
CREATE TABLE mplus_trace
(
id serial NOT NULL,
jobid character varying(255) NOT NULL,
jobdatetime character varying(50) NOT NULL,
logtimestamp character varying(50) NOT NULL,
account character varying(255) NOT NULL,
logdata character varying(8000),
CONSTRAINT mplus_trace_pkey PRIMARY KEY (id)
)
</sqlstmnt>
<sqlstmnt>
DROP TABLE IF EXISTS mplus_warning;
CREATE TABLE mplus_warning
(
id serial NOT NULL,
jobid character varying(255) NOT NULL,
jobdatetime character varying(50) NOT NULL,
logtimestamp character varying(50) NOT NULL,
account character varying(255) NOT NULL,
errorsource character varying(255),
errordescription character varying(8000),
errorstacktrace character varying(8000),
messageid character varying(255),
messagesubject character varying(255),
messagecreationdate character varying(50),
CONSTRAINT mplus_warning_pkey PRIMARY KEY (id)
)
</sqlstmnt>
<sqlstmnt>
CREATE FUNCTION year(varchar) RETURNS double precision
AS 'SELECT EXTRACT(YEAR FROM $1::DATE);'
LANGUAGE SQL
IMMUTABLE
RETURNS NULL ON NULL INPUT;
</sqlstmnt>
<sqlstmnt>
CREATE FUNCTION month(varchar) RETURNS double precision
AS 'SELECT EXTRACT(MONTH FROM $1::DATE);'
LANGUAGE SQL
IMMUTABLE
RETURNS NULL ON NULL INPUT;
</sqlstmnt>
<sqlstmnt>
CREATE FUNCTION day(varchar) RETURNS double precision
AS 'SELECT EXTRACT(DAY FROM $1::DATE);'
LANGUAGE SQL
IMMUTABLE
RETURNS NULL ON NULL INPUT;
</sqlstmnt>
</sqlstmnts>
</sqlscript>

  • No labels