Database Monitor

Top  Previous  Next

The database monitor is used to monitor database tables. It periodically checks a database table for new records and if it finds them, generates an event from each record. A table that is to be monitored by the database monitor must have an integer ID field that auto-increments.

 

Please note that the database monitor transmits all of the data obtained within its event properties. This means that you must use an output format suitable to show event properties if you intend to process the record with a third party application. We strongly recommend using XML based formatting for this. Alternatively, you can also select a format for the msg property itself (which is the default message). To do so, you need to configure the database monitor's advanced option's msg field settings.

 

 

services_037

Database Monitor Properties

 

 

Check Interval

 

The database monitor runs periodically. This specifies, how often it should run. Please note that the Database Monitor waits for the configured amount of time after the current run is finished. The time is the delay in milliseconds.

 

 

Overrun Prevention Delay

 

This property allows configuring a delay after generating an event. The time is the delay in milliseconds.

 

If run at a value of zero, the service generates events as fast as the machine permits. We have seen scenarios where routers and receivers are not able to keep up with this rate, resulting in packet loss. In addition, the CPU of the reporting machine is run at 100% - which is not a problem because the service runs at a low priority. However, with even a 1-millisecond delay, there is no noticeable CPU activity even when large bursts of events are forwarded. At one millisecond, the service can still generate 1000 events per second.

 

The default setting is an overrun protection of five millisecond, which allows roughly 200 events per second. This should be sufficient for even very busy servers.

 

 

 

Database Properties Tab

 

Here you can configure the access data for the database.

 

 

DSN

 

The data source name of the database to access. All databases that support standard SQL syntax and have an ODBC driver support.

 

 

User-ID

 

The User ID to log on to the database system. Please note that the database system may not require this setting or may ignore it (e.g. Microsoft SQL Server in "integrated" security mode) - please check with your database vendor or your administrator if in doubt.

 

 

Password

 

The password to access the database. If the "Enable Encryption" check box is checked, a weak symetrical encryption is applied on the password. Thus, we highly recommend to create a specific account with very limited permissions if you store a password. This account does only need to have "select" permissions.

 

 

Select Statement

 

You can configure a Select Statement to be issued to the database. This way, you have full control over what is fetched from the database.

 

Please note that if you specify specific fields, the ID field must be present in the select clause - otherwise the service can not process the records.

 

Also be sure to enter the name of the table from which the records are to be taken.

 

 

 

Message Field Tab

 

If you click on the "Message Field (%msg%)" tab, you can configure the following additional properties:

 

services_038

Database Monitor Message Field Tab

 

 

Message Field

 

This field specifies the content of the "msg" property. By default, msg does NOT contain any useful information. This is because all data is provided via the event properties. If you actually need this as part of the msg, you can either select a custom format or CSV format.

 

If CSV is selected, msg contains all field values (not names) in comma-separated format. Instead of a comma you can also use any other custom separator. The field order is as it was in the select statement. We recommend not to use "select *" in this case (but specify the fields inside the select statement, so that they have a definite order).

 

We recommend not to reley on msg with the database monitor. Access via properties is much better. If you do not need msg, we recommend to set the msg content to "none" as this removes the unneccessary default message.

 

 

 

General Values

 

Syslog Facility

 

The Syslog facility to be assigned to events created by the service. Most useful if the message shall be forwarded to a syslog daemon.

 

 

Syslog Priority

 

The Syslog priority to be assigned to events created by the service. Most useful if the message shall be forwarded to a syslog daemon.

 

 

Resource ID

 

The Resource ID  to be assigned to events created by the service. Most useful if the message shall be forwarded to a Syslog daemon.

 

 

Syslog Tag Value

 

The Syslog tag value to be assigned to events created by the service. Most useful if the message shall be forwarded to a Syslog daemon.

 

 

Default Ruleset Name

 

Name of the rule set to be used for this service. The Rule Set name must be a valid Rule Set.