Merge branch 'ad/redis'
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 17 Aug 2010 16:43:37 +0000 (18:43 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Tue, 17 Aug 2010 16:43:37 +0000 (18:43 +0200)
1  2 
src/Makefile.am
src/collectd.conf.pod

diff --combined src/Makefile.am
@@@ -21,7 -21,7 +21,7 @@@ AM_CPPFLAGS += -DPLUGINDIR='"${pkglibdi
  AM_CPPFLAGS += -DPKGDATADIR='"${pkgdatadir}"'
  
  sbin_PROGRAMS = collectd collectdmon
 -bin_PROGRAMS = collectd-nagios
 +bin_PROGRAMS = collectd-nagios collectdctl
  
  collectd_SOURCES = collectd.c collectd.h \
                   common.c common.h \
@@@ -105,19 -105,6 +105,19 @@@ endi
  collectd_nagios_LDADD += libcollectdclient/libcollectdclient.la
  collectd_nagios_DEPENDENCIES = libcollectdclient/libcollectdclient.la
  
 +
 +collectdctl_SOURCES = collectdctl.c
 +collectdctl_LDADD =
 +if BUILD_WITH_LIBSOCKET
 +collectdctl_LDADD += -lsocket
 +endif
 +if BUILD_AIX
 +collectdctl_LDADD += -lm
 +endif
 +collectdctl_LDADD += libcollectdclient/libcollectdclient.la
 +collectdctl_DEPENDENCIES = libcollectdclient/libcollectdclient.la
 +
 +
  pkglib_LTLIBRARIES = 
  
  BUILT_SOURCES = 
@@@ -898,6 -885,16 +898,16 @@@ collectd_LDADD += "-dlopen" protocols.l
  collectd_DEPENDENCIES += protocols.la
  endif
  
+ if BUILD_PLUGIN_REDIS
+ pkglib_LTLIBRARIES += redis.la
+ redis_la_SOURCES = redis.c
+ redis_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBCREDIS_LDFLAGS)
+ redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCREDIS_CPPFLAGS)
+ redis_la_LIBADD = -lcredis
+ collectd_LDADD += "-dlopen" redis.la
+ collectd_DEPENDENCIES += redis.la
+ endif
  if BUILD_PLUGIN_ROUTEROS
  pkglib_LTLIBRARIES += routeros.la
  routeros_la_SOURCES = routeros.c
@@@ -1213,6 -1210,16 +1223,16 @@@ endi
  collectd_DEPENDENCIES += write_http.la
  endif
  
+ if BUILD_PLUGIN_WRITE_REDIS
+ pkglib_LTLIBRARIES += write_redis.la
+ write_redis_la_SOURCES = write_redis.c
+ write_redis_la_LDFLAGS = -module -avoid-version $(BUILD_WITH_LIBCREDIS_LDFLAGS)
+ write_redis_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCREDIS_CPPFLAGS)
+ write_redis_la_LIBADD = -lcredis
+ collectd_LDADD += "-dlopen" write_redis.la
+ collectd_DEPENDENCIES += write_redis.la
+ endif
  if BUILD_PLUGIN_XMMS
  pkglib_LTLIBRARIES += xmms.la
  xmms_la_SOURCES = xmms.c
@@@ -1237,7 -1244,6 +1257,7 @@@ dist_man_MANS = collectd.1 
                collectd.conf.5 \
                collectd-email.5 \
                collectd-exec.5 \
 +              collectdctl.1 \
                collectd-java.5 \
                collectdmon.1 \
                collectd-nagios.1 \
@@@ -1254,7 -1260,6 +1274,7 @@@ EXTRA_DIST = types.db pinba.prot
  EXTRA_DIST +=   collectd.conf.pod \
                collectd-email.pod \
                collectd-exec.pod \
 +              collectdctl.pod \
                collectd-java.pod \
                collectdmon.pod \
                collectd-nagios.pod \
diff --combined src/collectd.conf.pod
@@@ -3225,6 -3225,11 +3225,6 @@@ allowed as long as a single non-empty c
  
  The returned lines will be handled separately one after another.
  
 -=item B<Query> I<sql query statement>
 -
 -This is a deprecated synonym for B<Statement>. It will be removed in version 5
 -of collectd.
 -
  =item B<Param> I<hostname>|I<database>|I<username>|I<interval>
  
  Specify the parameters which should be passed to the SQL query. The parameters
@@@ -3300,6 -3305,21 +3300,6 @@@ This option is required inside a B<Resu
  times. If multiple B<ValuesFrom> options are specified, the columns are read
  in the given order.
  
 -=item B<Column> I<type> [I<type instance>]
 -
 -This is a deprecated alternative to a B<Result> block. It will be removed in
 -version 5 of collectd. It is equivalent to the following B<Result> block:
 -
 -  <Result>
 -    Type I<type>
 -    InstancePrefix I<type instance>
 -    ValuesFrom I<name of the x. column>
 -  </Result>
 -
 -The order of the B<Column> options defines which columns of the query result
 -should be used. The first option specifies the data found in the first column,
 -the second option that of the second column, and so on.
 -
  =item B<MinVersion> I<version>
  
  =item B<MaxVersion> I<version>
@@@ -3314,6 -3334,13 +3314,6 @@@ The I<version> has to be specified as t
  and patch-level versions, each represented as two-decimal-digit numbers. For
  example, version 8.2.3 will become 80203.
  
 -=item B<MinPGVersion> I<version>
 -
 -=item B<MaxPGVersion> I<version>
 -
 -These are deprecated synonyms for B<MinVersion> and B<MaxVersion>
 -respectively. They will be removed in version 5 of collectd.
 -
  =back
  
  The following predefined queries are available (the definitions can be found
@@@ -3724,6 -3751,52 +3724,52 @@@ Defaults to B<false>
  
  =back
  
+ =head2 Plugin C<redis>
+ The I<Redis plugin> connects to one or more Redis servers and gathers
+ information about each server's state. For each server there is a I<Node> block
+ which configures the connection parameters for this node.
+   <Plugin redis>
+     <Node "example">
+         Host "localhost"
+         Port "6379"
+         Timeout 2000
+     </Node>
+   </Plugin>
+ The information shown in the synopsis above is the I<default configuration>
+ which is used by the plugin if no configuration is present.
+ =over 4
+ =item B<Node> I<Nodename>
+ The B<Node> block identifies a new Redis node, that is a new Redis instance
+ running in an specified host and port. The name for node is a canonical
+ identifier which is used as I<plugin instance>. It is limited to
+ 64E<nbsp>characters in length.
+ =item B<Host> I<Hostname>
+ The B<Host> option is the hostname or IP-address where the Redis instance is
+ running on.
+ =item B<Port> I<Port>
+ The B<Port> option is the TCP port on which the Redis instance accepts
+ connections. Either a service name of a port number may be given. Please note
+ that numerical port numbers must be given as a string, too.
+ =item B<Timeout> I<Timeout in miliseconds>
+ The B<Timeout> option set the socket timeout for node response. Since the Redis
+ read function is blocking, you should keep this value as low as possible. Keep
+ in mind that the sum of all B<Timeout> values for all B<Nodes> should be lower
+ than B<Interval> defined globally.
+ =back
  =head2 Plugin C<rrdcached>
  
  The C<rrdcached> plugin uses the RRDtool accelerator daemon, L<rrdcached(1)>,