AC_HEADER_DIRENT
AC_CHECK_HEADERS(stdint.h)
AC_CHECK_HEADERS(errno.h)
+AC_CHECK_HEADERS(math.h)
AC_CHECK_HEADERS(syslog.h)
AC_CHECK_HEADERS(fcntl.h)
AC_CHECK_HEADERS(signal.h)
[Wether or not to use mysql library])
AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
+# Define `step' and `hearbeat' values..
+declare -i collectd_step=10
+declare -i collectd_heartbeat=25
+AC_ARG_WITH(step, [AS_HELP_STRING([--with-step=SECONDS], [Interval in which plugins are queried.])],
+[
+ if test "x$withval" != "xno" -a "x$withval" != "xyes"
+ then
+ declare -i tmp_collectd_step="$withval"
+ if test $tmp_collectd_step -gt 0
+ then
+ collectd_step=$tmp_collectd_step
+ let "collectd_heartbeat=$collectd_step*2"
+ fi
+ fi
+], [])
+AC_ARG_WITH(heartbeat, [AS_HELP_STRING([--with-heartbeat=SECONDS], [Heartbeat of the DS in generated RRD files.])],
+[
+ if test "x$withval" != "xno" -a "x$withval" != "xyes"
+ then
+ declare -i tmp_collectd_heartbeat="$withval"
+ if test $tmp_collectd_heartbeat -gt 0
+ then
+ collectd_heartbeat=$tmp_collectd_heartbeat
+ fi
+ fi
+], [])
+
+if test $collectd_step -ne 10
+then
+ AC_DEFINE_UNQUOTED(COLLECTD_STEP, "$collectd_step", [Interval in which plugins are queried.])
+fi
+if test $collectd_heartbeat -ne 25
+then
+ AC_DEFINE_UNQUOTED(COLLECTD_HEARTBEAT, "$collectd_heartbeat", [Interval in which plugins are queried.])
+fi
+
#
# Check for enabled/disabled features
#
Features:
debug . . . . . . . $enable_debug
daemon mode . . . . $enable_daemon
+ step . . . . . . . $collectd_step seconds
+ heartbeat . . . . . $collectd_heartbeat seconds
Modules:
battery . . . . . . $enable_battery
static char *ds_def_current[] =
{
- "DS:current:GAUGE:25:U:U",
+ "DS:current:GAUGE:"COLLECTD_HEARTBEAT":U:U",
NULL
};
static int ds_num_current = 1;
static char *ds_def_voltage[] =
{
- "DS:voltage:GAUGE:25:U:U",
+ "DS:voltage:GAUGE:"COLLECTD_HEARTBEAT":U:U",
NULL
};
static int ds_num_voltage = 1;
static char *ds_def_charge[] =
{
- "DS:charge:GAUGE:25:0:U",
+ "DS:charge:GAUGE:"COLLECTD_HEARTBEAT":0:U",
NULL
};
static int ds_num_charge = 1;
#if COLLECT_DEBUG
" Log-File "LOGFILE"\n"
#endif
+ " Step "COLLECTD_STEP" seconds\n"
+ " Heartbeat "COLLECTD_HEARTBEAT" seconds\n"
"\n"PACKAGE" "VERSION", http://verplant.org/collectd/\n"
"by Florian octo Forster <octo@verplant.org>\n"
"for contributions see `AUTHORS'\n");
static int start_client (void)
{
- int sleepingtime;
+ int step;
+
+ struct timeval tv_now;
+ struct timeval tv_next;
+ struct timespec ts_wait;
+
+ step = atoi (COLLECTD_STEP);
+ if (step <= 0)
+ step = 10;
#if HAVE_LIBKSTAT
kc = NULL;
while (loop == 0)
{
- curtime = time (NULL);
+ if (gettimeofday (&tv_next, NULL) < 0)
+ {
+ syslog (LOG_ERR, "gettimeofday failed: %s", strerror (errno));
+ return (-1);
+ }
+ tv_next.tv_sec += step;
+
#if HAVE_LIBKSTAT
update_kstat ();
#endif
+ /* `curtime' is used by many (all?) plugins as the
+ * data-sample-time passed to RRDTool */
+ curtime = time (NULL);
+
+ /* Issue all plugins */
plugin_read_all ();
- sleepingtime = 10;
- while (sleepingtime != 0)
+ if (gettimeofday (&tv_now, NULL) < 0)
{
- if (loop != 0)
+ syslog (LOG_ERR, "gettimeofday failed: %s", strerror (errno));
+ return (-1);
+ }
+
+ if (timeval_sub_timespec (&tv_next, &tv_now, &ts_wait) != 0)
+ {
+ syslog (LOG_WARNING, "No sleeping because `timeval_sub_timespec' returned non-zero!");
+ continue;
+ }
+
+ while (nanosleep (&ts_wait, &ts_wait) == -1)
+ {
+ if (errno != EINTR)
+ {
+ syslog (LOG_ERR, "nanosleep failed: %s", strerror (errno));
break;
- sleepingtime = sleep (sleepingtime);
+ }
}
}
#define MODE_CLIENT 0x02
#define MODE_LOCAL 0x04
+#ifndef COLLECTD_STEP
+# define COLLECTD_STEP "10"
+#endif
+
+#ifndef COLLECTD_HEARTBEAT
+# define COLLECTD_HEARTBEAT "25"
+#endif
+
+#ifndef COLLECTD_ROWS
+# define COLLECTD_ROWS "1200"
+#endif
+
+#ifndef COLLECTD_XFF
+# define COLLECTD_XFF 0.1
+#endif
+
extern time_t curtime;
#ifdef HAVE_LIBRRD
The RRD files are created automatically with the following RRAs:
+ RRA:AVERAGE:0.0:1:1500
RRA:AVERAGE:0.2:6:1500
RRA:AVERAGE:0.1:180:1680
RRA:AVERAGE:0.1:2160:1520
+ RRA:MIN:0.0:1:1500
RRA:MIN:0.2:6:1500
RRA:MIN:0.1:180:1680
RRA:MIN:0.1:2160:1520
+ RRA:MAX:0.0:1:1500
RRA:MAX:0.2:6:1500
RRA:MAX:0.1:180:1680
RRA:MAX:0.1:2160:1520
-Since collectd uses a 10 second I<step> the RRAs contain the following
-timespans:
+By default collectd uses a 10 second I<step>. Thus the RRAs contain the
+following timespans. If you've changed the I<step> at compile time you will
+have calculate resolution and timespan yourself.
- Resolution | Data points | Timespan
- -----------+-------------+----------
- 60 seconds | 1500 | 25 hours
- 30 minutes | 1680 | 35 days
- 6 hours | 1520 | 380 days
+ PDP per CDP | Resolution | Data points | Timespan
+ ------------+------------+-------------+----------
+ 1 | 10 seconds ! 1500 ! 4 hours
+ 6 | 1 minute | 1500 | 25 hours
+ 180 | 30 minutes | 1680 | 35 days
+ 2160 | 6 hours | 1520 | 380 days
The DS'es depend on the module creating the RRD files:
#include "common.h"
#include "utils_debug.h"
+#ifdef HAVE_MATH_H
+# include <math.h>
+#endif
+
#ifdef HAVE_LIBKSTAT
extern kstat_ctl_t *kc;
#endif
#ifdef HAVE_LIBRRD
+#if 0
static char *rra_def[] =
{
+ "RRA:AVERAGE:0.0:1:1500",
"RRA:AVERAGE:0.2:6:1500",
"RRA:AVERAGE:0.1:180:1680",
"RRA:AVERAGE:0.1:2160:1520",
+ "RRA:MIN:0.0:1:1500",
"RRA:MIN:0.2:6:1500",
"RRA:MIN:0.1:180:1680",
"RRA:MIN:0.1:2160:1520",
+ "RRA:MAX:0.0:1:1500",
"RRA:MAX:0.2:6:1500",
"RRA:MAX:0.1:180:1680",
"RRA:MAX:0.1:2160:1520",
NULL
};
-static int rra_num = 9;
+static int rra_num = 12;
+#endif
+
+static int rra_timespans[] =
+{
+ 3600,
+ 86400,
+ 604800,
+ 2678400,
+ 31622400,
+ 0
+};
+static int rra_timespans_num = 5;
+
+static char *rra_types[] =
+{
+ "AVERAGE",
+ "MIN",
+ "MAX",
+ NULL
+};
+static int rra_types_num = 3;
#endif /* HAVE_LIBRRD */
void sstrncpy (char *d, const char *s, int len)
return (0);
}
+int timeval_sub_timespec (struct timeval *tv0, struct timeval *tv1, struct timespec *ret)
+{
+ if ((tv0 == NULL) || (tv1 == NULL) || (ret == NULL))
+ return (-2);
+
+ if ((tv0->tv_sec < tv1->tv_sec)
+ || ((tv0->tv_sec == tv1->tv_sec) && (tv0->tv_usec < tv1->tv_usec)))
+ return (-1);
+
+ ret->tv_sec = tv0->tv_sec - tv1->tv_sec;
+ ret->tv_nsec = 1000 * ((long) (tv0->tv_usec - tv1->tv_usec));
+
+ if (ret->tv_nsec < 0)
+ {
+ assert (ret->tv_sec > 0);
+
+ ret->tv_nsec += 1000000000;
+ ret->tv_sec -= 1;
+ }
+
+ return (0);
+}
+
#ifdef HAVE_LIBRRD
int check_create_dir (const char *file_orig)
{
return (0);
}
+/* * * * *
+ * Magic *
+ * * * * */
+int rra_get (char ***ret)
+{
+ static char **rra_def = NULL;
+ static int rra_num = 0;
+
+ int rra_max = rra_timespans_num * rra_types_num;
+
+ int step;
+ int rows;
+ int span;
+
+ int cdp_num;
+ int cdp_len;
+ int i, j;
+
+ char buffer[64];
+
+ if ((rra_num != 0) && (rra_def != NULL))
+ {
+ *ret = rra_def;
+ return (rra_num);
+ }
+
+ if ((rra_def = (char **) malloc ((rra_max + 1) * sizeof (char *))) == NULL)
+ return (-1);
+ memset (rra_def, '\0', (rra_max + 1) * sizeof (char *));
+
+ step = atoi (COLLECTD_STEP);
+ rows = atoi (COLLECTD_ROWS);
+
+ if ((step <= 0) || (rows <= 0))
+ {
+ *ret = NULL;
+ return (-1);
+ }
+
+ cdp_len = 0;
+ for (i = 0; i < rra_timespans_num; i++)
+ {
+ span = rra_timespans[i];
+
+ if ((span / step) < rows)
+ continue;
+
+ if (cdp_len == 0)
+ cdp_len = 1;
+ else
+ cdp_len = (int) floor (((double) span) / ((double) (rows * step)));
+
+ cdp_num = (int) ceil (((double) span) / ((double) (cdp_len * step)));
+
+ for (j = 0; j < rra_types_num; j++)
+ {
+ if (rra_num >= rra_max)
+ break;
+
+ if (snprintf (buffer, sizeof(buffer), "RRA:%s:%3.1f:%u:%u",
+ rra_types[j], COLLECTD_XFF,
+ cdp_len, cdp_num) >= sizeof (buffer))
+ {
+ syslog (LOG_ERR, "rra_get: Buffer would have been truncated.");
+ continue;
+ }
+
+ rra_def[rra_num++] = sstrdup (buffer);
+ }
+ }
+
+#if COLLECT_DEBUG
+ DBG ("rra_num = %i", rra_num);
+ for (i = 0; i < rra_num; i++)
+ DBG (" %s", rra_def[i]);
+#endif
+
+ *ret = rra_def;
+ return (rra_num);
+}
+
int rrd_create_file (char *filename, char **ds_def, int ds_num)
{
char **argv;
int argc;
+ char **rra_def;
+ int rra_num;
int i, j;
int status = 0;
if (check_create_dir (filename))
return (-1);
+ if ((rra_num = rra_get (&rra_def)) < 1)
+ {
+ syslog (LOG_ERR, "rra_create failed: Could not calculate RRAs");
+ return (-1);
+ }
+
argc = ds_num + rra_num + 4;
if ((argv = (char **) malloc (sizeof (char *) * (argc + 1))) == NULL)
argv[0] = "create";
argv[1] = filename;
argv[2] = "-s";
- argv[3] = "10";
+ argv[3] = COLLECTD_STEP;
j = 4;
for (i = 0; i < ds_num; i++)
*/
int escape_slashes (char *buf, int buf_len);
+/* FIXME: `timeval_sub_timespec' needs a description */
+int timeval_sub_timespec (struct timeval *tv0, struct timeval *tv1, struct timespec *ret);
+
int rrd_update_file (char *host, char *file, char *values, char **ds_def,
int ds_num);
static char *ds_def[] =
{
- "DS:user:COUNTER:25:0:U",
- "DS:nice:COUNTER:25:0:U",
- "DS:syst:COUNTER:25:0:U",
- "DS:idle:COUNTER:25:0:U",
- "DS:wait:COUNTER:25:0:U",
+ "DS:user:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:nice:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:syst:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:idle:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:wait:COUNTER:"COLLECTD_HEARTBEAT":0:U",
NULL
};
static int ds_num = 5;
static char *ds_def[] =
{
- "DS:value:GAUGE:25:0:U",
+ "DS:value:GAUGE:"COLLECTD_HEARTBEAT":0:U",
NULL
};
static int ds_num = 1;
static char *ds_def[] =
{
- "DS:used:GAUGE:25:0:U",
- "DS:free:GAUGE:25:0:U",
+ "DS:used:GAUGE:"COLLECTD_HEARTBEAT":0:U",
+ "DS:free:GAUGE:"COLLECTD_HEARTBEAT":0:U",
NULL
};
static int ds_num = 2;
/* 104857600 == 100 MB */
static char *disk_ds_def[] =
{
- "DS:rcount:COUNTER:25:0:U",
- "DS:rmerged:COUNTER:25:0:U",
- "DS:rbytes:COUNTER:25:0:104857600",
- "DS:rtime:COUNTER:25:0:U",
- "DS:wcount:COUNTER:25:0:U",
- "DS:wmerged:COUNTER:25:0:U",
- "DS:wbytes:COUNTER:25:0:104857600",
- "DS:wtime:COUNTER:25:0:U",
+ "DS:rcount:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:rmerged:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:rbytes:COUNTER:"COLLECTD_HEARTBEAT":0:104857600",
+ "DS:rtime:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:wcount:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:wmerged:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:wbytes:COUNTER:"COLLECTD_HEARTBEAT":0:104857600",
+ "DS:wtime:COUNTER:"COLLECTD_HEARTBEAT":0:U",
NULL
};
static int disk_ds_num = 8;
static char *part_ds_def[] =
{
- "DS:rcount:COUNTER:25:0:U",
- "DS:rbytes:COUNTER:25:0:104857600",
- "DS:wcount:COUNTER:25:0:U",
- "DS:wbytes:COUNTER:25:0:104857600",
+ "DS:rcount:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:rbytes:COUNTER:"COLLECTD_HEARTBEAT":0:104857600",
+ "DS:wcount:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:wbytes:COUNTER:"COLLECTD_HEARTBEAT":0:104857600",
NULL
};
static int part_ds_num = 4;
static char *ds_def[] =
{
- "DS:value:GAUGE:25:U:U",
+ "DS:value:GAUGE:"COLLECTD_HEARTBEAT":U:U",
NULL
};
static int ds_num = 1;
static char *ds_def[] =
{
- "DS:shortterm:GAUGE:25:0:100",
- "DS:midterm:GAUGE:25:0:100",
- "DS:longterm:GAUGE:25:0:100",
+ "DS:shortterm:GAUGE:"COLLECTD_HEARTBEAT":0:100",
+ "DS:midterm:GAUGE:"COLLECTD_HEARTBEAT":0:100",
+ "DS:longterm:GAUGE:"COLLECTD_HEARTBEAT":0:100",
NULL
};
static int ds_num = 3;
/* 9223372036854775807 == LLONG_MAX */
static char *ds_def[] =
{
- "DS:used:GAUGE:25:0:9223372036854775807",
- "DS:free:GAUGE:25:0:9223372036854775807",
- "DS:buffers:GAUGE:25:0:9223372036854775807",
- "DS:cached:GAUGE:25:0:9223372036854775807",
+ "DS:used:GAUGE:"COLLECTD_HEARTBEAT":0:9223372036854775807",
+ "DS:free:GAUGE:"COLLECTD_HEARTBEAT":0:9223372036854775807",
+ "DS:buffers:GAUGE:"COLLECTD_HEARTBEAT":0:9223372036854775807",
+ "DS:cached:GAUGE:"COLLECTD_HEARTBEAT":0:9223372036854775807",
NULL
};
static int ds_num = 4;
static char *commands_ds_def[] =
{
- "DS:value:COUNTER:25:0:U",
+ "DS:value:COUNTER:"COLLECTD_HEARTBEAT":0:U",
NULL
};
static int commands_ds_num = 1;
static char *handler_ds_def[] =
{
- "DS:value:COUNTER:25:0:U",
+ "DS:value:COUNTER:"COLLECTD_HEARTBEAT":0:U",
NULL
};
static int handler_ds_num = 1;
static char *qcache_ds_def[] =
{
- "DS:hits:COUNTER:25:0:U",
- "DS:inserts:COUNTER:25:0:U",
- "DS:not_cached:COUNTER:25:0:U",
- "DS:lowmem_prunes:COUNTER:25:0:U",
- "DS:queries_in_cache:GAUGE:25:0:U",
+ "DS:hits:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:inserts:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:not_cached:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:lowmem_prunes:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:queries_in_cache:GAUGE:"COLLECTD_HEARTBEAT":0:U",
NULL
};
static int qcache_ds_num = 5;
static char *threads_ds_def[] =
{
- "DS:running:GAUGE:25:0:U",
- "DS:connected:GAUGE:25:0:U",
- "DS:cached:GAUGE:25:0:U",
- "DS:created:COUNTER:25:0:U",
+ "DS:running:GAUGE:"COLLECTD_HEARTBEAT":0:U",
+ "DS:connected:GAUGE:"COLLECTD_HEARTBEAT":0:U",
+ "DS:cached:GAUGE:"COLLECTD_HEARTBEAT":0:U",
+ "DS:created:COUNTER:"COLLECTD_HEARTBEAT":0:U",
NULL
};
static int threads_ds_num = 4;
static char *traffic_ds_def[] =
{
- "DS:incoming:COUNTER:25:0:U",
- "DS:outgoing:COUNTER:25:0:U",
+ "DS:incoming:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:outgoing:COUNTER:"COLLECTD_HEARTBEAT":0:U",
NULL
};
static int traffic_ds_num = 2;
static char *nfs2_procedures_ds_def[] =
{
- "DS:null:COUNTER:25:0:U",
- "DS:getattr:COUNTER:25:0:U",
- "DS:setattr:COUNTER:25:0:U",
- "DS:root:COUNTER:25:0:U",
- "DS:lookup:COUNTER:25:0:U",
- "DS:readlink:COUNTER:25:0:U",
- "DS:read:COUNTER:25:0:U",
- "DS:wrcache:COUNTER:25:0:U",
- "DS:write:COUNTER:25:0:U",
- "DS:create:COUNTER:25:0:U",
- "DS:remove:COUNTER:25:0:U",
- "DS:rename:COUNTER:25:0:U",
- "DS:link:COUNTER:25:0:U",
- "DS:symlink:COUNTER:25:0:U",
- "DS:mkdir:COUNTER:25:0:U",
- "DS:rmdir:COUNTER:25:0:U",
- "DS:readdir:COUNTER:25:0:U",
- "DS:fsstat:COUNTER:25:0:U",
+ "DS:null:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:getattr:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:setattr:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:root:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:lookup:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:readlink:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:read:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:wrcache:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:write:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:create:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:remove:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:rename:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:link:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:symlink:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:mkdir:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:rmdir:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:readdir:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:fsstat:COUNTER:"COLLECTD_HEARTBEAT":0:U",
NULL
};
static int nfs2_procedures_ds_num = 18;
static char *nfs3_procedures_ds_def[] =
{
- "DS:null:COUNTER:25:0:U",
- "DS:getattr:COUNTER:25:0:U",
- "DS:setattr:COUNTER:25:0:U",
- "DS:lookup:COUNTER:25:0:U",
- "DS:access:COUNTER:25:0:U",
- "DS:readlink:COUNTER:25:0:U",
- "DS:read:COUNTER:25:0:U",
- "DS:write:COUNTER:25:0:U",
- "DS:create:COUNTER:25:0:U",
- "DS:mkdir:COUNTER:25:0:U",
- "DS:symlink:COUNTER:25:0:U",
- "DS:mknod:COUNTER:25:0:U",
- "DS:remove:COUNTER:25:0:U",
- "DS:rmdir:COUNTER:25:0:U",
- "DS:rename:COUNTER:25:0:U",
- "DS:link:COUNTER:25:0:U",
- "DS:readdir:COUNTER:25:0:U",
- "DS:readdirplus:COUNTER:25:0:U",
- "DS:fsstat:COUNTER:25:0:U",
- "DS:fsinfo:COUNTER:25:0:U",
- "DS:pathconf:COUNTER:25:0:U",
- "DS:commit:COUNTER:25:0:U",
+ "DS:null:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:getattr:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:setattr:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:lookup:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:access:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:readlink:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:read:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:write:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:create:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:mkdir:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:symlink:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:mknod:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:remove:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:rmdir:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:rename:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:link:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:readdir:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:readdirplus:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:fsstat:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:fsinfo:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:pathconf:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:commit:COUNTER:"COLLECTD_HEARTBEAT":0:U",
NULL
};
static int nfs3_procedures_ds_num = 22;
static char *ds_def[] =
{
- "DS:ping:GAUGE:25:0:65535",
+ "DS:ping:GAUGE:"COLLECTD_HEARTBEAT":0:65535",
NULL
};
static int ds_num = 1;
static char *ds_def[] =
{
- "DS:running:GAUGE:25:0:65535",
- "DS:sleeping:GAUGE:25:0:65535",
- "DS:zombies:GAUGE:25:0:65535",
- "DS:stopped:GAUGE:25:0:65535",
- "DS:paging:GAUGE:25:0:65535",
- "DS:blocked:GAUGE:25:0:65535",
+ "DS:running:GAUGE:"COLLECTD_HEARTBEAT":0:65535",
+ "DS:sleeping:GAUGE:"COLLECTD_HEARTBEAT":0:65535",
+ "DS:zombies:GAUGE:"COLLECTD_HEARTBEAT":0:65535",
+ "DS:stopped:GAUGE:"COLLECTD_HEARTBEAT":0:65535",
+ "DS:paging:GAUGE:"COLLECTD_HEARTBEAT":0:65535",
+ "DS:blocked:GAUGE:"COLLECTD_HEARTBEAT":0:65535",
NULL
};
static int ds_num = 6;
static char *ds_def[] =
{
- "DS:value:GAUGE:25:U:U",
+ "DS:value:GAUGE:"COLLECTD_HEARTBEAT":U:U",
NULL
};
static int ds_num = 1;
static char *ds_def[] =
{
- "DS:incoming:COUNTER:25:0:U",
- "DS:outgoing:COUNTER:25:0:U",
+ "DS:incoming:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:outgoing:COUNTER:"COLLECTD_HEARTBEAT":0:U",
NULL
};
static int ds_num = 2;
/* 1099511627776 == 1TB ought to be enough for anyone ;) */
static char *ds_def[] =
{
- "DS:used:GAUGE:25:0:1099511627776",
- "DS:free:GAUGE:25:0:1099511627776",
- "DS:cached:GAUGE:25:0:1099511627776",
- "DS:resv:GAUGE:25:0:1099511627776",
+ "DS:used:GAUGE:"COLLECTD_HEARTBEAT":0:1099511627776",
+ "DS:free:GAUGE:"COLLECTD_HEARTBEAT":0:1099511627776",
+ "DS:cached:GAUGE:"COLLECTD_HEARTBEAT":0:1099511627776",
+ "DS:resv:GAUGE:"COLLECTD_HEARTBEAT":0:1099511627776",
NULL
};
static int ds_num = 4;
/* 104857600 == 100 MB */
static char *tape_ds_def[] =
{
- "DS:rcount:COUNTER:25:0:U",
- "DS:rmerged:COUNTER:25:0:U",
- "DS:rbytes:COUNTER:25:0:U",
- "DS:rtime:COUNTER:25:0:U",
- "DS:wcount:COUNTER:25:0:U",
- "DS:wmerged:COUNTER:25:0:U",
- "DS:wbytes:COUNTER:25:0:U",
- "DS:wtime:COUNTER:25:0:U",
+ "DS:rcount:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:rmerged:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:rbytes:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:rtime:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:wcount:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:wmerged:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:wbytes:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:wtime:COUNTER:"COLLECTD_HEARTBEAT":0:U",
NULL
};
static int tape_ds_num = 8;
static char *ds_def[] =
{
- "DS:incoming:COUNTER:25:0:U",
- "DS:outgoing:COUNTER:25:0:U",
+ "DS:incoming:COUNTER:"COLLECTD_HEARTBEAT":0:U",
+ "DS:outgoing:COUNTER:"COLLECTD_HEARTBEAT":0:U",
NULL
};
static int ds_num = 2;
static char *rrd_file = "users.rrd";
static char *ds_def[] =
{
- "DS:users:GAUGE:25:0:65535",
+ "DS:users:GAUGE:"COLLECTD_HEARTBEAT":0:65535",
NULL
};
static int ds_num = 1;
/* bytes transferred */
static char *ds_def_unix[] =
{
- "DS:incoming:COUNTER:25:0:9223372036854775807",
- "DS:outgoing:COUNTER:25:0:9223372036854775807",
- "DS:failed:COUNTER:25:0:9223372036854775807",
+ "DS:incoming:COUNTER:"COLLECTD_HEARTBEAT":0:9223372036854775807",
+ "DS:outgoing:COUNTER:"COLLECTD_HEARTBEAT":0:9223372036854775807",
+ "DS:failed:COUNTER:"COLLECTD_HEARTBEAT":0:9223372036854775807",
NULL
};
static int ds_num_unix = 3;
static char *ds_def_inet[] =
{
- "DS:incoming:COUNTER:25:0:9223372036854775807",
- "DS:outgoing:COUNTER:25:0:9223372036854775807",
- "DS:failed:COUNTER:25:0:9223372036854775807",
+ "DS:incoming:COUNTER:"COLLECTD_HEARTBEAT":0:9223372036854775807",
+ "DS:outgoing:COUNTER:"COLLECTD_HEARTBEAT":0:9223372036854775807",
+ "DS:failed:COUNTER:"COLLECTD_HEARTBEAT":0:9223372036854775807",
NULL
};
static int ds_num_inet = 3;
static char *ds_def_inet6[] =
{
- "DS:incoming:COUNTER:25:0:9223372036854775807",
- "DS:outgoing:COUNTER:25:0:9223372036854775807",
- "DS:failed:COUNTER:25:0:9223372036854775807",
+ "DS:incoming:COUNTER:"COLLECTD_HEARTBEAT":0:9223372036854775807",
+ "DS:outgoing:COUNTER:"COLLECTD_HEARTBEAT":0:9223372036854775807",
+ "DS:failed:COUNTER:"COLLECTD_HEARTBEAT":0:9223372036854775807",
NULL
};
static int ds_num_inet6 = 3;
static char *ds_def_other[] =
{
- "DS:incoming:COUNTER:25:0:9223372036854775807",
- "DS:outgoing:COUNTER:25:0:9223372036854775807",
- "DS:failed:COUNTER:25:0:9223372036854775807",
+ "DS:incoming:COUNTER:"COLLECTD_HEARTBEAT":0:9223372036854775807",
+ "DS:outgoing:COUNTER:"COLLECTD_HEARTBEAT":0:9223372036854775807",
+ "DS:failed:COUNTER:"COLLECTD_HEARTBEAT":0:9223372036854775807",
NULL
};
static int ds_num_other = 3;
static char *ds_def_unspec[] =
{
- "DS:incoming:COUNTER:25:0:9223372036854775807",
- "DS:outgoing:COUNTER:25:0:9223372036854775807",
- "DS:failed:COUNTER:25:0:9223372036854775807",
+ "DS:incoming:COUNTER:"COLLECTD_HEARTBEAT":0:9223372036854775807",
+ "DS:outgoing:COUNTER:"COLLECTD_HEARTBEAT":0:9223372036854775807",
+ "DS:failed:COUNTER:"COLLECTD_HEARTBEAT":0:9223372036854775807",
NULL
};
static int ds_num_unspec = 3;
static char *ds_def_threads[] =
{
- "DS:total:GAUGE:25:0:65535",
- "DS:running:GAUGE:25:0:65535",
- "DS:uninterruptible:GAUGE:25:0:65535",
- "DS:onhold:GAUGE:25:0:65535",
+ "DS:total:GAUGE:"COLLECTD_HEARTBEAT":0:65535",
+ "DS:running:GAUGE:"COLLECTD_HEARTBEAT":0:65535",
+ "DS:uninterruptible:GAUGE:"COLLECTD_HEARTBEAT":0:65535",
+ "DS:onhold:GAUGE:"COLLECTD_HEARTBEAT":0:65535",
NULL
};
static int ds_num_threads = 4;
static char *ds_def_load[] =
{
- "DS:shortterm:GAUGE:25:0:100",
- "DS:midterm:GAUGE:25:0:100",
- "DS:longterm:GAUGE:25:0:100",
+ "DS:shortterm:GAUGE:"COLLECTD_HEARTBEAT":0:100",
+ "DS:midterm:GAUGE:"COLLECTD_HEARTBEAT":0:100",
+ "DS:longterm:GAUGE:"COLLECTD_HEARTBEAT":0:100",
NULL
};
static int ds_num_load = 3;
static char *ds_def_procs[] =
{
- "DS:total:GAUGE:25:0:65535",
+ "DS:total:GAUGE:"COLLECTD_HEARTBEAT":0:65535",
NULL
};
static int ds_num_procs = 1;
/* bytes */
static char *ds_def_memory[] =
{
- "DS:vm:GAUGE:25:0:9223372036854775807",
- "DS:vml:GAUGE:25:0:9223372036854775807",
- "DS:rss:GAUGE:25:0:9223372036854775807",
- "DS:anon:GAUGE:25:0:9223372036854775807",
+ "DS:vm:GAUGE:"COLLECTD_HEARTBEAT":0:9223372036854775807",
+ "DS:vml:GAUGE:"COLLECTD_HEARTBEAT":0:9223372036854775807",
+ "DS:rss:GAUGE:"COLLECTD_HEARTBEAT":0:9223372036854775807",
+ "DS:anon:GAUGE:"COLLECTD_HEARTBEAT":0:9223372036854775807",
NULL
};
static int ds_num_memory = 4;
static char *ds_def[] =
{
- "DS:quality:GAUGE:25:0:U",
- "DS:power:GAUGE:25:U:0",
- "DS:noise:GAUGE:25:U:0",
+ "DS:quality:GAUGE:"COLLECTD_HEARTBEAT":0:U",
+ "DS:power:GAUGE:"COLLECTD_HEARTBEAT":U:0",
+ "DS:noise:GAUGE:"COLLECTD_HEARTBEAT":U:0",
NULL
};
static int ds_num = 3;