</Query>
<Writer sqlstore>
- Statement "SELECT collectd_insert($1, $2, $3, $4, $5, $6, $7, $8);"
+ Statement "SELECT collectd_insert($1, $2, $3, $4, $5, $6, $7, $8, $9);"
+ StoreRates true
</Writer>
<Database foo>
<Database qux>
# ...
Writer sqlstore
+ CommitInterval 10
</Database>
</Plugin>
each submitted value. A single SQL statement is allowed only. Anything after
the first semicolon will be ignored.
-Eight parameters will be passed to the statement and should be specified as
-tokens B<$1>, B<$2>, through B<$8> in the statement string. The following
+Nine parameters will be passed to the statement and should be specified as
+tokens B<$1>, B<$2>, through B<$9> in the statement string. The following
values are made available through those parameters:
=over 4
=item B<$8>
+An array of types for the submitted values (i.E<nbsp>e., the type of the data
+sources of the submitted value-list; C<counter>, C<gauge>, ...). Note, that if
+B<StoreRates> is enabled (which is the default, see below), all types will be
+C<gauge>.
+
+=item B<$9>
+
An array of the submitted values. The dimensions of the value name and value
arrays match.
Specify the interval with which the database should be queried. The default is
to use the global B<Interval> setting.
+=item B<CommitInterval> I<seconds>
+
+This option may be used for database connections which have "writers" assigned
+(see above). If specified, it causes a writer to put several updates into a
+single transaction. This transaction will last for the specified amount of
+time. By default, each update will be executed in a separate transaction. Each
+transaction generates a fair amount of overhead which can, thus, be reduced by
+activating this option. The draw-back is, that data covering the specified
+amount of time will be lost, for example, if a single statement within the
+transaction fails or if the database server crashes.
+
=item B<Host> I<hostname>
Specify the hostname or IP of the PostgreSQL server to connect to. If the