Storage
Storage datasinks
The following sections describes all available datasinks for storing any ARM definition and instance data.
SQLite datasink
The sqlite3 datasink uses the SQLite database as described in SQLite database.
MySQL datasink
The mysq datasink uses the MySQL database as described in MySQL database.
Oracle datasink
The oracle datasink uses the Oracle database as described in Oracle database.
XML datasink
Using the xml datasink all ARM data are stored in a XML file based on the XML scheme (arm40.xsd).
In addition to the standard datasink properties the XML datasink uses the following properties:
<name>.file- specifies the complete filename for XML file.
<name>.file.mode- specifies if the XML file should be opened in write
'w'(overwriting any contents) or in append'a'file mode.
A sample XML datasink configuration can look like:
# agent uses a datasink named db_xml agent.sink.name = db_xml # define the type of the datasink db_xml.type = xml # define the SQLite database file db_xml.file = myarm.xml # append ARM data for each time the datasink is opened. db_xml.file.mode = a
File datasink
Using the file datasink all ARM data are stored in a flat file. This file can be read by the myarmfiled daemon 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 myarmfiled daemon 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.
<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.
<name>.diskusage.max_used(New since "1.3.x.0")- specifies the maximal size in bytes of all ARM data files in the myarmfiled directory. If this limit is reached any new ARM data files will be dropped and an error will be reported. Default is 100 MB.
<name>.diskusage.min_free(New since "1.3.x.0")- specifies the minimal free size in bytes of the file system the myarmfiled directory resides. If this limit is reached any new ARM data files will be dropped and an error will be reported. Default is 200 MB.
filed.basename- (New since "1.3.x.2") specifies the base name of the moved files. A 6-digit number will be appended to the base name to make the file unique. Default is myarm.data.
filed.directory- (New since "1.3.x.2") specifies the directory to move closed files to. This directory should be scanned by the myarmfiled daemon to further process these ARM data files. Default is /tmp/myarmfiles.
A sample file datasink configuration can look like:
# set up directory to move closed work files to (read from myarmfiled) filed.directory = /opt/myarm/var/myarmfiles # set up base name for file names within above directory. filed.basename = myarm.data # set up work file for file datasink si_file.workfile = /opt/myarm/var/myarmfile.data # time interval in seconds to use a new work file and move # the old to the myarmfiled directory. si_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 # myarmfiled directory and a new work file is created. (128KB) si_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. si_file.diskusage.max_used = 100MB # at least 200 MB of disk space should be left free si_file.diskusage.min_free = 200MB