author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 14 Sep 2008 14:25:08 +0000 (16:25 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 14 Sep 2008 14:25:08 +0000 (16:25 +0200) |
Conflicts:
src/rrdtool.c
src/rrdtool.c
1 | 2 | |||
---|---|---|---|---|
configure.in | patch | | diff1 | | diff2 | | blob | history |
src/Makefile.am | patch | | diff1 | | diff2 | | blob | history |
src/collectd.conf.in | patch | | diff1 | | diff2 | | blob | history |
src/collectd.conf.pod | patch | | diff1 | | diff2 | | blob | history |
src/rrdtool.c | patch | | diff1 | | diff2 | | blob | history |
src/types.db | patch | | diff1 | | diff2 | | blob | history |
diff --cc configure.in
index e1d2e5757107ed1796e86dbd70d3fdd5ef51c563,805148938cf0bbd1af6a87a15db6399a923f2968..9c54aba11145ea8743fabd5f05f1f9eb028d5494
--- 1/configure.in
--- 2/configure.in
+++ b/configure.in
AC_PLUGIN([postgresql], [$with_libpq], [PostgreSQL database statistics])
AC_PLUGIN([powerdns], [yes], [PowerDNS statistics])
AC_PLUGIN([processes], [$plugin_processes], [Process statistics])
- AC_PLUGIN([qmail], [yes], [QMail queue statistics])
AC_PLUGIN([rrdtool], [$with_rrdtool], [RRDTool output plugin])
+AC_PLUGIN([rrdcached], [$librrd_rrdc_update], [RRDTool output plugin])
AC_PLUGIN([sensors], [$with_lm_sensors], [lm_sensors statistics])
AC_PLUGIN([serial], [$plugin_serial], [serial port traffic])
AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin])
postgresql . . . . . $enable_postgresql
powerdns . . . . . . $enable_powerdns
processes . . . . . . $enable_processes
- qmail . . . . . . . . $enable_qmail
rrdtool . . . . . . . $enable_rrdtool
+ rrdcached . . . . . . $enable_rrdcached
sensors . . . . . . . $enable_sensors
serial . . . . . . . $enable_serial
snmp . . . . . . . . $enable_snmp
diff --cc src/Makefile.am
index 4c0d5c817662c34a566dfe9296d3e0dbd080fe03,f93c5065f5c17c7e2474ee5d0a1c66f2d7004211..4412b3b20c4c54d6f26a4414ea34f7cc9fa7fcd8
--- 1/src/Makefile.am
--- 2/src/Makefile.am
+++ b/src/Makefile.am
pkglib_LTLIBRARIES += processes.la
processes_la_SOURCES = processes.c
processes_la_LDFLAGS = -module -avoid-version
+ processes_la_LIBADD =
collectd_LDADD += "-dlopen" processes.la
collectd_DEPENDENCIES += processes.la
+ if BUILD_WITH_LIBKVM_GETPROCS
+ processes_la_LIBADD += -lkvm
endif
-
- if BUILD_PLUGIN_QMAIL
- pkglib_LTLIBRARIES += qmail.la
- qmail_la_SOURCES = qmail.c
- qmail_la_LDFLAGS = -module -avoid-version
- collectd_LDADD += "-dlopen" qmail.la
- collectd_DEPENDENCIES += qmail.la
endif
+if BUILD_PLUGIN_RRDCACHED
+pkglib_LTLIBRARIES += rrdcached.la
+rrdcached_la_SOURCES = rrdcached.c utils_rrdcreate.c utils_rrdcreate.h
+rrdcached_la_LDFLAGS = -module -avoid-version
+rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
+rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
+collectd_LDADD += "-dlopen" rrdcached.la
+collectd_DEPENDENCIES += rrdcached.la
+endif
+
if BUILD_PLUGIN_RRDTOOL
pkglib_LTLIBRARIES += rrdtool.la
-rrdtool_la_SOURCES = rrdtool.c
+rrdtool_la_SOURCES = rrdtool.c utils_rrdcreate.c utils_rrdcreate.h
rrdtool_la_LDFLAGS = -module -avoid-version
rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LDFLAGS)
diff --cc src/collectd.conf.in
Simple merge
diff --cc src/collectd.conf.pod
Simple merge
diff --cc src/rrdtool.c
index 1c4f5dd297b759d7bbc9c2071f3e5eb822555471,2e1727a888e7d38bc9aca799f70f212ea617dbd2..9b236cb85553a5d632d35760bb266c97bfba27ff
--- 1/src/rrdtool.c
--- 2/src/rrdtool.c
+++ b/src/rrdtool.c
/* If datadir is zero, the daemon's basedir is used. If stepsize or heartbeat
* is zero a default, depending on the `interval' member of the value list is
* being used. */
--static char *datadir = NULL;
-static int stepsize = 0;
-static int heartbeat = 0;
-static int rrarows = 1200;
-static double xff = 0.1;
-static double write_rate = 0.0;
++static char *datadir = NULL;
++static double write_rate = 0.0;
+static rrdcreate_config_t rrdcreate_config =
+{
+ /* stepsize = */ 0,
+ /* heartbeat = */ 0,
+ /* rrarows = */ 1200,
+ /* xff = */ 0.1,
+
+ /* timespans = */ NULL,
+ /* timespans_num = */ 0,
+
+ /* consolidation_functions = */ NULL,
+ /* consolidation_functions_num = */ 0
+};
/* XXX: If you need to lock both, cache_lock and queue_lock, at the same time,
* ALWAYS lock `cache_lock' first! */
"be in the range 0 to 1 (exclusive).");
return (1);
}
- xff = tmp;
+ rrdcreate_config.xff = tmp;
}
+ else if (strcasecmp ("WritesPerSecond", key) == 0)
+ {
+ double wps = atof (value);
+
+ if (wps < 0.0)
+ {
+ fprintf (stderr, "rrdtool: `WritesPerSecond' must be "
+ "greater than or equal to zero.");
+ return (1);
+ }
+ else if (wps == 0.0)
+ {
+ write_rate = 0.0;
+ }
+ else
+ {
+ write_rate = 1.0 / wps;
+ }
+ }
else
{
return (-1);
diff --cc src/types.db
index 80d6cee22fbfaed5e2d345f80ba224517916ff89,c8d2f8a1f233d8529b5cd2a85a4f7648f79254ba..21d15d64580c58246fe36324717734cc1c9df04c
--- 1/src/types.db
--- 2/src/types.db
+++ b/src/types.db
nfs_procedure value:COUNTER:0:4294967295
nginx_connections value:GAUGE:0:U
nginx_requests value:COUNTER:0:134217728
+operations value:COUNTER:0:4294967295
percent percent:GAUGE:0:100.1
pg_blks value:COUNTER:0:U
+ pg_db_size value:GAUGE:0:U
pg_n_tup_c value:COUNTER:0:U
pg_n_tup_g value:GAUGE:0:U
pg_numbackends value:GAUGE:0:U