author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 3 Oct 2008 21:18:28 +0000 (23:18 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Fri, 3 Oct 2008 21:18:28 +0000 (23:18 +0200) |
diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod
index 0bca23e35cf86530049e684e93871cb88f3b6c1a..0cf1c2435c9f5ab1d011d4a9468233df29e49a74 100644 (file)
--- a/src/collectd.conf.pod
+++ b/src/collectd.conf.pod
@@ -2022,6 +2022,9 @@ hosts sends it's CPU statistics to the server every 60 seconds, a notification
will be dispatched after about 120 seconds. It may take a little longer because
the timeout is checked only once each B<Interval> on the server.
+When a value comes within range again or is received after it was missing, an
+"OKAY-notification" is dispatched.
+
Here is a configuration example to get you started. Read below for more
information.
diff --git a/src/collectdmon.c b/src/collectdmon.c
index e496eb07a65d23138513786967fb0fb2350f6fa3..015344f96a8e07b0fabf1dba614b559b280e0397 100644 (file)
--- a/src/collectdmon.c
+++ b/src/collectdmon.c
return 1;
}
- sigaddset (&sa.sa_mask, SIGCHLD);
- if (0 != sigprocmask (SIG_BLOCK, &sa.sa_mask, NULL)) {
- syslog (LOG_ERR, "Error: sigprocmask() failed: %s", strerror (errno));
- return 1;
- }
-
while (0 == loop) {
int status = 0;
diff --git a/src/iptables.c b/src/iptables.c
index 4d15c6e0896ac62e15b3082fb6c622403c4add2d..e1694af3475407ae75ba98de73e8b48598e63a56 100644 (file)
--- a/src/iptables.c
+++ b/src/iptables.c
table = fields[0];
chain = fields[1];
- table_len = strlen (table);
- if ((unsigned int)table_len >= sizeof(temp.table))
+ table_len = strlen (table) + 1;
+ if ((unsigned int)table_len > sizeof(temp.table))
{
ERROR ("Table `%s' too long.", table);
free (value_copy);
}
sstrncpy (temp.table, table, table_len);
- chain_len = strlen (chain);
- if ((unsigned int)chain_len >= sizeof(temp.chain))
+ chain_len = strlen (chain) + 1;
+ if ((unsigned int)chain_len > sizeof(temp.chain))
{
ERROR ("Chain `%s' too long.", chain);
free (value_copy);
diff --git a/src/ipvs.c b/src/ipvs.c
index 10c4d1517415cb7bf0b57a216f5cd4f3a8c22513..85e65d27e57823f2fa3776237d125cf5db82e4d3 100644 (file)
--- a/src/ipvs.c
+++ b/src/ipvs.c
char ti[DATA_MAX_NAME_LEN];
- if (0 != get_ti (de, ti, DATA_MAX_NAME_LEN))
+ if (0 != get_ti (de, ti, sizeof (ti)))
return;
cipvs_submit_connections (pi, ti, stats.conns);
int i = 0;
- if (0 != get_pi (se, pi, DATA_MAX_NAME_LEN))
+ if (0 != get_pi (se, pi, sizeof (pi)))
return;
cipvs_submit_connections (pi, NULL, stats.conns);
diff --git a/src/utils_ignorelist.c b/src/utils_ignorelist.c
index 518715b1f48ada50c018e38f600dd6c14bcbd66f..de42d0fa399035e0f2e3930866d2be670557fc72 100644 (file)
--- a/src/utils_ignorelist.c
+++ b/src/utils_ignorelist.c
if ((entry_len > 2) && (entry[0] == '/') && entry[entry_len - 1] == '/')
{
char *entry_copy;
+ size_t entry_copy_size;
/* We need to copy `entry' since it's const */
- entry_copy = smalloc (entry_len);
- memset (entry_copy, '\0', entry_len);
- sstrncpy (entry_copy, entry + 1, entry_len - 2);
+ entry_copy_size = entry_len - 1;
+ entry_copy = smalloc (entry_copy_size);
+ sstrncpy (entry_copy, entry + 1, entry_copy_size);
DEBUG("I'm about to add regex entry: %s", entry_copy);
ret = ignorelist_append_regex(il, entry_copy);