author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 13 Sep 2009 12:32:34 +0000 (14:32 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 13 Sep 2009 12:32:34 +0000 (14:32 +0200) |
Conflicts:
ChangeLog
contrib/collection3/etc/collection.conf
src/df.c
version-gen.sh
ChangeLog
contrib/collection3/etc/collection.conf
src/df.c
version-gen.sh
12 files changed:
1 | 2 | |||
---|---|---|---|---|
ChangeLog | patch | | diff1 | | diff2 | | blob | history |
README | patch | | diff1 | | diff2 | | blob | history |
configure.in | patch | | diff1 | | diff2 | | blob | history |
contrib/collection3/etc/collection.conf | patch | | diff1 | | diff2 | | blob | history |
contrib/cussh.pl | patch | | diff1 | | diff2 | | blob | history |
src/Makefile.am | patch | | diff1 | | diff2 | | blob | history |
src/collectd.conf.in | patch | | diff1 | | diff2 | | blob | history |
src/curl.c | patch | | diff1 | | diff2 | | blob | history |
src/df.c | patch | | diff1 | | diff2 | | blob | history |
src/network.c | patch | | diff1 | | diff2 | | blob | history |
src/plugin.c | patch | | diff1 | | diff2 | | blob | history |
src/powerdns.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc ChangeLog
index 0838f8fe4f2a7b7ee4ee8103ea25bf65b0e6df00,f88135ff7b645163acb33c66d5324bb713d739f1..64006dbb2f8ffceb756224ba22104270199317c4
+++ b/ChangeLog
+2009-09-13, Version 4.8.0
+
+ * collectd: Two new data source types, “DERIVE” and “ABSOLUTE”, have
+ been added. “DERIVE” can be used for counters that are reset
+ occasionally. Thanks to Mariusz Gronczewski for implementing this.
+ * thresholds: The advanced threshold options “Percentage”, “Hits”, and
+ “Hysteresis” have been added. Thanks to Andrés J. Díaz for hit
+ patches.
+ * curl_json plugin: The new cURL-JSON plugin reads JSON files using
+ the cURL library and parses the contents according to user
+ specification. Among other things, this allows to read statistics
+ from a CouchDB instance. Thanks to Doug MacEachern for the patch.
+ * df plugin: Using the new “ReportByDevice” option the device rather
+ than the mount point can be used to identify partitions. Thanks to
+ Paul Sadauskas for the patch.
+ * dns plugin: The possibility to ignore numeric QTypes has been added.
+ Thanks to Mirko Buffoni for the patch.
+ * GenericJMX plugin: The new, Java-based GenericJMX plugin allows to
+ query arbitrary data from a Java process using the “Java Management
+ Extensions” (JMX).
+ * madwifi plugin: The new MadWifi plugin collects information about
+ Atheros wireless LAN chipsets from the MadWifi driver. Thanks to
+ Ondrej Zajicek for his patches.
+ * network plugin: The receive- and send-buffer-sizes have been made
+ configurable, allowing for bigger and smaller packets. Thanks to
+ Aman Gupta for the patch.
+ * olsrd plugin: The new OLSRd plugin queries routing information from
+ the “Optimized Link State Routing” daemon.
+ * rrdtool plugin: A new configuration option allows to define a random
+ write delay when writing RRD files. This spreads the load created by
+ writing RRD files more evenly. Thanks to Mariusz Gronczewski for the
+ patch.
+ * swap plugin: The possibility to collect swapped in/out pages has
+ been added to the Swap plugin. Thanks to Stefan Völkel for the
+ patch.
+ * tokyotyrant plugin: The new TokyoTyrant plugin reads the number of
+ records and file size from a running Tokyo Tyrant server. Thanks to
+ Paul Sadauskas for the patch.
+ * write_http plugin: The new Write HTTP plugin sends the values
+ collected by collectd to a web-server using HTTP POST requests.
+ Thanks to Paul Sadauskas for the patch.
+ * zfs_arc plugin: The new ZFS ARC plugin collects information about
+ the “Adaptive Replacement Cache” (ARC) of the “Zeta File-System”
+ (ZFS). Thanks to Anthony Dewhurst for the patch.
+ * empty_counter match: The new Empty Counter match matches value
+ lists, where at least one data source is of type COUNTER and the
+ counter value of all counter data sources is zero.
+
+ 2009-09-13, Version 4.7.3
+ * collectd: Fix a possible but very rare invalid “free” in the caching
+ code. Thanks to Sebastian Harl for the patch.
+ * collectd: Remove old values when a cache entry is marked as missing.
+ This way the “GETVAL” command of the UnixSock plugin doesn't return
+ old, no longer valid values when this happens. Thanks to Andrés J.
+ Díaz for the patch.
+ * collectd: The “plugin_unregister_read” function has been fixed.
+ * apache, ascent, bind, curl, nginx plugins: Advise the cURL library
+ to follow redirects. Thanks to Joey Hess for reporting this bug.
+ * df plugin: Check the ignorelist before stating the file system,
+ possibly reducing the number of stats considerably. Thanks to Joey
+ Hess for reporting this bug.
+ * iptables plugin: Support for the new libiptc API has been added.
+ Thanks to Sebastian Harl for the patch. The build system has been
+ updated to the plugin only includes the shipped header files when it
+ is linked with the shipped library, too.
+ * java plugin: Delay creating the JVM until after the daemon has
+ forked. The JVM internally creates threads that are lost when
+ forking. This means that Java-based plugins are now configured
+ during the init-phase, i. e. later than other plugins.
+ * libvirt plugin: Re-connect to libvirtd if connecting fails. Thanks
+ to Alan Pevec for the patch.
+ * network plugin: Fix the handling of the “CacheFlush” option: The
+ value was assigned to a wrong variable. The initialization of the
+ gcrypt library, which is used for signing / encrypting traffic, has
+ been fixed. Thanks to Luke Heberling for the patch.
+ * powerdns plugin: Set a timeout when reading data from the datagram
+ socket. Handling of the “LocalSocket” option has been fixed. An
+ incorrectly used “type” has been corrected. Thanks to Luke Heberling
+ for his patches.
+
2009-07-19, Version 4.7.2
* Build system: Support for `DESTDIR' has been fixed in the Java
bindings.
diff --cc README
Simple merge
diff --cc configure.in
Simple merge
diff --cc contrib/collection3/etc/collection.conf
index 5bf8df88996b8061e0b4e0a5e8552a62cb11d4e2,1bef175dda23006294d9a5749792e25947c777e6..f15ea56fd1fd8eeefd381758f20bc2a3e4ce3606
Color starting ff00ff
Color waiting ffb000
</Type>
+<Type arc_counts>
+ Module ArcCounts
+ RRDTitle "ARC {type_instance} on {hostname}"
+# RRDOptions ...
+</Type>
+<Type arc_l2_bytes>
+ Module GenericIO
+ DataSources read write
+ DSName "read Read "
+ DSName "write Written"
+ RRDTitle "L2ARC traffic"
+ RRDVerticalLabel "Bytes per second"
+# RRDOptions ...
+ RRDFormat "%5.1lf%s"
+</Type>
+<Type arc_l2_size>
+ RRDTitle "L2ARC size on {hostname}"
+ RRDVerticalLabel "Size"
+ RRDFormat "%4.0lf%s"
+ RRDOptions -b 1024
+ DSName "value Current size"
+ Color value 00e000
+</Type>
+<Type arc_size>
+ DataSources "current target minlimit maxlimit"
+ RRDTitle "ARC size on {hostname}"
+ RRDVerticalLabel "Size"
+ RRDFormat "%4.0lf%s"
+ RRDOptions -b 1024
+ DSName "current Current size"
+ DSName "target Target size "
+ DSName "maxlimit Max size "
+ DSName "minlimit Min size "
+ Color current 00e000
+ Color target 0000ff
+ Color minlimit ff0000
+ Color maxlimit ff00ff
+</Type>
+<Type arc_ratio>
+ DataSources value
+ RRDTitle "{type_instance}ARC ratio on {hostname}"
+ RRDVerticalLabel "Ratio"
+ RRDFormat "%4.1lf"
+ RRDOptions -l 0
+ DSName "value Hit ratio"
+</Type>
+ <Type cache_ratio>
+ DataSources value
+ DSName value Percent
+ RRDTitle "Cache hit ratio for {plugin_instance} {type_instance}"
+ RRDVerticalLabel "Percent"
+ RRDFormat "%5.1lf %%"
+ </Type>
<Type cpu>
Module GenericStacked
DataSources value
diff --cc contrib/cussh.pl
Simple merge
diff --cc src/Makefile.am
Simple merge
diff --cc src/collectd.conf.in
Simple merge
diff --cc src/curl.c
Simple merge
diff --cc src/df.c
index 79829855d18d6fbf86f9fd0604390216121af550,2c59b01c63e7f5a5e65163f4e1278609fbec8a17..194c25730107f43149d6ea9f273ef24f74a19d45
+++ b/src/df.c
for (mnt_ptr = mnt_list; mnt_ptr != NULL; mnt_ptr = mnt_ptr->next)
{
- if (strcmp (mnt_ptr->dir, "/") == 0)
- {
- sstrncpy (mnt_name, "root", sizeof (mnt_name));
- }
- else
- {
- int i, len;
-
- sstrncpy (mnt_name, mnt_ptr->dir + 1, sizeof (mnt_name));
- len = strlen (mnt_name);
-
- for (i = 0; i < len; i++)
- if (mnt_name[i] == '/')
- mnt_name[i] = '-';
- }
-
+ if (ignorelist_match (il_device,
+ (mnt_ptr->spec_device != NULL)
+ ? mnt_ptr->spec_device
+ : mnt_ptr->device))
+ continue;
+ if (ignorelist_match (il_mountpoint, mnt_ptr->dir))
+ continue;
+ if (ignorelist_match (il_fstype, mnt_ptr->type))
+ continue;
+
if (STATANYFS (mnt_ptr->dir, &statbuf) < 0)
{
char errbuf[1024];
df_free = statbuf.f_bfree * blocksize;
df_used = (statbuf.f_blocks - statbuf.f_bfree) * blocksize;
- df_submit (mnt_name, df_used, df_free);
+ if (by_device)
+ {
+ /* eg, /dev/hda1 -- strip off the "/dev/" */
+ if (strncmp (mnt_ptr->spec_device, "/dev/", strlen ("/dev/")) == 0)
+ sstrncpy (disk_name, mnt_ptr->spec_device + strlen ("/dev/"), sizeof (disk_name));
+ else
+ sstrncpy (disk_name, mnt_ptr->spec_device, sizeof (disk_name));
+
+ if (strlen(disk_name) < 1)
+ {
+ DEBUG("df: no device name name for mountpoint %s, skipping", mnt_ptr->dir);
+ continue;
+ }
+ }
+ else
+ {
+ if (strcmp (mnt_ptr->dir, "/") == 0)
+ {
+ sstrncpy (disk_name, "root", sizeof (disk_name));
+ }
+ else
+ {
+ int i, len;
+
+ sstrncpy (disk_name, mnt_ptr->dir + 1, sizeof (disk_name));
+ len = strlen (disk_name);
+
+ for (i = 0; i < len; i++)
+ if (disk_name[i] == '/')
+ disk_name[i] = '-';
+ }
+ }
+
- if (ignorelist_match (il_device,
- (mnt_ptr->spec_device != NULL)
- ? mnt_ptr->spec_device
- : mnt_ptr->device))
- continue;
- if (ignorelist_match (il_mountpoint, mnt_ptr->dir))
- continue;
- if (ignorelist_match (il_fstype, mnt_ptr->type))
- continue;
-
+ df_submit (disk_name, df_used, df_free);
}
cu_mount_freelist (mnt_list);
diff --cc src/network.c
index 92271b786cd52dc5960c7cdf493a237177e1544f,cf67c2bd20c5e9bd2b58938eb1565be2476402ad..624078881daa345f39670c4246a7a602480be93a
--- 1/src/network.c
--- 2/src/network.c
+++ b/src/network.c
#if HAVE_LIBGCRYPT
# include <gcrypt.h>
+ GCRY_THREAD_OPTION_PTHREAD_IMPL;
#endif
-/* 1500 - 40 - 8 = Ethernet packet - IPv6 header - UDP header */
-/* #define BUFF_SIZE 1452 */
-
#ifndef IPV6_ADD_MEMBERSHIP
# ifdef IPV6_JOIN_GROUP
# define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
static int network_init (void)
{
+ static _Bool have_init = false;
+
/* Check if we were already initialized. If so, just return - there's
* nothing more to do (for now, that is). */
- if (cache_flush_last != 0)
+ if (have_init)
return (0);
+ have_init = true;
+ #if HAVE_LIBGCRYPT
+ gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
+ gcry_control (GCRYCTL_INIT_SECMEM, 32768, 0);
+ gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
+ #endif
+
plugin_register_shutdown ("network", network_shutdown);
+ send_buffer = malloc (network_config_packet_size);
+ if (send_buffer == NULL)
+ {
+ ERROR ("network plugin: malloc failed.");
+ return (-1);
+ }
network_init_buffer ();
- cache_tree = c_avl_create ((int (*) (const void *, const void *)) strcmp);
- cache_flush_last = time (NULL);
-
/* setup socket(s) and so on */
if (sending_sockets != NULL)
{
diff --cc src/plugin.c
Simple merge
diff --cc src/powerdns.c
Simple merge