Datasinks

Documentation / Enterprise Edition / User Guide / Agent / Datasinks

Datasinks

The following section describes all available datasinks. The MyARM agent implementation or daemons are using datasinks to export measured ARM data to a configured datasink destination.

Null datasink

The null datasink is a really no operation datasink. Say you have setup a complete environment with ARM instrumentation enabled, but in some circumstances you want no transactions to be measured. Just configure the use of this null datasink and no data will be recorded at all:

# agent uses a datasink named noop
agent.sink.name = noop
# noop defines a null datasink type
noop.type = null

Database datasinks

The following database datasinks are supported in this edition:

SQLite datasink

The sqlite3 datasink uses the SQLite database as described in SQLite database.

MySQL datasink

The mysql datasink uses the MySQL database as described in section MySQL database.

Oracle datasink

The oracle datasink uses the Oracle database as described in section Oracle database.

File datasink

Using the file datasink all ARM data are stored in a flat file. This file can be read by the myarmdaemon to forward the ARM data to another destination like a TCP connection or a real database. The main purpose of this datasink in conjunction with the myarmdaemon is to decouple writing ARM data to the database from the instrumented application using simple file IO.

In addition to the standard datasink properties the file datasink uses the following properties:

<name>.workfile
specifies the complete filename (including directory names) for the work file. The process ID of the running process will be appended to make the file unique. The ARM data is written to this file and when its closed it is moved to the configured directory.

Default is /tmp/myarmfile.data.

<name>.rolling.seconds
specifies the number of seconds after which a new workfile will be used. The old workfile will be moved to the configured directory.

Default is 60 seconds. Minimum is 5 seconds and maximum is 1 day (86400 seconds).

<name>.rolling.size
specifies the maximal size in bytes of the workfile. If the workfile gets bigger a new workfile is opened and the old workfile is moved to the configured directory.

Default is 128 KB. Minimum is 32 KB and the maximum is 128 MB.

<name>.diskusage.max_used (New since "1.3.x.0")
specifies the maximal size in bytes of all ARM data files in the basic.filestorage.reader.directory directory. If this limit is reached any new ARM data files will be dropped and an error will be reported.

Default is 100 MB. Minimum is 128 KB and no maximum limit.

<name>.diskusage.min_free (New since "1.3.x.0")
specifies the minimal free size in bytes of the file system of the basic.filestorage.reader.directory directory. If this limit is reached any new ARM data files will be dropped and an error will be reported.

Default is 200 MB. Minimum is 100 MB and no maximum limit.

basic.filestorage.reader.directory (New since "2.1.x.0")
specifies the directory to move closed files to. See basic file storage configuration section.

A sample file datasink configuration can look like:

# specify datasink name for the agent
agent.sink.name = sink_file
# datasink file type
sink_file.type = file
# set up work file for file datasink
sink_file.workfile = /opt/myarm/var/myarmfile.data
# time interval in seconds to use a new work file and move
# the old to the myarmdaemon directory.
sink_file.rolling.seconds = 60
# number of maximal bytes for the work file. If this limit is
# reached the current work file is closed, moved to the
# myarmdaemon directory and a new work file is created.
sink_file.rolling.size = 128KB
# only use up to 100 MB of ARM data files, if this limit 
# is reached new ARM data files are dropped.
sink_file.diskusage.max_used = 100MB
# at least 200 MB of disk space should be left free
sink_file.diskusage.min_free = 200MB

TCP datasink

The tcp datasink is used in conjunction with the myarmdaemon tool. It connects to the myarmdaemon program and hands all ARM data to the myarmdaemon process through a TCP socket connection. Note that the tcp datasink retries to connect to the myarmdaemon periodically as long as ARM data available to send to the If there is no ARM data available to send for at least <name>.connection.idle time the connection is closed.

In addition to the standard datasink properties the tcp datasink uses the following properties:

<name>.host
name of the host to connect to the myarmdaemon process.

Default is localhost.

<name>.port
port number the myarmdaemon process is listening and accepts connections.

Default is 5557.

<name>.connection.idle (New since "1.3.x.0")
number of seconds to wait before closing the connection to the myarmdaemon if no ARM data needed to be send.

Default is 300s. Minimum is 30s and the maximum of 3600s for the connection idle time.

<name>.connection.keepalive (New since "1.2.x.5")
number of seconds to send a keep alive message to the myarmdaemon if no ARM data are send.

Default is 60s. Minimum is 30s and the maximum of the half of the <name>.connection.idle property for the keepalive time.

<name>.connection.reconnect (New since "1.4.x.0")
defines an interval value in seconds to wait before MyARM retries to connect to the myarmdaemon process again.

Default is 30s, the minimum is 10s and the maximum is 300s.

<name>.readwrite.timeout
timeout value in milliseconds to wait for reads or writes of ARM data through the connection.

Default is 500ms. Minimum is 250ms and the maximum is 2000ms.

<name>.reply.timeout (New since "1.3.x.7")
timeout value in milliseconds to wait for a reply from the

Default is 2000ms. Minimum is 500ms and the maximum is 4000ms.

Configuration example

# agent uses a datasink named sink_tcp
agent.sink.name = sink_tcp
# set up sink type
sink_tcp.type = tcp
# set up host myarmdaemon is running on
sink_tcp.host  = localhost
# set up port myarmdaemon is listening for incoming connections
sink_tcp.port = 5557
# read/write time out interval in milliseconds
sink_tcp.readwrite.timeout = 1000
# the interval for reconnecting to the daemon in seconds
sink_tcp.connection.reconnect = 60
# send a keep alive message after 60 seconds if no data
sink_tcp.connection.keepalive = 60
# close the connection to myarmdaemon after 300 seconds if no data
sink_tcp.connection.idle = 300