Configuring the JDBC Access Log Publisher using dsconfig non-interactive mode
About this task
The following example uses dsconfig non-interactive mode to illustrate the steps to configure the log publisher and the external database server presented in the previous section.
Steps
-
Use
dsconfigwith the--no-promptoption to create the JDBC external server.Example:
$ bin/dsconfig --no-prompt create-external-server \ --server-name jdbc-external \ --type jdbc \ --set jdbc-driver-type:oraclethin \ --set database-name:ubid_access_log \ --set server-host-name:localhost --set server-port:1541 -
Use
dsconfigto create the log publisher.Example:
$ bin/dsconfig --no-prompt create-log-publisher \ --publisher-name jdbc-test \ --type jdbc-based-access \ --set enabled:true \ --set server:jdbc-external \ --set "log-field-mapping:Simple JDBC Access Log Field Mappings"Result:
When the JDBC Log Publisher is created, the PingDirectory server automatically generates a DDL file of the Log Field Mappings in the
<server-root>/logs/ddls/<name-of-logger>.sqlfile. -
Import the DDL file to your database.
The procedure to configure the JDBC-Based Error Log Publisher is similar to creating a JDBC-Based Access Log Publisher. You can run the previous
dsconfigcommand with the--type jdbc-based-erroras follows.$ bin/dsconfig --no-prompt create-log-publisher \ --publisher-name jdbc-error-test \ --type jdbc-based-error \ --set enabled:true \ --set server:jdbc-external \ --set "log-field-mapping:Simple JDBC Access Log Field Mappings"