Andreas Henriksson <andreas at fatal.se>
- libmnl support in the netlink plugin.
+ Andrew Bays <abays at redhat.com>
+ - sysevent plugin.
+
Andy Parkins <andyp at fussylogic.co.uk>
- battery plugin: sysfs code.
Julien Ammous <j.ammous at gmail.com>
- Lua plugin.
+Shirly Radco <sradco at redhat.com>
+ - write_syslog plugin.
+
Kevin Bowling <kbowling at llnw.com>
- write_tsdb plugin for http://opentsdb.net/
src/daemon/filter_chain.h \
src/daemon/globals.c \
src/daemon/globals.h \
- src/daemon/meta_data.c \
- src/daemon/meta_data.h \
+ src/utils/metadata/meta_data.c \
+ src/utils/metadata/meta_data.h \
src/daemon/plugin.c \
src/daemon/plugin.h \
src/daemon/utils_cache.c \
else
collectd_SOURCES += src/daemon/cmd.c
endif
-
+
if BUILD_FEATURE_DAEMON
collectd_CPPFLAGS += -DPIDFILE='"${localstatedir}/run/${PACKAGE_NAME}.pid"'
endif
test_common_SOURCES = \
- src/daemon/common_test.c \
+ src/utils/common/common_test.c \
src/testing.h
test_common_LDADD = libplugin_mock.la
test_meta_data_SOURCES = \
- src/daemon/meta_data_test.c \
+ src/utils/metadata/meta_data_test.c \
src/testing.h
test_meta_data_LDADD = libmetadata.la libplugin_mock.la
test_utils_avltree_SOURCES = \
- src/daemon/utils_avltree_test.c \
+ src/utils/avltree/avltree_test.c \
src/testing.h
test_utils_avltree_LDADD = libavltree.la $(COMMON_LIBS)
test_utils_heap_SOURCES = \
- src/daemon/utils_heap_test.c \
+ src/utils/heap/heap_test.c \
src/testing.h
test_utils_heap_LDADD = libheap.la $(COMMON_LIBS)
test_utils_subst_LDADD = libplugin_mock.la
test_utils_config_cores_SOURCES = \
- src/utils_config_cores_test.c \
+ src/utils/config_cores/config_cores_test.c \
src/testing.h
test_utils_config_cores_LDADD = libplugin_mock.la
libavltree_la_SOURCES = \
- src/daemon/utils_avltree.c \
- src/daemon/utils_avltree.h
+ src/utils/avltree/avltree.c \
+ src/utils/avltree/avltree.h
libcommon_la_SOURCES = \
- src/daemon/common.c \
- src/daemon/common.h
+ src/utils/common/common.c \
+ src/utils/common/common.h
libcommon_la_LIBADD = $(COMMON_LIBS)
libheap_la_SOURCES = \
- src/daemon/utils_heap.c \
- src/daemon/utils_heap.h
+ src/utils/heap/heap.c \
+ src/utils/heap/heap.h
libignorelist_la_SOURCES = \
- src/utils_ignorelist.c \
- src/utils_ignorelist.h
+ src/utils/ignorelist/ignorelist.c \
+ src/utils/ignorelist/ignorelist.h
libmetadata_la_SOURCES = \
- src/daemon/meta_data.c \
- src/daemon/meta_data.h
+ src/utils/metadata/meta_data.c \
+ src/utils/metadata/meta_data.h
libplugin_mock_la_SOURCES = \
src/daemon/plugin_mock.c \
libplugin_mock_la_LIBADD = libcommon.la libignorelist.la $(COMMON_LIBS)
libformat_graphite_la_SOURCES = \
- src/utils_format_graphite.c \
- src/utils_format_graphite.h
+ src/utils/format_graphite/format_graphite.c \
+ src/utils/format_graphite/format_graphite.h
test_format_graphite_SOURCES = \
- src/utils_format_graphite_test.c \
+ src/utils/format_graphite/format_graphite_test.c \
src/testing.h
test_format_graphite_LDADD = \
libformat_graphite.la \
-lm
libformat_json_la_SOURCES = \
- src/utils_format_json.c \
- src/utils_format_json.h
+ src/utils/format_json/format_json.c \
+ src/utils/format_json/format_json.h
libformat_json_la_CPPFLAGS = $(AM_CPPFLAGS)
libformat_json_la_LDFLAGS = $(AM_LDFLAGS)
libformat_json_la_LIBADD =
check_PROGRAMS += test_format_json
test_format_json_SOURCES = \
- src/utils_format_json_test.c \
+ src/utils/format_json/format_json_test.c \
src/testing.h
test_format_json_LDADD = \
libformat_json.la \
endif
liblatency_la_SOURCES = \
- src/utils_latency.c \
- src/utils_latency.h \
- src/utils_latency_config.c \
- src/utils_latency_config.h
+ src/utils/latency/latency.c \
+ src/utils/latency/latency.h \
+ src/utils/latency/latency_config.c \
+ src/utils/latency/latency_config.h
liblatency_la_LIBADD = \
libcommon.la \
-lm
test_utils_latency_SOURCES = \
- src/utils_latency_test.c \
+ src/utils/latency/latency_test.c \
src/testing.h
test_utils_latency_LDADD = \
liblatency.la \
-lm
libcmds_la_SOURCES = \
- src/utils_cmds.c \
- src/utils_cmds.h \
- src/utils_cmd_flush.c \
- src/utils_cmd_flush.h \
- src/utils_cmd_getthreshold.c \
- src/utils_cmd_getthreshold.h \
- src/utils_cmd_getval.c \
- src/utils_cmd_getval.h \
- src/utils_cmd_listval.c \
- src/utils_cmd_listval.h \
- src/utils_cmd_putnotif.c \
- src/utils_cmd_putnotif.h \
- src/utils_cmd_putval.c \
- src/utils_cmd_putval.h \
- src/utils_parse_option.c \
- src/utils_parse_option.h
+ src/utils/cmds/cmds.c \
+ src/utils/cmds/cmds.h \
+ src/utils/cmds/flush.c \
+ src/utils/cmds/flush.h \
+ src/utils/cmds/getthreshold.c \
+ src/utils/cmds/getthreshold.h \
+ src/utils/cmds/getval.c \
+ src/utils/cmds/getval.h \
+ src/utils/cmds/listval.c \
+ src/utils/cmds/listval.h \
+ src/utils/cmds/putnotif.c \
+ src/utils/cmds/putnotif.h \
+ src/utils/cmds/putval.c \
+ src/utils/cmds/putval.h \
+ src/utils/cmds/parse_option.c \
+ src/utils/cmds/parse_option.h
libcmds_la_LIBADD = \
libcommon.la \
libmetadata.la \
-lm
test_utils_cmds_SOURCES = \
- src/utils_cmds_test.c \
+ src/utils/cmds/cmds_test.c \
src/testing.h
test_utils_cmds_LDADD = \
libcmds.la \
libplugin_mock.la
liblookup_la_SOURCES = \
- src/utils_vl_lookup.c \
- src/utils_vl_lookup.h
+ src/utils/lookup/vl_lookup.c \
+ src/utils/lookup/vl_lookup.h
liblookup_la_LIBADD = libavltree.la
test_utils_vl_lookup_SOURCES = \
- src/utils_vl_lookup_test.c \
+ src/utils/lookup/vl_lookup_test.c \
src/testing.h
test_utils_vl_lookup_LDADD = \
liblookup.la \
endif
libmount_la_SOURCES = \
- src/utils_mount.c \
- src/utils_mount.h
+ src/utils/mount/mount.c \
+ src/utils/mount/mount.h
test_utils_mount_SOURCES = \
- src/utils_mount_test.c \
+ src/utils/mount/mount_test.c \
src/testing.h
test_utils_mount_LDADD = \
libmount.la \
if BUILD_WITH_LIBYAJL2
noinst_LTLIBRARIES += liboauth.la
liboauth_la_SOURCES = \
- src/utils_oauth.c \
- src/utils_oauth.h
+ src/utils/oauth/oauth.c \
+ src/utils/oauth/oauth.h
liboauth_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(BUILD_WITH_LIBCURL_CFLAGS) \
check_PROGRAMS += test_utils_oauth
TESTS += test_utils_oauth
test_utils_oauth_SOURCES = \
- src/utils_oauth_test.c
+ src/utils/oauth/oauth_test.c
test_utils_oauth_LDADD = \
liboauth.la \
libcommon.la \
noinst_LTLIBRARIES += libgce.la
libgce_la_SOURCES = \
- src/utils_gce.c \
- src/utils_gce.h
+ src/utils/gce/gce.c \
+ src/utils/gce/gce.h
libgce_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(BUILD_WITH_LIBCURL_CFLAGS)
if BUILD_WITH_LIBYAJL2
noinst_LTLIBRARIES += libformat_stackdriver.la
libformat_stackdriver_la_SOURCES = \
- src/utils_format_stackdriver.c \
- src/utils_format_stackdriver.h
+ src/utils/format_stackdriver/format_stackdriver.c \
+ src/utils/format_stackdriver/format_stackdriver.h
libformat_stackdriver_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(BUILD_WITH_LIBYAJL_CPPFLAGS)
check_PROGRAMS += test_format_stackdriver
TESTS += test_format_stackdriver
test_format_stackdriver_SOURCES = \
- src/utils_format_stackdriver_test.c \
+ src/utils/format_stackdriver/format_stackdriver_test.c \
src/testing.h
test_format_stackdriver_LDADD = \
libformat_stackdriver.la \
pkglib_LTLIBRARIES += aggregation.la
aggregation_la_SOURCES = \
src/aggregation.c \
- src/utils_vl_lookup.c \
- src/utils_vl_lookup.h
+ src/utils/lookup/vl_lookup.c \
+ src/utils/lookup/vl_lookup.h
aggregation_la_LDFLAGS = $(PLUGIN_LDFLAGS)
aggregation_la_LIBADD = -lm
endif
pkglib_LTLIBRARIES += amqp1.la
amqp1_la_SOURCES = \
src/amqp1.c \
- src/utils_deq.h
+ src/utils/deq/deq.h
amqp1_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBQPIDPROTON_CPPFLAGS)
amqp1_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBQPIDPROTON_LDFLAGS)
amqp1_la_LIBADD = \
pkglib_LTLIBRARIES += curl.la
curl_la_SOURCES = \
src/curl.c \
- src/utils_curl_stats.c \
- src/utils_curl_stats.h \
- src/utils_match.c \
- src/utils_match.h
+ src/utils/curl_stats/curl_stats.c \
+ src/utils/curl_stats/curl_stats.h \
+ src/utils/match/match.c \
+ src/utils/match/match.h
curl_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
curl_la_LDFLAGS = $(PLUGIN_LDFLAGS)
curl_la_LIBADD = liblatency.la $(BUILD_WITH_LIBCURL_LIBS)
pkglib_LTLIBRARIES += curl_json.la
curl_json_la_SOURCES = \
src/curl_json.c \
- src/utils_curl_stats.c \
- src/utils_curl_stats.h
+ src/utils/curl_stats/curl_stats.c \
+ src/utils/curl_stats/curl_stats.h
curl_json_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
curl_json_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
curl_json_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
curl_json_la_LIBADD = $(BUILD_WITH_LIBCURL_LIBS) $(BUILD_WITH_LIBYAJL_LIBS)
test_plugin_curl_json_SOURCES = src/curl_json_test.c \
- src/utils_curl_stats.c \
+ src/utils/curl_stats/curl_stats.c \
src/daemon/configfile.c \
src/daemon/types_list.c
test_plugin_curl_json_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
pkglib_LTLIBRARIES += curl_xml.la
curl_xml_la_SOURCES = \
src/curl_xml.c \
- src/utils_curl_stats.c \
- src/utils_curl_stats.h
+ src/utils/curl_stats/curl_stats.c \
+ src/utils/curl_stats/curl_stats.h
curl_xml_la_CFLAGS = $(AM_CFLAGS) \
$(BUILD_WITH_LIBCURL_CFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
curl_xml_la_LDFLAGS = $(PLUGIN_LDFLAGS)
pkglib_LTLIBRARIES += dbi.la
dbi_la_SOURCES = \
src/dbi.c \
- src/utils_db_query.c \
- src/utils_db_query.h
+ src/utils/db_query/db_query.c \
+ src/utils/db_query/db_query.h
dbi_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBDBI_CPPFLAGS)
dbi_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBDBI_LDFLAGS)
dbi_la_LIBADD = $(BUILD_WITH_LIBDBI_LIBS)
pkglib_LTLIBRARIES += dns.la
dns_la_SOURCES = \
src/dns.c \
- src/utils_dns.c \
- src/utils_dns.h
+ src/utils/dns/dns.c \
+ src/utils/dns/dns.h
dns_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPCAP_CPPFLAGS)
dns_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBPCAP_LDFLAGS)
dns_la_LIBADD = $(BUILD_WITH_LIBPCAP_LIBS)
if BUILD_PLUGIN_DPDKEVENTS
pkglib_LTLIBRARIES += dpdkevents.la
-dpdkevents_la_SOURCES = src/dpdkevents.c src/utils_dpdk.c src/utils_dpdk.h
+dpdkevents_la_SOURCES = src/dpdkevents.c src/utils/dpdk/dpdk.c src/utils/dpdk/dpdk.h
dpdkevents_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDPDK_CPPFLAGS)
dpdkevents_la_CFLAGS = $(AM_CFLAGS) $(LIBDPDK_CFLAGS)
dpdkevents_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBDPDK_LDFLAGS)
if BUILD_PLUGIN_DPDKSTAT
pkglib_LTLIBRARIES += dpdkstat.la
-dpdkstat_la_SOURCES = src/dpdkstat.c src/utils_dpdk.c src/utils_dpdk.h
+dpdkstat_la_SOURCES = src/dpdkstat.c src/utils/dpdk/dpdk.c src/utils/dpdk/dpdk.h
dpdkstat_la_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDPDK_CPPFLAGS)
dpdkstat_la_CFLAGS = $(AM_CFLAGS) $(LIBDPDK_CFLAGS)
dpdkstat_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(LIBDPDK_LDFLAGS)
if BUILD_PLUGIN_GPU_NVIDIA
pkglib_LTLIBRARIES += gpu_nvidia.la
gpu_nvidia_la_SOURCES = src/gpu_nvidia.c
+gpu_nvidia_la_CPPFLAGS = $(PLUGIN_CPPFLAGS) $(BUILD_WITH_GPU_CUDA_CPPFLAGS)
gpu_nvidia_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_GPU_CUDA_LDFLAGS)
gpu_nvidia_la_LIBADD = $(BUILD_WITH_CUDA_LIBS)
endif
pkglib_LTLIBRARIES += intel_pmu.la
intel_pmu_la_SOURCES = \
src/intel_pmu.c \
- src/utils_config_cores.h \
- src/utils_config_cores.c
+ src/utils/config_cores/config_cores.h \
+ src/utils/config_cores/config_cores.c
intel_pmu_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBJEVENTS_CPPFLAGS)
intel_pmu_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBJEVENTS_LDFLAGS)
intel_pmu_la_LIBADD = $(BUILD_WITH_LIBJEVENTS_LIBS)
pkglib_LTLIBRARIES += intel_rdt.la
intel_rdt_la_SOURCES = \
src/intel_rdt.c \
- src/utils_config_cores.h \
- src/utils_config_cores.c
+ src/utils/proc_pids/proc_pids.c \
+ src/utils/proc_pids/proc_pids.h \
+ src/utils/config_cores/config_cores.h \
+ src/utils/config_cores/config_cores.c
intel_rdt_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBPQOS_CPPFLAGS)
intel_rdt_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBPQOS_LDFLAGS)
intel_rdt_la_LIBADD = $(BUILD_WITH_LIBPQOS_LIBS)
+
+test_plugin_intel_rdt_SOURCES = \
+ src/intel_rdt_test.c \
+ src/utils/config_cores/config_cores.c \
+ src/utils/proc_pids/proc_pids.c \
+ src/daemon/configfile.c \
+ src/daemon/types_list.c
+test_plugin_intel_rdt_CPPFLAGS = $(AM_CPPFLAGS)
+test_plugin_intel_rdt_LDFLAGS = $(PLUGIN_LDFLAGS)
+test_plugin_intel_rdt_LDADD = liboconfig.la libplugin_mock.la
+check_PROGRAMS += test_plugin_intel_rdt
+TESTS += test_plugin_intel_rdt
+
+test_utils_proc_pids_SOURCES = \
+ src/utils/proc_pids/proc_pids_test.c \
+ src/testing.h
+test_utils_proc_pids_LDADD = libplugin_mock.la
+check_PROGRAMS += test_utils_proc_pids
+TESTS += test_utils_proc_pids
endif
if BUILD_PLUGIN_INTERFACE
pkglib_LTLIBRARIES += memcachec.la
memcachec_la_SOURCES = \
src/memcachec.c \
- src/utils_match.c \
- src/utils_match.h
+ src/utils/match/match.c \
+ src/utils/match/match.h
memcachec_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
memcachec_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
memcachec_la_LIBADD = liblatency.la $(BUILD_WITH_LIBMEMCACHED_LIBS)
network_la_LDFLAGS += $(GCRYPT_LDFLAGS)
network_la_LIBADD += $(GCRYPT_LIBS)
endif
+
+test_plugin_network_SOURCES = \
+ src/network_test.c \
+ src/utils_fbhash.c \
+ src/daemon/configfile.c \
+ src/daemon/types_list.c
+test_plugin_network_CPPFLAGS = $(AM_CPPFLAGS) $(GCRYPT_CPPFLAGS)
+test_plugin_network_LDFLAGS = $(PLUGIN_LDFLAGS) $(GCRYPT_LDFLAGS)
+test_plugin_network_LDADD = \
+ libavltree.la \
+ liboconfig.la \
+ libplugin_mock.la \
+ libmetadata.la \
+ $(GCRYPT_LIBS)
+check_PROGRAMS += test_plugin_network
endif
if BUILD_PLUGIN_NFS
pkglib_LTLIBRARIES += oracle.la
oracle_la_SOURCES = \
src/oracle.c \
- src/utils_db_query.c \
- src/utils_db_query.h
+ src/utils/db_query/db_query.c \
+ src/utils/db_query/db_query.h
oracle_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_ORACLE_CPPFLAGS)
oracle_la_LIBADD = $(BUILD_WITH_ORACLE_LIBS)
oracle_la_LDFLAGS = $(PLUGIN_LDFLAGS)
pkglib_LTLIBRARIES += ovs_events.la
ovs_events_la_SOURCES = \
src/ovs_events.c \
- src/utils_ovs.c \
- src/utils_ovs.h
+ src/utils/ovs/ovs.c \
+ src/utils/ovs/ovs.h
ovs_events_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
ovs_events_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
ovs_events_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
pkglib_LTLIBRARIES += ovs_stats.la
ovs_stats_la_SOURCES = \
src/ovs_stats.c \
- src/utils_ovs.c \
- src/utils_ovs.h
+ src/utils/ovs/ovs.c \
+ src/utils/ovs/ovs.h
ovs_stats_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
ovs_stats_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
ovs_stats_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS)
pkglib_LTLIBRARIES += postgresql.la
postgresql_la_SOURCES = \
src/postgresql.c \
- src/utils_db_query.c \
- src/utils_db_query.h
+ src/utils/db_query/db_query.c \
+ src/utils/db_query/db_query.h
postgresql_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBPQ_CPPFLAGS)
postgresql_la_LDFLAGS = $(PLUGIN_LDFLAGS) \
$(BUILD_WITH_LIBPQ_LDFLAGS)
if HAVE_LIBMNL
noinst_LTLIBRARIES += libtaskstats.la
libtaskstats_la_SOURCES = \
- src/utils_taskstats.c \
- src/utils_taskstats.h
+ src/utils/taskstats/taskstats.c \
+ src/utils/taskstats/taskstats.h
libtaskstats_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS)
libtaskstats_la_LIBADD = $(BUILD_WITH_LIBMNL_LIBS)
endif
pkglib_LTLIBRARIES += rrdcached.la
rrdcached_la_SOURCES = \
src/rrdcached.c \
- src/utils_rrdcreate.c \
- src/utils_rrdcreate.h
+ src/utils/rrdcreate/rrdcreate.c \
+ src/utils/rrdcreate/rrdcreate.h
rrdcached_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
rrdcached_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRRD_LDFLAGS)
rrdcached_la_LIBADD = $(BUILD_WITH_LIBRRD_LIBS)
pkglib_LTLIBRARIES += rrdtool.la
rrdtool_la_SOURCES = \
src/rrdtool.c \
- src/utils_rrdcreate.c \
- src/utils_rrdcreate.h
+ src/utils/rrdcreate/rrdcreate.c \
+ src/utils/rrdcreate/rrdcreate.h
rrdtool_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBRRD_CFLAGS)
rrdtool_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBRRD_LDFLAGS)
rrdtool_la_LIBADD = $(BUILD_WITH_LIBRRD_LIBS)
snmp_agent_la_LIBADD = $(BUILD_WITH_LIBNETSNMPAGENT_LIBS)
test_plugin_snmp_agent_SOURCES = src/snmp_agent_test.c \
- src/daemon/utils_avltree.c \
+ src/utils/avltree/avltree.c \
src/daemon/utils_llist.c \
src/daemon/configfile.c \
src/daemon/types_list.c
synproxy_la_LDFLAGS = $(PLUGIN_LDFLAGS)
endif
+ if BUILD_PLUGIN_SYSEVENT
+ pkglib_LTLIBRARIES += sysevent.la
+ sysevent_la_SOURCES = src/sysevent.c
+ sysevent_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS)
+ sysevent_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS)
+ sysevent_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS) libignorelist.la
+ endif
+
if BUILD_PLUGIN_SYSLOG
pkglib_LTLIBRARIES += syslog.la
syslog_la_SOURCES = src/syslog.c
pkglib_LTLIBRARIES += tail.la
tail_la_SOURCES = \
src/tail.c \
- src/utils_match.c \
- src/utils_match.h \
- src/utils_tail.c \
- src/utils_tail.h \
+ src/utils/match/match.c \
+ src/utils/match/match.h \
+ src/utils/tail/tail.c \
+ src/utils/tail/tail.h \
src/utils_tail_match.c \
src/utils_tail_match.h
tail_la_LDFLAGS = $(PLUGIN_LDFLAGS)
pkglib_LTLIBRARIES += tail_csv.la
tail_csv_la_SOURCES = \
src/tail_csv.c \
- src/utils_tail.c \
- src/utils_tail.h
+ src/utils/tail/tail.c \
+ src/utils/tail/tail.h
tail_csv_la_LDFLAGS = $(PLUGIN_LDFLAGS)
endif
virt_la_LDFLAGS = $(PLUGIN_LDFLAGS)
virt_la_LIBADD = libignorelist.la $(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
-test_plugin_virt_SOURCES = src/virt_test.c
+test_plugin_virt_SOURCES = src/virt_test.c src/daemon/configfile.c \
+ src/daemon/types_list.c
test_plugin_virt_CPPFLAGS = $(AM_CPPFLAGS) \
$(BUILD_WITH_LIBVIRT_CPPFLAGS) $(BUILD_WITH_LIBXML2_CFLAGS)
test_plugin_virt_LDFLAGS = $(PLUGIN_LDFLAGS) \
$(BUILD_WITH_LIBVIRT_LDFLAGS) $(BUILD_WITH_LIBXML2_LDFLAGS)
-test_plugin_virt_LDADD = libplugin_mock.la \
+test_plugin_virt_LDADD = liboconfig.la libplugin_mock.la \
$(BUILD_WITH_LIBVIRT_LIBS) $(BUILD_WITH_LIBXML2_LIBS)
check_PROGRAMS += test_plugin_virt
TESTS += test_plugin_virt
pkglib_LTLIBRARIES += write_http.la
write_http_la_SOURCES = \
src/write_http.c \
- src/utils_format_kairosdb.c \
- src/utils_format_kairosdb.h
+ src/utils/format_kairosdb/format_kairosdb.c \
+ src/utils/format_kairosdb/format_kairosdb.h
write_http_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBCURL_CFLAGS)
write_http_la_LDFLAGS = $(PLUGIN_LDFLAGS)
write_http_la_LIBADD = libformat_json.la $(BUILD_WITH_LIBCURL_LIBS)
write_mongodb_la_SOURCES = src/write_mongodb.c
write_mongodb_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMONGOC_CFLAGS)
write_mongodb_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBMONGOC_LDFLAGS)
+write_mongodb_la_LIBADD = $(BUILD_WITH_LIBMONGOC_LIBS)
endif
if BUILD_PLUGIN_WRITE_PROMETHEUS
$(BUILD_WITH_LIBCURL_LIBS)
endif
+if BUILD_PLUGIN_WRITE_SYSLOG
+pkglib_LTLIBRARIES += write_syslog.la
+write_syslog_la_SOURCES = src/write_syslog.c
+write_syslog_la_LDFLAGS = $(PLUGIN_LDFLAGS)
+endif
+
if BUILD_PLUGIN_WRITE_TSDB
pkglib_LTLIBRARIES += write_tsdb.la
write_tsdb_la_SOURCES = src/write_tsdb.c
am__v_POD2MAN_C_1 =
.pod.1:
- $(AM_V_POD2MAN_C)pod2man --release=$(VERSION) --center=$(PACKAGE) $< \
- >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
- @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
- then \
- echo "$@ has some POD errors!"; false; \
- fi
+ $(AM_V_POD2MAN_C)pod2man --release=$(VERSION) --center=$(PACKAGE) $< $@
.pod.5:
- $(AM_V_POD2MAN_C)pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< \
- >.pod2man.tmp.$$$$ 2>/dev/null && mv -f .pod2man.tmp.$$$$ $@ || true
- @if grep '\<POD ERRORS\>' $@ >/dev/null 2>&1; \
- then \
- echo "$@ has some POD errors!"; false; \
- fi
+ $(AM_V_POD2MAN_C)pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< $@
V_PROTOC = $(v_protoc_@AM_V@)
v_protoc_ = $(v_protoc_@AM_DEFAULT_V@)
Acts as a StatsD server, reading values sent over the network from StatsD
clients and calculating rates and other aggregates out of these values.
+ - sysevent
+ Listens to rsyslog events and submits matched values.
+
- swap
Pages swapped out onto hard disk or whatever is called `swap' by the OS..
Sends data to Sensu, a stream processing and monitoring system, via the
Sensu client local TCP socket.
+ - write_syslog
+ Sends data in syslog format, using TCP, where the message
+ contains the metric in human or JSON format.
+
- write_tsdb
Sends data OpenTSDB, a scalable no master, no shared state time series
database.
kstat.h \
kvm.h \
libgen.h \
+ locale.h \
mntent.h \
mnttab.h \
netdb.h \
# }}}
-# For the dns plugin
-AC_CHECK_HEADERS([arpa/nameser.h])
-AC_CHECK_HEADERS([arpa/nameser_compat.h], [], [],
- [[
- #if HAVE_ARPA_NAMESER_H
- # include <arpa/nameser.h>
- #endif
- ]]
-)
-
AC_CHECK_HEADERS([net/if_arp.h], [], [],
[[
#if HAVE_SYS_SOCKET_H
#
AC_CHECK_FUNCS_ONCE([ \
asprintf \
- closelog \
- getaddrinfo \
- getgrnam_r \
- getnameinfo \
getpwnam \
getpwnam_r \
- gettimeofday \
if_indextoname \
- openlog \
- regcomp \
- regerror \
- regexec \
- regfree \
- select \
setenv \
setgroups \
- strcasecmp \
- strdup \
- strncasecmp \
- sysconf
+ setlocale
]
)
AC_FUNC_STRERROR_R
-SAVE_CFLAGS="$CFLAGS"
-CFLAGS="-Wall -Werror"
+if test "x$GCC" = "xyes"; then
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wall -Werror"
+fi
SAVE_LDFLAGS="$LDFLAGS"
LDFLAGS=""
if test "x$ac_system" = "xWindows"; then
AC_COMPILE_IFELSE(
[
AC_LANG_PROGRAM(
- [[#include "$srcdir/src/utils_mount.h"]],
+ [[#include "$srcdir/src/utils/mount/mount.h"]],
[[
FILE *fh;
struct mntent *me;
AC_COMPILE_IFELSE(
[
AC_LANG_PROGRAM(
- [[#include "$srcdir/src/utils_mount.h"]],
+ [[#include "$srcdir/src/utils/mount/mount.h"]],
[[
FILE *fh;
struct mnttab mt;
fi
# --with-cuda {{{
-# only CUDA provides the nvml.h header
AC_ARG_WITH([cuda],
[AS_HELP_STRING([--with-cuda@<:@=PREFIX@:>@], [Path to cuda.])],
[
- if test "x$withval" = "xyes"; then
+ if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
+ with_cuda_cppflags="-I$withval/include"
+ with_cuda_ldflags="-I$withval/lib"
with_cuda="yes"
- else if test "x$withval" = "xno"; then
- with_cuda="no"
else
- with_cuda="yes"
- CUDA_CFLAGS="$CUDA_CFLAGS -I$withval/include"
- CUDA_LDFLAGS="$CUDA_LDFLAGS -L$withval/lib"
- fi; fi
+ with_cuda="$withval"
+ fi
],
- [ with_cuda="yes"
- CUDA_CFLAGS="$CUDA_CFLAGS -I/opt/cuda/include"
- CUDA_LDFLAGS="$CUDA_LDFLAGS -L/opt/cuda/lib64"
- ]
+ [with_cuda="no"]
)
-SAVE_CFLAGS="$CFLAGS"
-SAVE_LDFLAGS="$LDFLAGS"
-CFLAGS="$CFLAGS $CUDA_CFLAGS"
-LDFLAGS="$LDFLAGS $CUDA_LDFLAGS"
-
if test "x$with_cuda" = "xyes"; then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_cuda_cppflags"
+
AC_CHECK_HEADERS([nvml.h],
[with_cuda="yes"],
- [with_cuda="no (header file missing)"]
+ [with_cuda="no (nvml.h not found)"]
)
-fi
-if test "x$with_cuda" = "xpkgconfig"; then
- AC_CHECK_HEADERS([nvml.h],
- [],
- [with_cuda="no (header file missing)"]
- )
+ CPPFLAGS="$SAVE_CPPFLAGS"
fi
if test "x$with_cuda" = "xyes"; then
- BUILD_WITH_CUDA_CFLAGS="$CUDA_CFLAGS"
+ BUILD_WITH_CUDA_CPPFLAGS="$CUDA_CPPFLAGS"
BUILD_WITH_CUDA_LDFLAGS="$CUDA_LDFLAGS"
BUILD_WITH_CUDA_LIBS="-lnvidia-ml"
fi
-AC_SUBST([BUILD_WITH_CUDA_CFLAGS])
+AC_SUBST([BUILD_WITH_CUDA_CPPFLAGS])
AC_SUBST([BUILD_WITH_CUDA_LDFLAGS])
AC_SUBST([BUILD_WITH_CUDA_LIBS])
LDFLAGS="$LDFLAGS $LIBAQUAERO5_LDFLAGS"
if test "x$with_libaquaero5" = "xyes"; then
- if test "x$LIBAQUAERO5_CFLAGS" != "x"; then
- AC_MSG_NOTICE([libaquaero5 CPPFLAGS: $LIBAQUAERO5_CFLAGS])
- fi
AC_CHECK_HEADERS([libaquaero5.h],
[with_libaquaero5="yes"],
[with_libaquaero5="no (libaquaero5.h not found)"]
fi
if test "x$with_libaquaero5" = "xyes"; then
- if test "x$LIBAQUAERO5_LDFLAGS" != "x"; then
- AC_MSG_NOTICE([libaquaero5 LDFLAGS: $LIBAQUAERO5_LDFLAGS])
- fi
AC_CHECK_LIB([aquaero5], libaquaero5_poll,
[with_libaquaero5="yes"],
[with_libaquaero5="no (symbol 'libaquaero5_poll' not found)"]
LDFLAGS="$LDFLAGS $LIBHIREDIS_LDFLAGS"
if test "x$with_libhiredis" = "xyes"; then
- if test "x$LIBHIREDIS_CPPFLAGS" != "x"; then
- AC_MSG_NOTICE([libhiredis CPPFLAGS: $LIBHIREDIS_CPPFLAGS])
- fi
AC_CHECK_HEADERS([hiredis/hiredis.h],
[with_libhiredis="yes"],
[with_libhiredis="no (hiredis.h not found)"]
fi
if test "x$with_libhiredis" = "xyes"; then
- if test "x$LIBHIREDIS_LDFLAGS" != "x"; then
- AC_MSG_NOTICE([libhiredis LDFLAGS: $LIBHIREDIS_LDFLAGS])
- fi
AC_CHECK_LIB([hiredis], [redisCommand],
[with_libhiredis="yes"],
[with_libhiredis="no (symbol 'redisCommand' not found)"]
fi
if test "x$with_libdpdk" = "xyes"; then
+ SAVE_LIBS="$LIBS"
+ LIBS="$LIBDPDK_LIBS $LIBS"
SAVE_LDFLAGS="$LDFLAGS"
LDFLAGS="$LIBDPDK_LDFLAGS $LDFLAGS"
- AC_CHECK_LIB([dpdk], [rte_eal_init],
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$LIBDPDK_CPPFLAGS $CPPFLAGS"
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$LIBDPDK_CFLAGS $CFLAGS"
+ AC_LINK_IFELSE(
+ [
+ AC_LANG_PROGRAM(
+ [[
+ #include <rte_eal.h>
+ ]],
+ [[return rte_eal_init(0, NULL);]]
+ )
+ ],
[with_libdpdk="yes"],
[with_libdpdk="no (symbol 'rte_eal_init' not found)"]
)
+ LIBS="$SAVE_LIBS"
LDFLAGS="$SAVE_LDFLAGS"
+ CPPFLAGS="$SAVE_CPPFLAGS"
+ CFLAGS="$SAVE_CFLAGS"
fi
# }}}
LIBS="$LIBS $GCRYPT_LIBS"
if test "x$with_libgcrypt" = "xyes"; then
- if test "x$GCRYPT_CPPFLAGS" != "x"; then
- AC_MSG_NOTICE([gcrypt CPPFLAGS: $GCRYPT_CPPFLAGS])
- fi
AC_CHECK_HEADERS([gcrypt.h],
[with_libgcrypt="yes"],
[with_libgcrypt="no (gcrypt.h not found)"]
fi; fi
fi
-if test "x$JAVA_CPPFLAGS" != "x"; then
- AC_MSG_NOTICE([Building with JAVA_CPPFLAGS set to: $JAVA_CPPFLAGS])
-fi
-if test "x$JAVA_CFLAGS" != "x"; then
- AC_MSG_NOTICE([Building with JAVA_CFLAGS set to: $JAVA_CFLAGS])
-fi
-if test "x$JAVA_LDFLAGS" != "x"; then
- AC_MSG_NOTICE([Building with JAVA_LDFLAGS set to: $JAVA_LDFLAGS])
-fi
-if test "x$JAVA_LIBS" != "x"; then
- AC_MSG_NOTICE([Building with JAVA_LIBS set to: $JAVA_LIBS])
-fi
if test "x$JAVAC" = "x"; then
with_javac_path="$PATH"
if test "x$with_java_home" != "x"; then
if test "x$with_java" = "xyes"; then
JAVA_LIBS="$JAVA_LIBS -ljvm"
- AC_MSG_NOTICE([Building with JAVA_LIBS set to: $JAVA_LIBS])
fi
CPPFLAGS="$SAVE_CPPFLAGS"
LDFLAGS="$LDFLAGS $LIBLDAP_LDFLAGS"
if test "x$with_libldap" = "xyes"; then
- if test "x$LIBLDAP_CPPFLAGS" != "x"; then
- AC_MSG_NOTICE([libldap CPPFLAGS: $LIBLDAP_CPPFLAGS])
- fi
-
AC_CHECK_HEADERS([ldap.h],
[with_libldap="yes"],
[with_libldap="no ('ldap.h' not found)"]
fi
if test "x$with_libldap" = "xyes"; then
- if test "x$LIBLDAP_LDFLAGS" != "x"; then
- AC_MSG_NOTICE([libldap LDFLAGS: $LIBLDAP_LDFLAGS])
- fi
-
AC_CHECK_LIB([ldap], [ldap_initialize],
[with_libldap="yes"],
[with_libldap="no (symbol 'ldap_initialize' not found)"]
# configure using pkg-config
if test "x$with_libmodbus" = "xuse_pkgconfig"; then
- AC_MSG_NOTICE([Checking for libmodbus using $PKG_CONFIG])
$PKG_CONFIG --exists 'libmodbus' 2>/dev/null
if test $? -ne 0; then
with_libmodbus="no (pkg-config doesn't know libmodbus)"
CPPFLAGS="$CPPFLAGS $LIBMONGOC_CFLAGS"
- if test "x$CPPFLAGS" != "x"; then
- AC_MSG_NOTICE([libmongoc CPPFLAGS: $LIBMONGOC_CFLAGS])
- fi
-
AC_CHECK_HEADERS([mongoc.h],
[with_libmongoc="yes"],
[with_libmongoc="no ('mongoc.h' not found)"]
CPPFLAGS="$CPPFLAGS $LIBMONGOC_CFLAGS"
LDFLAGS="$LDFLAGS $LIBMONGOC_LDFLAGS"
- if test "x$LIBMONGOC_LDFLAGS" != "x"; then
- AC_MSG_NOTICE([libmongoc LDFLAGS: $LIBMONGOC_LDFLAGS])
- fi
-
AC_CHECK_LIB([mongoc-1.0], [mongoc_init],
[with_libmongoc="yes"],
[with_libmongoc="no (symbol 'mongoc_init' not found)"]
if test "x$with_libmongoc" = "xyes"; then
BUILD_WITH_LIBMONGOC_CFLAGS="$LIBMONGOC_CFLAGS"
BUILD_WITH_LIBMONGOC_LDFLAGS="$LIBMONGOC_LDFLAGS"
+ BUILD_WITH_LIBMONGOC_LIBS="$LIBMONGOC_LIBS"
fi
AC_SUBST([BUILD_WITH_LIBMONGOC_CFLAGS])
AC_SUBST([BUILD_WITH_LIBMONGOC_LDFLAGS])
+AC_SUBST([BUILD_WITH_LIBMONGOC_LIBS])
# }}}
# --with-libmosquitto {{{
LDFLAGS="$LDFLAGS $LIBNETAPP_LDFLAGS"
if test "x$with_libnetapp" = "xyes"; then
- if test "x$LIBNETAPP_CPPFLAGS" != "x"; then
- AC_MSG_NOTICE([netapp CPPFLAGS: $LIBNETAPP_CPPFLAGS])
- fi
AC_CHECK_HEADERS([netapp_api.h],
[with_libnetapp="yes"],
[with_libnetapp="no (netapp_api.h not found)"]
fi
if test "x$with_libnetapp" = "xyes"; then
- if test "x$LIBNETAPP_LDFLAGS" != "x"; then
- AC_MSG_NOTICE([netapp LDFLAGS: $LIBNETAPP_LDFLAGS])
- fi
-
if test "x$LIBNETAPP_LIBS" = "x"; then
LIBNETAPP_LIBS="$PTHREAD_LIBS -lxml -ladt -lssl -lm -lcrypto -lz"
fi
- AC_MSG_NOTICE([netapp LIBS: $LIBNETAPP_LIBS])
-
AC_CHECK_LIB([netapp], [na_server_invoke_elem],
[with_libnetapp="yes"],
[with_libnetapp="no (symbol na_server_invoke_elem not found)"],
SAVE_CPPFLAGS="$CPPFLAGS"
SAVE_LDFLAGS="$LDFLAGS"
SAVE_LIBS="$LIBS"
- CPPFLAGS="$CPPFLAGS $with_libnetsnmp_cppflags -Wall -Werror"
+ CPPFLAGS="$CPPFLAGS $with_libnetsnmp_cppflags"
+ if test "x$GCC" = "xyes"; then
+ CPPFLAGS="$CPPFLAGS -Wall -Werror"
+ fi
LDFLAGS="$LDFLAGS $with_libnetsnmp_ldflags"
LIBS="$LIBS -lnetsnmp"
)
AC_CHECK_LIB([netsnmpagent], [init_agent],
- [with_libnetsnmpagent="yes"],
+ [
+ # libnetsnmp can be built without mib loading support
+ AC_CHECK_LIB([netsnmp], [get_tree],
+ [with_libnetsnmpagent="yes"],
+ [with_libnetsnmpagent="no (libnetsnmp doesn't support mib loading)"]
+ )
+ ],
[with_libnetsnmpagent="no (libnetsnmpagent not found)"],
[$libnetsnmphelpers]
)
fi
if test "x$with_libnetsnmpagent" = "xyes"; then
+ BUILD_WITH_LIBNETSNMPAGENT_CPPFLAGS="$with_libnetsnmpagent_cppflags"
+ BUILD_WITH_LIBNETSNMPAGENT_LDFLAGS="$with_libnetsnmpagent_ldflags"
BUILD_WITH_LIBNETSNMPAGENT_LIBS="-lnetsnmpagent $libnetsnmphelpers"
fi
# (see issues #41 and #42)
SAVE_CFLAGS="$CFLAGS"
SAVE_LIBS="$LIBS"
- CFLAGS="$CFLAGS $PERL_CFLAGS -Wall -Werror"
+ CFLAGS="$CFLAGS $PERL_CFLAGS"
+ if test "x$GCC" = "xyes"; then
+ CFLAGS="$CFLAGS -Wall -Werror"
+ fi
LIBS="$LIBS $PERL_LIBS"
AC_CACHE_CHECK([for broken Perl_load_module()],
if test $? -ne 0; then
with_libpython="no"
fi
- LIBPYTHON_LIBS="`${PYTHON_CONFIG} --libs`"
+ LIBPYTHON_LIBS="`${PYTHON_CONFIG} --libs --embed`" || LIBPYTHON_LIBS="`${PYTHON_CONFIG} --libs`"
if test $? -ne 0; then
with_libpython="no"
fi
fi
if test "x$with_libsensors" = "xyes"; then
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $with_sensors_cppflags"
+ AC_PREPROC_IFELSE(
+ [
+ AC_LANG_SOURCE(
+ [[
+ #include <sensors/sensors.h>
+ #if SENSORS_API_VERSION < 0x400
+ #error "required libsensors version >= 3.0"
+ #endif
+ ]]
+ )
+ ],
+ [with_libsensors="yes"],
+ [with_libsensors="no (sensors library version 3.0.0 or higher is required)"]
+ )
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
+fi
+
+if test "x$with_libsensors" = "xyes"; then
BUILD_WITH_LIBSENSORS_CPPFLAGS="$with_sensors_cppflags"
BUILD_WITH_LIBSENSORS_LDFLAGS="$with_sensors_ldflags"
BUILD_WITH_LIBSENSORS_LIBS="-lsensors"
# configure using pkg-config
if test "x$with_libupsclient" = "xuse_pkgconfig"; then
- AC_MSG_NOTICE([Checking for libupsclient using $PKG_CONFIG])
$PKG_CONFIG --exists 'libupsclient' 2>/dev/null
if test $? -ne 0; then
with_libupsclient="no (pkg-config doesn't know libupsclient)"
fi
if test "x$with_libxmms" = "xyes"; then
- SAVE_CPPFLAGS="$CFLAGS"
+ SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$with_xmms_cflags"
AC_CHECK_HEADER([xmmsctrl.h],
plugin_smart="no"
plugin_swap="no"
plugin_synproxy="no"
+ plugin_sysevent="no"
plugin_tape="no"
plugin_tcpconns="no"
plugin_ted="no"
# FreeBSD
if test "x$ac_system" = "xFreeBSD"; then
+ plugin_cpufreq="yes"
plugin_disk="yes"
plugin_zfs_arc="yes"
fi
if test "x$with_libyajl" = "xyes"; then
plugin_ceph="yes"
+ plugin_sysevent="yes"
fi
if test "x$have_processor_info" = "xyes"; then
plugin_df="yes"
fi
-if test "x$c_cv_have_getmntent_r" = "xyes"; then
+if test "x$have_getmntent_r" = "xyes"; then
plugin_df="yes"
fi
AC_PLUGIN([statsd], [yes], [StatsD plugin])
AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
AC_PLUGIN([synproxy], [$plugin_synproxy], [Synproxy stats plugin])
+ AC_PLUGIN([sysevent], [$plugin_sysevent], [rsyslog events])
AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
AC_PLUGIN([table], [yes], [Parsing of tabular data])
AC_PLUGIN([tail], [yes], [Parsing of logfiles])
AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
AC_PLUGIN([write_graphite], [yes], [Graphite / Carbon output plugin])
AC_PLUGIN([write_http], [$with_libcurl], [HTTP output plugin])
-AC_PLUGIN([write_stackdriver], [$plugin_write_stackdriver], [Google Stackdriver Monitoring output plugin])
AC_PLUGIN([write_kafka], [$with_librdkafka], [Kafka output plugin])
AC_PLUGIN([write_log], [yes], [Log output plugin])
AC_PLUGIN([write_mongodb], [$with_libmongoc], [MongoDB output plugin])
AC_PLUGIN([write_redis], [$with_libhiredis], [Redis output plugin])
AC_PLUGIN([write_riemann], [$with_libriemann_client], [Riemann output plugin])
AC_PLUGIN([write_sensu], [yes], [Sensu output plugin])
+AC_PLUGIN([write_stackdriver], [$plugin_write_stackdriver], [Google Stackdriver Monitoring output plugin])
+AC_PLUGIN([write_syslog], [yes], [Syslog output plugin])
AC_PLUGIN([write_tsdb], [yes], [TSDB output plugin])
AC_PLUGIN([xencpu], [$plugin_xencpu], [Xen Host CPU usage])
AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics])
AC_CONFIG_FILES([src/libcollectdclient/collectd/lcc_features.h])
-AM_CFLAGS="-Wall"
-AM_CXXFLAGS="-Wall"
-if test "x$enable_werror" != "xno"; then
- AM_CFLAGS="$AM_CFLAGS -Werror"
- AM_CXXFLAGS="$AM_CXXFLAGS -Werror"
+if test "x$GCC" = "xyes"; then
+ AM_CFLAGS="-Wall"
+ AM_CXXFLAGS="-Wall"
+ if test "x$enable_werror" != "xno"; then
+ AM_CFLAGS="$AM_CFLAGS -Werror"
+ AM_CXXFLAGS="$AM_CXXFLAGS -Werror"
+ fi
fi
AC_SUBST([AM_CFLAGS])
AC_MSG_RESULT([ YFLAGS . . . . . . . $YFLAGS])
AC_MSG_RESULT()
AC_MSG_RESULT([ Libraries:])
-AC_MSG_RESULT([ cuda . . . . . . . . $with_cuda])
AC_MSG_RESULT([ intel mic . . . . . . $with_mic])
AC_MSG_RESULT([ libaquaero5 . . . . . $with_libaquaero5])
AC_MSG_RESULT([ libatasmart . . . . . $with_libatasmart])
AC_MSG_RESULT([ libnetsnmp . . . . . $with_libnetsnmp])
AC_MSG_RESULT([ libnetsnmpagent . . . $with_libnetsnmpagent])
AC_MSG_RESULT([ libnotify . . . . . . $with_libnotify])
+AC_MSG_RESULT([ libnvidia-ml . . . . $with_cuda])
AC_MSG_RESULT([ libopenipmi . . . . . $with_libopenipmipthread])
AC_MSG_RESULT([ liboping . . . . . . $with_liboping])
AC_MSG_RESULT([ libowcapi . . . . . . $with_libowcapi])
AC_MSG_RESULT([ statsd . . . . . . . $enable_statsd])
AC_MSG_RESULT([ swap . . . . . . . . $enable_swap])
AC_MSG_RESULT([ synproxy . . . . . . $enable_synproxy])
+ AC_MSG_RESULT([ sysevent. . . . . . . $enable_sysevent])
AC_MSG_RESULT([ syslog . . . . . . . $enable_syslog])
AC_MSG_RESULT([ table . . . . . . . . $enable_table])
AC_MSG_RESULT([ tail_csv . . . . . . $enable_tail_csv])
AC_MSG_RESULT([ write_riemann . . . . $enable_write_riemann])
AC_MSG_RESULT([ write_sensu . . . . . $enable_write_sensu])
AC_MSG_RESULT([ write_stackdriver . . $enable_write_stackdriver])
+AC_MSG_RESULT([ write_syslog . . . . $enable_write_syslog])
AC_MSG_RESULT([ write_tsdb . . . . . $enable_write_tsdb])
AC_MSG_RESULT([ xencpu . . . . . . . $enable_xencpu])
AC_MSG_RESULT([ xmms . . . . . . . . $enable_xmms])
%define with_openvpn 0%{!?_without_openvpn:1}
%define with_ovs_events 0%{!?_without_ovs_events:1}
%define with_ovs_stats 0%{!?_without_ovs_stats:1}
+%define with_pcie_errors 0%{!?_without_pcie_errors:1}
%define with_perl 0%{!?_without_perl:1}
%define with_pinba 0%{!?_without_pinba:1}
%define with_ping 0%{!?_without_ping:1}
%define with_statsd 0%{!?_without_statsd:1}
%define with_swap 0%{!?_without_swap:1}
%define with_synproxy 0%{!?_without_synproxy:0}
+ %define with_sysevent 0%{!?_without_sysevent:1}
%define with_syslog 0%{!?_without_syslog:1}
%define with_table 0%{!?_without_table:1}
%define with_tail 0%{!?_without_tail:1}
%define with_write_prometheus 0%{!?_without_write_prometheus:1}
%define with_write_redis 0%{!?_without_write_redis:1}
%define with_write_riemann 0%{!?_without_write_riemann:1}
+%define with_write_stackdriver 0%{!?_without_write_stackdriver:1}
%define with_write_sensu 0%{!?_without_write_sensu:1}
+%define with_write_syslog 0%{!?_without_write_syslog:1}
%define with_write_tsdb 0%{!?_without_write_tsdb:1}
%define with_xmms 0%{!?_without_xmms:0%{?_has_xmms}}
%define with_zfs_arc 0%{!?_without_zfs_arc:1}
%define with_xencpu 0%{!?_without_xencpu:0}
# plugin zone disabled, requires Solaris
%define with_zone 0%{!?_without_zone:0}
+# plugin gpu_nvidia requires cuda-nvml-dev
+# get it from https://developer.nvidia.com/cuda-downloads
+# then install cuda-nvml-dev-10-1 or other version
+%define with_gpu_nvidia 0%{!?_without_gpu_nvidia:0}
+# not sure why this one's failing
+%define with_write_stackdriver 0%{!?_without_write_stackdriver:0}
# Plugins not buildable on RHEL < 6
%if 0%{?rhel} && 0%{?rhel} < 6
%define with_ovs_stats 0
%define with_redis 0
%define with_rrdcached 0
+ %define with_sysevent 0
%define with_write_redis 0
%define with_write_riemann 0
%define with_xmms 0
Summary: Statistics collection and monitoring daemon
Name: collectd
-Version: 5.7.1
-Release: 9%{?dist}
+Version: 5.9.0
+Release: 1%{?dist}
URL: https://collectd.org
Source: https://collectd.org/files/%{name}-%{version}.tar.bz2
License: GPLv2
application programming interface (API) to Perl-scripts.
%endif
+%if %{with_pcie_errors}
+%package pcie_errors
+Summary: PCI Express errors plugin for collectd
+Group: System Environment/Daemons
+Requires: %{name}%{?_isa} = %{version}-%{release}
+%description pcie_errors
+The pcie_errors plugin collects PCI Express errors from Device Status in Capability
+structure and from Advanced Error Reporting Extended Capability.
+%endif
+
%if %{with_pinba}
%package pinba
Summary: Pinba plugin for collectd
This plugin for collectd to support AgentX integration.
%endif
+ %if %{with_sysevent}
+ %package sysevent
+ Summary: Rsyslog event plugin for collectd
+ Group: System Environment/Daemons
+ Requires: %{name}%{?_isa} = %{version}-%{release}
+ BuildRequires: yajl-devel
+ %description sysevent
+ Monitors rsyslog for system events.
+ %endif
+
%if %{with_varnish}
%package varnish
Summary: Varnish plugin for collectd
The riemann plugin submits values to Riemann, an event stream processor.
%endif
+%if %{with_write_stackdriver}
+%package write_stackdriver
+Summary: stackdriver plugin for collectd
+Group: System Environment/Daemons
+Requires: %{name}%{?_isa} = %{version}-%{release}
+BuildRequires: curl-devel, yajl-devel, openssl-devel
+%description write_stackdriver
+The write_stackdriver collectd plugin writes metrics to the
+Google Stackdriver Monitoring service.
+%endif
+
+%if %{with_gpu_nvidia}
+%package gpu_nvidia
+Summary: stackdriver plugin for collectd
+Group: System Environment/Daemons
+Requires: %{name}%{?_isa} = %{version}-%{release}
+BuildRequires: cuda-nvml-dev-10-1
+%description gpu_nvidia
+The gpu_nvidia collectd plugin collects NVidia GPU metrics.
+%endif
+
%if %{with_xencpu}
%package xencpu
Summary: xencpu plugin for collectd
%define _with_perl --disable-perl
%endif
+%if %{with_pcie_errors}
+%define _with_pcie_errors --enable-pcie_errors
+%else
+%define _with_pcie_errors --disable-pcie_errors
+%endif
+
%if %{with_pf}
%define _with_pf --enable-pf
%else
%define _with_synproxy --disable-synproxy
%endif
+ %if %{with_sysevent}
+ %define _with_sysevent --enable-sysevent
+ %else
+ %define _with_sysevent --disable-sysevent
+ %endif
+
%if %{with_syslog}
%define _with_syslog --enable-syslog
%else
%define _with_write_riemann --disable-write_riemann
%endif
+%if %{with_write_stackdriver}
+%define _with_write_stackdriver --enable-write_stackdriver
+%else
+%define _with_write_stackdriver --disable-write_stackdriver
+%endif
+
+%if %{with_gpu_nvidia}
+%define _with_gpu_nvidia --enable-gpu_nvidia
+%else
+%define _with_gpu_nvidia --disable-gpu_nvidia
+%endif
+
%if %{with_write_sensu}
%define _with_write_sensu --enable-write_sensu
%else
%define _with_write_sensu --disable-write_sensu
%endif
+%if %{with_write_syslog}
+%define _with_write_syslog --enable-write_syslog
+%else
+%define _with_write_syslog --disable-write_syslog
+%endif
+
%if %{with_write_tsdb}
%define _with_write_tsdb --enable-write_tsdb
%else
%{?_with_ovs_events} \
%{?_with_ovs_stats} \
%{?_with_perl} \
+ %{?_with_pcie_errors} \
%{?_with_pf} \
%{?_with_pinba} \
%{?_with_ping} \
%{?_with_statsd} \
%{?_with_swap} \
%{?_with_synproxy} \
+ %{?_with_sysevent} \
%{?_with_syslog} \
%{?_with_table} \
%{?_with_tail_csv} \
%{?_with_write_prometheus} \
%{?_with_write_redis} \
%{?_with_write_riemann} \
+ %{?_with_write_stackdriver} \
+ %{?_with_gpu_nvidia} \
%{?_with_write_sensu} \
+ %{?_with_write_syslog} \
%{?_with_write_tsdb} \
%{?_with_xencpu} \
%{?_with_xmms} \
%if %{with_write_log}
%{_libdir}/%{name}/write_log.so
%endif
+%if %{with_write_syslog}
+%{_libdir}/%{name}/write_syslog.so
+%endif
%if %{with_write_sensu}
%{_libdir}/%{name}/write_sensu.so
%endif
%{_libdir}/%{name}/perl.so
%endif
+%if %{with_pcie_errors}
+%files pcie_errors
+%{_libdir}/%{name}/pcie_errors.so
+%endif
+
%if %{with_pinba}
%files pinba
%{_libdir}/%{name}/pinba.so
%{_libdir}/%{name}/snmp_agent.so
%endif
+ %if %{with_sysevent}
+ %files sysevent
+ %{_libdir}/%{name}/sysevent.so
+ %endif
+
%if %{with_varnish}
%files varnish
%{_libdir}/%{name}/varnish.so
%{_libdir}/%{name}/write_riemann.so
%endif
+%if %{with_write_stackdriver}
+%files write_stackdriver
+%{_libdir}/%{name}/write_stackdriver.so
+%endif
+
+%if %{with_gpu_nvidia}
+%files write_gpu_nvidia
+%{_libdir}/%{name}/write_gpu_nvidia.so
+%endif
+
%if %{with_xencpu}
%files xencpu
%{_libdir}/%{name}/xencpu.so
%doc contrib/
%changelog
+* Fri Jun 14 2019 Fabien Wernli <rpmbuild@faxmodem.org> - 5.9.0-1
+- add code for write_stackdriver (disabled for now)
+- add code for gpu_nvidia (disabled for now)
+- add pcie_errors
+
* Thu Sep 28 2017 Jakub Jankowski <shasta@toxcorp.com> - 5.7.1-9
- Fix mbmon/mcelog build options
#@BUILD_PLUGIN_SNMP_AGENT_TRUE@LoadPlugin snmp_agent
#@BUILD_PLUGIN_STATSD_TRUE@LoadPlugin statsd
#@BUILD_PLUGIN_SWAP_TRUE@LoadPlugin swap
+ #@BUILD_PLUGIN_SYSEVENT_TRUE@LoadPlugin sysevent
#@BUILD_PLUGIN_TABLE_TRUE@LoadPlugin table
#@BUILD_PLUGIN_TAIL_TRUE@LoadPlugin tail
#@BUILD_PLUGIN_TAIL_CSV_TRUE@LoadPlugin tail_csv
#@BUILD_PLUGIN_WRITE_RIEMANN_TRUE@LoadPlugin write_riemann
#@BUILD_PLUGIN_WRITE_SENSU_TRUE@LoadPlugin write_sensu
#@BUILD_PLUGIN_WRITE_STACKDRIVER_TRUE@LoadPlugin write_stackdriver
+#@BUILD_PLUGIN_WRITE_SYSLOG_TRUE@LoadPlugin write_syslog
#@BUILD_PLUGIN_WRITE_TSDB_TRUE@LoadPlugin write_tsdb
#@BUILD_PLUGIN_XENCPU_TRUE@LoadPlugin xencpu
#@BUILD_PLUGIN_XMMS_TRUE@LoadPlugin xmms
#<Plugin curl>
# <Page "stock_quotes">
# URL "http://finance.google.com/finance?q=NYSE%3AAMD"
+# AddressFamily "any"
# User "foo"
# Password "bar"
# Digest false
#<Plugin curl_json>
# <URL "http://localhost:80/test.json">
+# AddressFamily "any"
# Instance "test_http_json"
# <Key "testArray/0">
# Type "gauge"
# }
## See: http://wiki.apache.org/couchdb/Runtime_Statistics
# <URL "http://localhost:5984/_stats">
+# AddressFamily "ipv4"
# Instance "httpd"
# <Key "httpd/requests/count">
# Type "http_requests"
# </URL>
## Database status metrics:
# <URL "http://localhost:5984/_all_dbs">
+# AddressFamily "ipv6"
# Instance "dbs"
# <Key "*/doc_count">
# Type "gauge"
#<Plugin curl_xml>
# <URL "http://localhost/stats.xml">
+# AddressFamily "any"
# Host "my_host"
# #Plugin "stats"
# Instance "some_instance"
#<Plugin "intel_rdt">
# Cores "0-2"
+# Processes "sshd"
#</Plugin>
#<Plugin interface>
# ReportIO true
#</Plugin>
+ #<Plugin sysevent>
+ # Listen "127.0.0.1" "6666"
+ # BufferSize 1024
+ # BufferLength 10
+ # RegexFilter "regex"
+ #</Plugin>
+
#<Plugin table>
# <Table "/proc/slabinfo">
# #Plugin "table"
# Connection "xen:///"
# RefreshInterval 60
# Domain "name"
+# ReportBlockDevices true
+# ReportNetworkInterfaces true
# BlockDevice "name:device"
# BlockDeviceFormat target
# BlockDeviceFormatBasename false
# InterfaceDevice "name:device"
# IgnoreSelected false
# HostnameFormat name
+# HostnameMetadataXPath "/instance/name/text()"
+# HostnameMetadataNS "http://openstack.org/xmlns/libvirt/nova/1.0"
# InterfaceFormat name
# PluginInstanceFormat name
# Instances 1
-# ExtraStats "cpu_util disk disk_err domain_state fs_info job_stats_background pcpu perf vcpupin"
+# ExtraStats "cpu_util disk disk_err domain_state fs_info job_stats_background pcpu perf vcpu vcpupin disk_physical disk_allocation disk_capacity memory"
# PersistentNotification false
#</Plugin>
# SeparateInstances false
# PreserveSeparator false
# DropDuplicateFields false
+# ReverseHost false
# </Node>
#</Plugin>
# Url "https://monitoring.googleapis.com/v3"
#</Plugin>
+#<Plugin write_syslog>
+# <Node>
+# Host "localhost"
+# Port "44514"
+# Prefix "collectd"
+# MessageFormat "human"
+# HostTags ""
+# StoreRates false
+# AlwaysAppendDS false
+# </Node>
+#</Plugin>
+
#<Plugin write_tsdb>
# <Node>
# Host "localhost"
=head2 Plugin C<cpufreq>
-This plugin doesn't have any options. It reads
+This plugin is available on Linux and FreeBSD only. It doesn't have any
+options. On Linux it reads
F</sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq> (for the first CPU
installed) to get the current CPU frequency. If this file does not exist make
sure B<cpufreqd> (L<http://cpufreqd.sourceforge.net/>) or a similar tool is
installed and an "cpu governor" (that's a kernel module) is loaded.
-If the system has the I<cpufreq-stats> kernel module loaded, this plugin reports
-the rate of p-state (cpu frequency) transitions and the percentage of time spent
-in each p-state.
+On Linux, if the system has the I<cpufreq-stats> kernel module loaded, this
+plugin reports the rate of p-state (cpu frequency) transitions and the
+percentage of time spent in each p-state.
+
+On FreeBSD it does a sysctl dev.cpu.0.freq and submits this as instance 0.
+At this time FreeBSD only has one frequency setting for all cores.
+See the BUGS section in the FreeBSD man page for cpufreq(4) for more details.
+
+On FreeBSD the plugin checks the success of sysctl dev.cpu.0.freq and
+unregisters the plugin when this fails. A message will be logged to indicate
+this.
=head2 Plugin C<cpusleep>
<Page "stock_quotes">
Plugin "quotes"
URL "http://finance.google.com/finance?q=NYSE%3AAMD"
+ AddressFamily "any"
User "foo"
Password "bar"
Digest false
URL of the web site to retrieve. Since a regular expression will be used to
extract information from this data, non-binary data is a big plus here ;)
+=item B<AddressFamily> I<Type>
+
+IP version to resolve URL to. Useful in cases when hostname in URL resolves
+to both IPv4 and IPv6 addresses, and you are interested in using one of them
+specifically.
+Use C<ipv4> to enforce IPv4, C<ipv6> to enforce IPv6, or C<any> to keep the
+default behavior of resolving addresses to all IP versions your system allows.
+If C<libcurl> is compiled without IPv6 support, using C<ipv6> will result in
+a warning and fallback to C<any>.
+If C<Type> cannot be parsed, a warning will be printed and the whole B<Page>
+block will be ignored.
+
=item B<User> I<Name>
Username to use if authorization is required to read the page.
<Plugin curl_json>
<URL "http://localhost:5984/_stats">
+ AddressFamily "any"
Instance "httpd"
<Key "httpd/requests/count">
Type "http_requests"
=over 4
+=item B<AddressFamily> I<Type>
+
+IP version to resolve URL to. Useful in cases when hostname in URL resolves
+to both IPv4 and IPv6 addresses, and you are interested in using one of them
+specifically.
+Use C<ipv4> to enforce IPv4, C<ipv6> to enforce IPv6, or C<any> to keep the
+default behavior of resolving addresses to all IP versions your system allows.
+If C<libcurl> is compiled without IPv6 support, using C<ipv6> will result in
+a warning and fallback to C<any>.
+If C<Type> cannot be parsed, a warning will be printed and the whole B<URL>
+block will be ignored.
+
=item B<Host> I<Name>
Use I<Name> as the host name when submitting values. Defaults to the global
<Plugin "curl_xml">
<URL "http://localhost/stats.xml">
+ AddressFamily "any"
Host "my_host"
#Plugin "curl_xml"
Instance "some_instance"
=over 4
+=item B<AddressFamily> I<Type>
+
+IP version to resolve URL to. Useful in cases when hostname in URL resolves
+to both IPv4 and IPv6 addresses, and you are interested in using one of them
+specifically.
+Use C<ipv4> to enforce IPv4, C<ipv6> to enforce IPv6, or C<any> to keep the
+default behavior of resolving addresses to all IP versions your system allows.
+If C<libcurl> is compiled without IPv6 support, using C<ipv6> will result in
+a warning and fallback to C<any>.
+If C<Type> cannot be parsed, a warning will be printed and the whole B<URL>
+block will be ignored.
+
=item B<Host> I<Name>
Use I<Name> as the host name when submitting values. Defaults to the global
<Plugin "intel_rdt">
Cores "0-2" "3,4,6" "8-10,15"
+ Processes "sshd,qemu-system-x86" "bash"
</Plugin>
B<Options:>
=item B<Cores> I<cores groups>
-All events are reported on a per core basis. Monitoring of the events can be
-configured for group of cores (aggregated statistics). This field defines groups
-of cores on which to monitor supported events. The field is represented as list
-of strings with core group values. Each string represents a list of cores in a
-group. Allowed formats are:
+Monitoring of the events can be configured for group of cores
+(aggregated statistics). This field defines groups of cores on which to monitor
+supported events. The field is represented as list of strings with core group
+values. Each string represents a list of cores in a group. Allowed formats are:
0,1,2,3
0-10,20-18
1,3,5-8,10,0x10-12
If an empty string is provided as value for this field default cores
configuration is applied - a separate group is created for each core.
+=item B<Processes> I<process names groups>
+
+Monitoring of the events can be configured for group of processes
+(aggregated statistics). This field defines groups of processes on which to
+monitor supported events. The field is represented as list of strings with
+process names group values. Each string represents a list of processes in a
+group. Allowed format is:
+ sshd,bash,qemu
+
=back
B<Note:> By default global interval is used to retrieve statistics on monitored
For Modbus/RTU, specifies the baud rate of the serial device.
Note, connections currently support only 8/N/1.
+=item B<UARTType> I<UARTType>
+
+For Modbus/RTU, specifies the type of the serial device.
+RS232, RS422 and RS485 are supported. Defaults to RS232.
+Available only on Linux systems with libmodbus>=2.9.4.
+
=item B<Interval> I<Interval>
Sets the interval (in seconds) in which the values will be collected from this
namely octets, packets, and errors. These statistics are collected by
the C<interface> plugin, too, so using both at the same time is no benefit.
-When configured with B<VerboseInterface> all counters B<except> the basic ones,
-so that no data needs to be collected twice if you use the C<interface> plugin.
+When configured with B<VerboseInterface> all counters B<except> the basic ones
+will be collected, so that no data needs to be collected twice if you use the
+C<interface> plugin.
This includes dropped packets, received multicast packets, collisions and a
whole zoo of differentiated RX and TX errors. You can try the following command
to get an idea of what awaits you:
Address "127.0.0.1"
Socket "/var/run/openvswitch/db.sock"
Bridges "br0" "br_ext"
+ InterfaceStats false
</Plugin>
The plugin provides the following configuration options:
Default: empty (monitor all bridges)
+=item B<InterfaceStats> B<false>|B<true>
+
+Indicates that the plugin should gather statistics for individual interfaces
+in addition to ports. This can be useful when monitoring an OVS setup with
+bond ports, where you might wish to know individual statistics for the
+interfaces included in the bonds. Defaults to B<false>.
+
=back
=head2 Plugin C<pcie_errors>
=back
+ =head2 Plugin C<sysevent>
+
+ The I<sysevent> plugin monitors rsyslog messages.
+
+ B<Synopsis:>
+
+ <Plugin sysevent>
+ Listen "192.168.0.2" "6666"
+ BufferSize 1024
+ BufferLength 10
+ RegexFilter "regex"
+ </Plugin>
+
+ rsyslog should be configured such that it sends data to the IP and port you
+ include in the plugin configuration. For example, given the configuration
+ above, something like this would be set in /etc/rsyslog.conf:
+
+ if $programname != 'collectd' then
+ *.* @192.168.0.2:6666
+
+ This plugin is designed to consume JSON rsyslog data, so a more complete
+ rsyslog configuration would look like so (where we define a JSON template
+ and use it when sending data to our IP and port):
+
+ $template ls_json,"{%timestamp:::date-rfc3339,jsonf:@timestamp%, \
+ %source:::jsonf:@source_host%,\"@source\":\"syslog://%fromhost-ip:::json%\", \
+ \"@message\":\"%timestamp% %app-name%:%msg:::json%\",\"@fields\": \
+ {%syslogfacility-text:::jsonf:facility%,%syslogseverity:::jsonf:severity-num%, \
+ %syslogseverity-text:::jsonf:severity%,%programname:::jsonf:program%, \
+ %procid:::jsonf:processid%}}"
+
+ if $programname != 'collectd' then
+ *.* @192.168.0.2:6666;ls_json
+
+ Please note that these rsyslog.conf examples are *not* complete, as rsyslog
+ requires more than these options in the configuration file. These examples
+ are meant to demonstration the proper remote logging and JSON format syntax.
+
+ B<Options:>
+
+ =over 4
+
+ =item B<Listen> I<host> I<port>
+
+ Listen on this IP on this port for incoming rsyslog messages.
+
+ =item B<BufferSize> I<length>
+
+ Maximum allowed size for incoming rsyslog messages. Messages that exceed
+ this number will be truncated to this size. Default is 4096 bytes.
+
+ =item B<BufferLength> I<length>
+
+ Maximum number of rsyslog events that can be stored in plugin's ring buffer.
+ By default, this is set to 10. Once an event has been read, its location
+ becomes available for storing a new event.
+
+ =item B<RegexFilter> I<regex>
+
+ Enumerate a regex filter to apply to all incoming rsyslog messages. If a
+ message matches this filter, it will be published.
+
+ =back
+
=head2 Plugin C<syslog>
=over 4
=item B<GaugeAverage>
-Calculate the average.
+Calculate the average of all values matched during the interval.
=item B<GaugeMin>
-Use the smallest number only.
+Report the smallest value matched during the interval.
=item B<GaugeMax>
-Use the greatest number only.
+Report the greatest value matched during the interval.
=item B<GaugeLast>
-Use the last number found.
+Report the last value matched during the interval.
=item B<GaugePersist>
-Use the last number found. The number is not reset at the end of an interval.
-It is continously reported until another number is matched. This is intended
-for cases in which only state changes are reported, for example a thermometer
-that only reports the temperature when it changes.
+Report the last matching value. The metric is I<not> reset to C<NaN> at the end
+of an interval. It is continuously reported until another value is matched.
+This is intended for cases in which only state changes are reported, for
+example a thermometer that only reports the temperature when it changes.
=item B<CounterSet>
not use the matched subexpression, but simply count the number of matched
lines. Thus, you may use a regular expression without submatch in this case.
+B<GaugeInc> is reset to I<zero> after every read, unlike other B<Gauge*>
+metrics which are reset to C<NaN>.
+
=item B<Distribution>
Type to do calculations based on the distribution of values, primarily
point number, using L<strtod(3)>. The B<Counter*> and B<AbsoluteSet> types
interpret the submatch as an unsigned integer using L<strtoull(3)>. The
B<Derive*> types interpret the submatch as a signed integer using
-L<strtoll(3)>. B<CounterInc> and B<DeriveInc> do not use the submatch at all
-and it may be omitted in this case.
+L<strtoll(3)>. B<CounterInc>, B<DeriveInc> and B<GaugeInc> do not use the
+submatch at all and it may be omitted in this case.
+
+The B<Gauge*> types, unless noted otherwise, are reset to C<NaN> after being
+reported. In other words, B<GaugeAverage> reports the average of all values
+matched since the last metric was reported (or C<NaN> if there was no match).
=item B<Type> I<Type>
The default is to collect statistics for all domains and all their devices.
-Example:
+B<Note:> B<BlockDevice> and B<InterfaceDevice> options are related to
+corresponding B<*Format> options. Specifically, B<BlockDevice> filtering depends
+on B<BlockDeviceFormat> setting - if user wants to filter block devices by
+'target' name then B<BlockDeviceFormat> option has to be set to 'target' and
+B<BlockDevice> option must be set to a valid block device target
+name("/:hdb/"). Mixing formats and filter values from different worlds (i.e.,
+using 'target' name as B<BlockDevice> value with B<BlockDeviceFormat> set to
+'source') may lead to unexpected results (all devices filtered out or all
+visible, depending on the value of B<IgnoreSelected> option).
+Similarly, option B<InterfaceDevice> is related to B<InterfaceFormat> setting
+(i.e., when user wants to use MAC address as a filter then B<InterfaceFormat>
+has to be set to 'address' - using wrong type here may filter out all of the
+interfaces).
+
+B<Example 1:>
+
+Ignore all I<hdb> devices on any domain, but other block devices (eg. I<hda>)
+will be collected:
BlockDevice "/:hdb/"
IgnoreSelected "true"
+ BlockDeviceFormat "target"
-Ignore all I<hdb> devices on any domain, but other block devices (eg. I<hda>)
-will be collected.
+B<Example 2:>
+
+Collect metrics only for block device on 'baremetal0' domain when its
+'source' matches given path:
+
+ BlockDevice "baremetal0:/var/lib/libvirt/images/baremetal0.qcow2"
+ BlockDeviceFormat source
+
+As you can see it is possible to filter devices/interfaces using
+various formats - for block devices 'target' or 'source' name can be
+used. Interfaces can be filtered using 'name', 'address' or 'number'.
+
+B<Example 3:>
+
+Collect metrics only for domains 'baremetal0' and 'baremetal1' and
+ignore any other domain:
+
+ Domain "baremetal0"
+ Domain "baremetal1"
+
+It is possible to filter multiple block devices/domains/interfaces by
+adding multiple filtering entries in separate lines.
=item B<BlockDeviceFormat> B<target>|B<source>
Setting C<BlockDeviceFormat source> will cause the I<type instance> to be set
to C<var_lib_libvirt_images_image1.qcow2>.
+B<Note:> this option determines also what field will be used for
+filtering over block devices (filter value in B<BlockDevice>
+will be applied to target or source). More info about filtering
+block devices can be found in the description of B<BlockDevice>.
+
=item B<BlockDeviceFormatBasename> B<false>|B<true>
The B<BlockDeviceFormatBasename> controls whether the full path or the
Setting C<BlockDeviceFormatBasename true> will cause the I<type instance> to be
set to C<image1.qcow2>.
-=item B<HostnameFormat> B<name|uuid|hostname|...>
+=item B<HostnameFormat> B<name|uuid|hostname|metadata...>
When the virt plugin logs data, it sets the hostname of the collected data
according to this setting. The default is to use the guest name as provided by
useful on its own because all guests will appear to have the same name. This is
useful in conjunction with B<PluginInstanceFormat> though.
+B<metadata> means use information from guest's metadata. Use
+B<HostnameMetadataNS> and B<HostnameMetadataXPath> to localize this information.
+
You can also specify combinations of these fields. For example B<name uuid>
means to concatenate the guest name and UUID (with a literal colon character
between, thus I<"foo:1234-1234-1234-1234">).
characters. In case when combination of fields exceeds 62 characters,
hostname will be truncated without a warning.
-=item B<InterfaceFormat> B<name>|B<address>
+=item B<InterfaceFormat> B<name>|B<address>|B<number>
When the virt plugin logs interface data, it sets the name of the collected
data according to this setting. The default is to use the path as provided by
B<address> means use the interface's mac address. This is useful since the
interface path might change between reboots of a guest or across migrations.
-=item B<PluginInstanceFormat> B<name|uuid|none>
+B<number> means use the interface's number in guest.
+
+B<Note:> this option determines also what field will be used for
+filtering over interface device (filter value in B<InterfaceDevice>
+will be applied to name, address or number). More info about filtering
+interfaces can be found in the description of B<InterfaceDevice>.
+
+=item B<PluginInstanceFormat> B<name|uuid|metadata|none>
When the virt plugin logs data, it sets the plugin_instance of the collected
data according to this setting. The default is to not set the plugin_instance.
B<name> means use the guest's name as provided by the hypervisor.
B<uuid> means use the guest's UUID.
+B<metadata> means use information from guest's metadata.
You can also specify combinations of the B<name> and B<uuid> fields.
For example B<name uuid> means to concatenate the guest name and UUID
(with a literal colon character between, thus I<"foo:1234-1234-1234-1234">).
-=item B<Instances> B<integer>
+=item B<HostnameMetadataNS> B<string>
-How many read instances you want to use for this plugin. The default is one,
-and the sensible setting is a multiple of the B<ReadThreads> value.
-If you are not sure, just use the default setting.
+When B<metadata> is used in B<HostnameFormat> or B<PluginInstanceFormat>, this
+selects in which metadata namespace we will pick the hostname. The default is
+I<http://openstack.org/xmlns/libvirt/nova/1.0>.
+
+=item B<HostnameMetadataXPath> B<string>
+
+When B<metadata> is used in B<HostnameFormat> or B<PluginInstanceFormat>, this
+describes where the hostname is located in the libvirt metadata. The default is
+I</instance/name/text()>.
+
+=item B<ReportBlockDevices> B<true>|B<false>
+
+Enabled by default. Allows to disable stats reporting of block devices for
+whole plugin.
+
+=item B<ReportNetworkInterfaces> B<true>|B<false>
+
+Enabled by default. Allows to disable stats reporting of network interfaces for
+whole plugin.
=item B<ExtraStats> B<string>
=item B<disk_err>: report disk errors if any occured. Requires libvirt API version
I<0.9.10> or later.
-=item B<domain_state>: report domain state and reason in human-readable format as
-a notification. If libvirt API version I<0.9.2> or later is available, domain
-reason will be included in notification.
+=item B<domain_state>: report domain state and reason as 'domain_state' metric.
=item B<fs_info>: report file system information as a notification. Requires
libvirt API version I<1.2.11> or later. Can be collected only if I<Guest Agent>
a domain. Only one type of job statistics can be collected at the same time.
Requires libvirt API version I<1.2.9> or later.
+=item B<memory>: report statistics about memory usage details, provided
+by libvirt virDomainMemoryStats() function.
+
=item B<pcpu>: report the physical user/system cpu time consumed by the hypervisor, per-vm.
Requires libvirt API version I<0.9.11> or later.
libvirt API version I<1.3.3> or later.
B<Note>: I<perf> metrics can't be collected if I<intel_rdt> plugin is enabled.
+=item B<vcpu>: report domain virtual CPUs utilisation.
+
=item B<vcpupin>: report pinning of domain VCPUs to host physical CPUs.
+=item B<disk_physical>: report 'disk_physical' statistic for disk device.
+B<Note>: This statistic is only reported for disk devices with 'source'
+property available.
+
+=item B<disk_allocation>: report 'disk_allocation' statistic for disk device.
+B<Note>: This statistic is only reported for disk devices with 'source'
+property available.
+
+=item B<disk_capacity>: report 'disk_capacity' statistic for disk device.
+B<Note>: This statistic is only reported for disk devices with 'source'
+property available.
+
=back
=item B<PersistentNotification> B<true>|B<false>
+
Override default configuration to only send notifications when there is a change
in the lifecycle state of a domain. When set to true notifications will be sent
for every read cycle. Default is false. Does not affect the stats being
dispatched.
+=item B<Instances> B<integer>
+
+How many read instances you want to use for this plugin. The default is one,
+and the sensible setting is a multiple of the B<ReadThreads> value.
+
+This option is only useful when domains are specially tagged.
+If you are not sure, just use the default setting.
+
+The reader instance will only query the domains with attached matching tag.
+Tags should have the form of 'virt-X' where X is the reader instance number,
+starting from 0.
+
+The special-purpose reader instance #0, guaranteed to be always present,
+will query all the domains with missing or unrecognized tag, so no domain will
+ever be left out.
+
+Domain tagging is done with a custom attribute in the libvirt domain metadata
+section. Value is selected by an XPath I</domain/metadata/ovirtmap/tag/text()>
+expression in the I<http://ovirt.org/ovirtmap/tag/1.0> namespace.
+(XPath and namespace values are not configurable yet).
+
+Tagging could be used by management applications to evenly spread the
+load among the reader threads, or to pin on the same threads all
+the libvirt domains which use the same shared storage, to minimize
+the disruption in presence of storage outages.
+
=back
=head2 Plugin C<vmem>
LogSendErrors true
Prefix "collectd"
UseTags false
+ ReverseHost false
</Node>
</Plugin>
Default value: B<false>.
+=item B<ReverseHost> B<false>|B<true>
+
+If set to B<true>, the (dot separated) parts of the B<host> field of the
+I<value list> will be rewritten in reverse order. The rewrite happens I<before>
+special characters are replaced with the B<EscapeCharacter>.
+
+This option might be convenient if the metrics are presented with Graphite in a
+DNS like tree structure (probably without replacing dots in hostnames).
+
+Example:
+ Hostname "node3.cluster1.example.com"
+ LoadPlugin "cpu"
+ LoadPlugin "write_graphite"
+ <Plugin "write_graphite">
+ <Node "graphite.example.com">
+ EscapeCharacter "."
+ ReverseHost true
+ </Node>
+ </Plugin>
+
+ result on the wire: com.example.cluster1.node3.cpu-0.cpu-idle 99.900993 1543010932
+
+Default value: B<false>.
+
=back
=head2 Plugin C<write_log>
=back
+=head2 Plugin C<write_syslog>
+
+The C<write_syslog> plugin writes data in I<syslog> format log messages.
+It implements the basic syslog protocol, RFC 5424, extends it with
+content-based filtering, rich filtering capabilities,
+flexible configuration options and adds features such as using TCP for transport.
+The plugin can connect to a I<Syslog> daemon, like syslog-ng and rsyslog, that will
+ingest metrics, transform and ship them to the specified output.
+The plugin uses I<TCP> over the "line based" protocol with a default port 44514.
+The data will be sent in blocks of at most 1428 bytes to minimize the number of
+network packets.
+
+Synopsis:
+
+ <Plugin write_syslog>
+ ResolveInterval 60
+ ResolveJitter 60
+ <Node "example">
+ Host "syslog-1.my.domain"
+ Port "44514"
+ Prefix "collectd"
+ MessageFormat "human"
+ HostTags ""
+ </Node>
+ </Plugin>
+
+The configuration consists of one or more E<lt>B<Node>E<nbsp>I<Name>E<gt>
+blocks and global directives.
+
+Global directives are:
+
+=over 4
+
+=item B<ResolveInterval> I<seconds>
+
+=item B<ResolveJitter> I<seconds>
+
+When I<collectd> connects to a syslog node, it will request the hostname from
+DNS. This can become a problem if the syslog node is unavailable or badly
+configured because collectd will request DNS in order to reconnect for every
+metric, which can flood your DNS. So you can cache the last value for
+I<ResolveInterval> seconds.
+Defaults to the I<Interval> of the I<write_syslog plugin>, e.g. 10E<nbsp>seconds.
+
+You can also define a jitter, a random interval to wait in addition to
+I<ResolveInterval>. This prevents all your collectd servers to resolve the
+hostname at the same time when the connection fails.
+Defaults to the I<Interval> of the I<write_syslog plugin>, e.g. 10E<nbsp>seconds.
+
+B<Note:> If the DNS resolution has already been successful when the socket
+closes, the plugin will try to reconnect immediately with the cached
+information. DNS is queried only when the socket is closed for a longer than
+I<ResolveInterval> + I<ResolveJitter> seconds.
+
+=back
+
+Inside the B<Node> blocks, the following options are recognized:
+
+=over 4
+
+=item B<Host> I<Address>
+
+Hostname or address to connect to. Defaults to C<localhost>.
+
+=item B<Port> I<Service>
+
+Service name or port number to connect to. Defaults to C<44514>.
+
+
+=item B<HostTags> I<String>
+
+When set, I<HostTags> is added to the end of the metric.
+It is intended to be used for adding additional metadata to tag the metric with.
+Dots and whitespace are I<not> escaped in this string.
+
+Examples:
+
+When MessageFormat is set to "human".
+
+ ["prefix1" "example1"="example1_v"]["prefix2" "example2"="example2_v"]"
+
+When MessageFormat is set to "JSON", text should be in JSON format.
+Escaping the quotation marks is required.
+
+ HostTags "\"prefix1\": {\"example1\":\"example1_v\",\"example2\":\"example2_v\"}"
+
+=item B<MessageFormat> I<String>
+
+I<MessageFormat> selects the format in which messages are sent to the
+syslog deamon, human or JSON. Defaults to human.
+
+Syslog message format:
+
+<priority>VERSION ISOTIMESTAMP HOSTNAME APPLICATION PID MESSAGEID STRUCTURED-DATA MSG
+
+The difference between the message formats are in the STRUCTURED-DATA and MSG parts.
+
+Human format:
+
+ <166>1 ISOTIMESTAMP HOSTNAME collectd PID MESSAGEID
+ ["collectd" "value": "v1" "plugin"="plugin_v" "plugin_instance"="plugin_instance_v"
+ "type_instance"="type_instance_v" "type"="type_v" "ds_name"="ds_name_v" "interval"="interval_v" ]
+ "host_tag_example"="host_tag_example_v" plugin_v.type_v.ds_name_v="v1"
+
+JSON format:
+
+ <166>1 ISOTIMESTAMP HOSTNAME collectd PID MESSAGEID STRUCTURED-DATA
+ {
+ "collectd": {
+ "time": time_as_epoch, "interval": interval_v, "plugin": "plugin_v",
+ "plugin_instance": "plugin_instance_v", "type":"type_v",
+ "type_instance": "type_instance_v", "plugin_v": {"type_v": v1}
+ } , "host":"host_v", "host_tag_example": "host_tag_example_v"
+ }
+
+=item B<StoreRates> B<false>|B<true>
+
+If set to B<true>, convert counter values to rates. If set to B<false>
+(the default) counter values are stored as is, as an increasing
+integer number.
+
+=item B<AlwaysAppendDS> B<false>|B<true>
+
+If set to B<true>, append the name of the I<Data Source> (DS) to the "metric"
+identifier. If set to B<false> (the default), this is only done when there is
+more than one DS.
+
+=item B<Prefix> I<String>
+
+When set, I<Prefix> is added to all metrics names as a prefix. It is intended in
+case you want to be able to define the source of the specific metric. Dots and
+whitespace are I<not> escaped in this string.
+
+=back
+
=head2 Plugin C<xencpu>
This plugin collects metrics of hardware CPU load for machine running Xen
=head1 IGNORELISTS
B<Ignorelists> are a generic framework to either ignore some metrics or report
-specific metircs only. Plugins usually provide one or more options to specify
+specific metrics only. Plugins usually provide one or more options to specify
the items (mounts points, devices, ...) and the boolean option
C<IgnoreSelected>.
df_complex value:GAUGE:0:U
df_inodes value:GAUGE:0:U
dilution_of_precision value:GAUGE:0:U
+disk_allocation value:GAUGE:0:U
+disk_capacity value:GAUGE:0:U
disk_error value:GAUGE:0:U
disk_io_time io_time:DERIVE:0:U, weighted_io_time:DERIVE:0:U
disk_latency read:GAUGE:0:U, write:GAUGE:0:U
disk_octets read:DERIVE:0:U, write:DERIVE:0:U
disk_ops read:DERIVE:0:U, write:DERIVE:0:U
disk_ops_complex value:DERIVE:0:U
+disk_physical value:GAUGE:0:U
disk_time read:DERIVE:0:U, write:DERIVE:0:U
dns_answer value:DERIVE:0:U
dns_notify value:DERIVE:0:U
spl value:GAUGE:U:U
swap value:GAUGE:0:1099511627776
swap_io value:DERIVE:0:U
+ sysevent value:GAUGE:0:1
tcp_connections value:GAUGE:0:4294967295
tdp value:GAUGE:U:U
temperature value:GAUGE:U:U