DBPoller

Thu Jun 05 17:20:07 EDT 2008

This is a basic database poller that executes an SQL query you specify to retrieve some columns, waits a number of milliseconds you specify (default: 60000 millis, which is 1-minute), and then repeats.

Output

The resulting rows are written as a multi-line events, with each enclosed in XML-style tags, and all columns listed one-per-line as "name=value", for example:

<row>
colName1=value of column one at this row
colName2=value of column two...
</row>

Flag

If a boolean flag column is named via the "db.column.flag" property, then this connector will set this flag column to TRUE after reading the row. It is assumed that your query will also reference this flag to limit results to only rows where the flag is FALSE, for example:
  SELECT * FROM tableName WHERE flag IS FALSE

Errors

Errors (i.e. exceptions) are sent to indicate any internal errors, such as JDBC exceptions received from the database. For example:

<exception context="poller" server="LanComms">
description=Problem executing query
exception=com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: No operations allowed after statement closed.
SQLState=08003
VendorError=0
</exception>