Merge branch 'st/python'
src/cpython.h: Apparently Python 2.3 doesn't have the Py_RETURN_NONE macro.
python plugin: Cast pointer to `void *' to work around strict aliasing problems.
python.c: In function `cpy_write_callback':
python.c:349: warning: dereferencing type-punned pointer will break strict-aliasing rules
python.c: In function `cpy_notification_callback':
python.c:368: warning: dereferencing type-punned pointer will break strict-aliasing rules
python.c: In function `cpy_oconfig_to_pyconfig':
python.c:842: warning: dereferencing type-punned pointer will break strict-aliasing rules
python.c: In function `cpy_config':
python.c:887: warning: dereferencing type-punned pointer will break strict-aliasing rules
python.c:888: warning: dereferencing type-punned pointer will break strict-aliasing rules
python.c:889: warning: dereferencing type-punned pointer will break strict-aliasing rules
python.c: In function `cpy_write_callback':
python.c:349: warning: dereferencing type-punned pointer will break strict-aliasing rules
python.c: In function `cpy_notification_callback':
python.c:368: warning: dereferencing type-punned pointer will break strict-aliasing rules
python.c: In function `cpy_oconfig_to_pyconfig':
python.c:842: warning: dereferencing type-punned pointer will break strict-aliasing rules
python.c: In function `cpy_config':
python.c:887: warning: dereferencing type-punned pointer will break strict-aliasing rules
python.c:888: warning: dereferencing type-punned pointer will break strict-aliasing rules
python.c:889: warning: dereferencing type-punned pointer will break strict-aliasing rules
python plugin: Fix some typos in the inline documentation.
collectd-python(5): Fixed the AUTHOR section.
Merge branch 'st/python'
Conflicts:
README
configure.in
src/owniptc/libiptc.c
src/types.db
Conflicts:
README
configure.in
src/owniptc/libiptc.c
src/types.db
collectd-python(5): Some more formatting and typo fixes.
collectd-python(5): Improve formatting of the classes.
collectd-python(5): Fix some formatting.
README: Added the python plugin.
AUTHORS: Sven +python.
src/plugin.c: Add libtool 1 compatibility code.
src/pyvalues.c: Cast `void *' to a int that's guaranteed to be big enough.
For some weird reason `int' is only 4 bytes long on x86_64, so casting
`void *' to `int' results in compiler warnings / errors.
For some weird reason `int' is only 4 bytes long on x86_64, so casting
`void *' to `int' results in compiler warnings / errors.
Merge branch 'ff/routeros'
Merge branch 'mc/openvpn'
openvpn plugin: Added comments and vim formatting line.
openvpn plugin: Remove one level of indentation in the read functions.
openvpn plugin: Rename the arguments of the submit functions.
"Type" is being used for something different, don't use that argument
name here.
"Type" is being used for something different, don't use that argument
name here.
Clean up exceptions in places where we don't care about them.
This should have been in the last commit.
Better unicode support.
Fixed build system bug.
Removes the __name__ from callback identifiers. It was useless and made things way more complicated and confusing than necessary.
Added collectd-python man page.
Added write method to Values.
Don't log stuff while holding the GIL!
Some signal dodging stuff.
Build system: Add the python plugin.
src/configfile.c: Fix a typo in two error messages.
openvpn plugin: Implement the “ImprovedNamingSchema” config option.
I'm attaching a new version that includes this config key. By default the old
naming schema is used, while for the single mode the new naming schema is
always used since there's no backward compatibility to be preserved. You can
use the previous file[1] for the 5.0 branch where only the new naming schema
will be used. A new man page text is still lacking, maybe I'll write it in the
next days.
I'm attaching a new version that includes this config key. By default the old
naming schema is used, while for the single mode the new naming schema is
always used since there's no backward compatibility to be preserved. You can
use the previous file[1] for the 5.0 branch where only the new naming schema
will be used. A new man page text is still lacking, maybe I'll write it in the
next days.
routeros plugin: Add two “Collect*” config options.
src/configfile.[ch]: Add “cf_util_get_boolean”.
collectd.conf(5): openvpn plugin: Document the "Compression" option.
AUTHORS: Update Marco's entry.
openvpn plugin: single_read: Remove one level of indentation.
openvpn plugin: Use tabs for indentation only.
Whitespace-only commit.
Whitespace-only commit.
openvpn plugin: multi1_read: Replace a hard to read for-loop with a while-loop.
openvpn plugin: Improve “version_detect”.
Remove “fscanf” with used the insecure “%s” format string. Pass the
filename rather than the file handle to the function.
Remove “fscanf” with used the insecure “%s” format string. Pass the
filename rather than the file handle to the function.
openvpn plugin: Remove trailing whitespace.
openvpn plugin: Don't use negated config options.
“NoCompression” → “Compression”.
“NoCompression” → “Compression”.
openvpn plugin: Add forgotten frees.
Florian Forster ha scritto:
> Hi Marco,
Hi Florian,
> I'm too tired to have a look at this now, I hope to have some time in
> the next few days. I'll come back to you asap.
That's fine :)
But sorry, I forgot to recheck a small part of the code after adding and
moving some stuff around, please apply this patch too.
Regards,
Marco
Florian Forster ha scritto:
> Hi Marco,
Hi Florian,
> I'm too tired to have a look at this now, I hope to have some time in
> the next few days. I'll come back to you asap.
That's fine :)
But sorry, I forgot to recheck a small part of the code after adding and
moving some stuff around, please apply this patch too.
Regards,
Marco
openvpn plugin: Add support for more versions of the “status file” (and more).
Hi all,
I have some news regarding the Openvpn plugin.
I recently upgraded to 4.7.2 and enabled the new (to me) openvpn plugin,
but unfortunately it didn't work and I couldn't understand why. So had a
look at the code and applied some changes. Here a list of things
added:
- support for multiple vpn/status files
- support for single endpoint status file and for multicontext version
1,3 (currently every status file type is supported)
- status file type auto-detection
- collection of overhead and compression stats for single mode status files
- "NoCompression" option to disable compression statistics collection
- new file naming schema correcting the previous wrong one
- debug and error output
The plugin has already been tested with my own openvpn setup and many
different files found on the net, but two major aspects have to be taken
into consideration. The first one is the new overhead collection and the
change in the compression statistics (now data is stored as they are
[1]). However, due to a bug in the previous code, no compression
collection was working and so the new one is not going to brake backward
compatibility. Unfortunately backward compatibility is broken by the
new naming schema, more collectd compliant (and necessary with multiple
conf/status files support). So plugin_istance is now the status file
name (or the status entry number), while the plugin_type is now the
hostname when in multicontext mode or the traffic and overhead when in
single.
About the plugin_instance value, I started using numbers like the cpu
plugin does, but I prefer to use the self explanatory file name, helping
in finding the right vpn and avoiding to mess things up when adding a
new status file. The downside is that filenames have to be unique (man
pages should mention this [2]), therefore I added a check. Nonetheless I
think it's very unlikely to happen, it is quite rare to find many vpn on
the same system and it's really hard to have the same log filename
stored in different dirs rather than the opposite; usually to different
tunnels should already correspond different status log name.
However, Florian, feel free to choose the other method if you prefer, I
can send you a patch to revert to the number based schema.
Hope you like the code.
Regards,
Marco
[1] This allows to retrieve multiple informations, not just the pure
compression ratio. For example we can now calculate the pure compression
ratio, the global compression level, the byte saved (eg. for a
overhead vs. saved bytes graph) and so on.
[2] Man pages should be updated as well, but I haven't written anything yet.
Hi all,
I have some news regarding the Openvpn plugin.
I recently upgraded to 4.7.2 and enabled the new (to me) openvpn plugin,
but unfortunately it didn't work and I couldn't understand why. So had a
look at the code and applied some changes. Here a list of things
added:
- support for multiple vpn/status files
- support for single endpoint status file and for multicontext version
1,3 (currently every status file type is supported)
- status file type auto-detection
- collection of overhead and compression stats for single mode status files
- "NoCompression" option to disable compression statistics collection
- new file naming schema correcting the previous wrong one
- debug and error output
The plugin has already been tested with my own openvpn setup and many
different files found on the net, but two major aspects have to be taken
into consideration. The first one is the new overhead collection and the
change in the compression statistics (now data is stored as they are
[1]). However, due to a bug in the previous code, no compression
collection was working and so the new one is not going to brake backward
compatibility. Unfortunately backward compatibility is broken by the
new naming schema, more collectd compliant (and necessary with multiple
conf/status files support). So plugin_istance is now the status file
name (or the status entry number), while the plugin_type is now the
hostname when in multicontext mode or the traffic and overhead when in
single.
About the plugin_instance value, I started using numbers like the cpu
plugin does, but I prefer to use the self explanatory file name, helping
in finding the right vpn and avoiding to mess things up when adding a
new status file. The downside is that filenames have to be unique (man
pages should mention this [2]), therefore I added a check. Nonetheless I
think it's very unlikely to happen, it is quite rare to find many vpn on
the same system and it's really hard to have the same log filename
stored in different dirs rather than the opposite; usually to different
tunnels should already correspond different status log name.
However, Florian, feel free to choose the other method if you prefer, I
can send you a patch to revert to the number based schema.
Hope you like the code.
Regards,
Marco
[1] This allows to retrieve multiple informations, not just the pure
compression ratio. For example we can now calculate the pure compression
ratio, the global compression level, the byte saved (eg. for a
overhead vs. saved bytes graph) and so on.
[2] Man pages should be updated as well, but I haven't written anything yet.
Finished inline documentation.
Fix the filename in the head comment.
collectd.conf(5): Add section about the "routeros" plugin.
routeros plugin: Make connection parameters configurable.
And add support for multiple routers using the complex read function.
And add support for multiple routers using the complex read function.
routeros plugin: Add registration table statistics.
routeros plugin: Added first version of a plugin for MikroTik's RouterOS.
Added notification support.
Various plugins: Remove trailing whitespaces.
Split the Values class into PluginData and Values to use PluginData as a baseclass for Notification later.
Also wrote some documentation.
Also wrote some documentation.
Added proper doc strings to the Config class.
Added unregister functions for all callbacks.
Also removed useless plugin_unregister_complex_read declaration.
Also removed useless plugin_unregister_complex_read declaration.
Added flush and register_flush functions.
Also changed name generation.
Also changed name generation.
Merge branch 'collectd-4.8'
snmp plugin: Rename a variable (missed during merge).
Proper exception logging.
Merge branch 'collectd-4.8'
Merge branch 'collectd-4.7' into collectd-4.8
Conflicts:
src/snmp.c
Conflicts:
src/snmp.c
Added a config option to start collectd as an interactive python shell.
contrib/snmp-data.conf: Add support for Mikrotik RouterBoards.
snmp plugin: Fix handling of strings with control characters.
If a byte of a string has a value <32, the string is printed as a
hex-string. This fixes issues with some devices returning MAC addresses
as "strings".
If a byte of a string has a value <32, the string is printed as a
hex-string. This fixes issues with some devices returning MAC addresses
as "strings".
snmp plugin: Fix handling of negative values.
No need to check for NULL if you're gonna pass NULL anyway.
Meh, forgot to pass the userdata back on write callbacks.
Added read callback. And "read" in this case means "plugin_register_complex_read".
Added write callbacks.
Better workaround for global plugin loading.
src/Makefile: Support parallel builds when creating the manpages.
A temporary file name is used when creating the manpages. So far, a static
file name had been used for that, thus causing race conditions. Now, a unique
suffix (PID) is used to fix that.
Thanks to BC^bd for reporting that on IRC!
A temporary file name is used when creating the manpages. So far, a static
file name had been used for that, thus causing race conditions. Now, a unique
suffix (PID) is used to fix that.
Thanks to BC^bd for reporting that on IRC!
rrdcached plugin: Work around a bug in RRDtool 1.4rc2.
rrd_client.h in that pre-release checked for HAVE_CONFIG_H and would then try
to include rrd_config.h, which, obviously, is not available in collectd.
rrd_client.h in that pre-release checked for HAVE_CONFIG_H and would then try
to include rrd_config.h, which, obviously, is not available in collectd.
GenericJMX plugin: Close and re-open the connection upon I/O-errors.
Added new python class "Values". Only "dispatch" is implemented right now.
kern.cp_times needs array of length kern.smp.maxcpus
surpress gcc warnings on FreeBSD
cc1: warnings being treated as errors
processes.c: In function 'ps_read':
processes.c:343: warning: 'pse.io_rchar' is used uninitialized in this function
processes.c:1436: note: 'pse.io_rchar' was declared here
processes.c:344: warning: 'pse.io_wchar' is used uninitialized in this function
processes.c:1436: note: 'pse.io_wchar' was declared here
processes.c:345: warning: 'pse.io_syscr' is used uninitialized in this function
processes.c:1436: note: 'pse.io_syscr' was declared here
processes.c:346: warning: 'pse.io_syscw' is used uninitialized in this function
processes.c:1436: note: 'pse.io_syscw' was declared here
cc1: warnings being treated as errors
processes.c: In function 'ps_read':
processes.c:343: warning: 'pse.io_rchar' is used uninitialized in this function
processes.c:1436: note: 'pse.io_rchar' was declared here
processes.c:344: warning: 'pse.io_wchar' is used uninitialized in this function
processes.c:1436: note: 'pse.io_wchar' was declared here
processes.c:345: warning: 'pse.io_syscr' is used uninitialized in this function
processes.c:1436: note: 'pse.io_syscr' was declared here
processes.c:346: warning: 'pse.io_syscw' is used uninitialized in this function
processes.c:1436: note: 'pse.io_syscw' was declared here
Split python module. Added support for cyclic GC runs.
Merge branch 'collectd-4.8'
Merge branch 'collectd-4.7' into collectd-4.8
Conflicts:
.gitignore
Conflicts:
.gitignore
contrib/collectd_unixsock.py: Support all plain text protocol commands
Also rename class from Collect to Collectd and improve output when run
as standalone script.
Also rename class from Collect to Collectd and improve output when run
as standalone script.
contrib/collectd_unixsock.py: Follow Python PEP-8 syntax requirements.
Also remove comment which seems to refer to a file outside of the
collectd project.
Also remove comment which seems to refer to a file outside of the
collectd project.
gitignore: Ignore compiled python files
Replace dashes with underscores in python modules
It's not possible to import python modules with dashes in the name.
See http://bit.ly/2t7fcy for more information.
It's not possible to import python modules with dashes in the name.
See http://bit.ly/2t7fcy for more information.
Ignore more java bindings classes
processes plugin: Rename the new types and use DERIVE data sources.
This is probably a much safer choice in this case.
This is probably a much safer choice in this case.
processes plugin: Make “ps_read_io” static.
processes plugin: Add collection of IO-metrics.
I attach a patch for collectd-4.8.0 adding a new feature which read IO
data for a process using /proc/<pid>/io (only works on linux > 2.6.20),
it's very usefull to monitoring disk throughput and what process is
related with high disk IO. I'm using this patchs for days in some
database environments with good results, but I think that is not enough
stable yet (more testing is required). The patch read from
/proc/<pid>/io (where available) the data for syscr and syscw (read and
write operations) and rchar and wchar (read and write bytes).
I attach a patch for collectd-4.8.0 adding a new feature which read IO
data for a process using /proc/<pid>/io (only works on linux > 2.6.20),
it's very usefull to monitoring disk throughput and what process is
related with high disk IO. I'm using this patchs for days in some
database environments with good results, but I think that is not enough
stable yet (more testing is required). The patch read from
/proc/<pid>/io (where available) the data for syscr and syscw (read and
write operations) and rchar and wchar (read and write bytes).
Merge branch 'collectd-4.8'
Merge branch 'collectd-4.7' into collectd-4.8
Added a workaround to module loading to allow Python scripts to do imports.
Redid the python thread handling.
Added log callback.
Redid the python thread handling.
Added log callback.
configure.in: Fix auxiliary NetApp libraries.
gmond plugin: Fixed a typo.
For some reason, the value_t members "derive" and "absolute" had been spelled
in all capital letters, obviously resulting in a build error.
For some reason, the value_t members "derive" and "absolute" had been spelled
in all capital letters, obviously resulting in a build error.
collectd.conf: Added the "madwifi" and "match_empty_counter" plugins.
Fixed a bug with newer NetApp Versions.
NetApp OnTAP API 7.3 and newer actually read this field and
expect the value "counter".
NetApp OnTAP API 7.3 and newer actually read this field and
expect the value "counter".
Added logging.
Added shutdown callback.
Also fixed a refcount bug.
Also fixed a refcount bug.
README: Added missing prerequisites.
Added init callbacks with full threading support.
Added keyword support for register_config.
Added python plugin.
It adds a "collectd" module to the embedded python interpreter
which contains a "register_config" method to register config
callbacks and "Config" class which contains a config item.
It adds a "collectd" module to the embedded python interpreter
which contains a "register_config" method to register config
callbacks and "Config" class which contains a config item.
network plugin: Implement statistics collection about the plugin itself.
configure.in: Don't use “find -L”.
Apparently the “-L” is a (new) GNU extension. :/
Apparently the “-L” is a (new) GNU extension. :/