[collectd] New CSV like plugin and help with patches
Daniel Hilst
danielhilst at gmail.com
Thu Jul 26 02:10:23 CEST 2012
Hi,
I write a new CSV plugin based on csv plugin source. This
plugin creates only one CSV file and write only the values that you
have requested. The "original" CSV file will write every value
collected, if you have a machine receiving data from other
collectd's then you have a huge amount of data being written.
This plugin will help you to have only what you want on CSV
file. Also the file is rotated daily, as csv plugin would do too. Is
useful for data that
would suffer further processing. We use this to get this values
written on a database for example.
Here is an example of its configuration block
<Plugin "pax_write">
DataDir "/opt/collectd/var/lib/collectd/csv/"
FilePrefix "data-file"
StoreRates false
<Host "localhost">
Plugin "memory/memory-free" # If you dot pass a datasource
<Plugin "load/load"> # then all are written to file
DS "shortterm" "midterm"
</Plugin>
</Host>
</Plugin>
Also I'm here asking for help. Since I've forked[1] octo's git
repo.. And have write my changes to that fork.. How can I
generate a patch for the new plugin.. I can't do it for tar
source because I need to apply changes on configure.in and
src/Makefile.am and run build.sh script that is only available on
git version.. What to do??
I'm attaching the plugin source here. Here is how make it work
- Clone from collectd git
- Download the source of plugin attached to this message and put it on
src directory
- Put this line on configure.in
AC_PLUGIN([pax_write], [yes], [Pax write output plugin])
- Put this lines on src/Makefile.am
if BUILD_PLUGIN_PAX_WRITE
pkglib_LTLIBRARIES += pax_write.la
pax_write_la_SOURCES = pax_write.c
pax_write_la_LDFLAGS = -module -avoid-version
collectd_LDADD += "-dlopen" pax_write.la
collectd_DEPENDENCIES += pax_write.la
endif
- Run build.sh
- ./configure && make install all
Thanks in advance!
Cheers!
Hilst
[1] https://github.com/gkos/collectd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pax_write.c
Type: text/x-c
Size: 22854 bytes
Desc: not available
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20120725/f6b888fe/attachment.bin>
More information about the collectd
mailing list