From: Andrew Bays Date: Wed, 18 Sep 2019 12:31:32 +0000 (-0400) Subject: Merge branch 'master' into connectivity X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=e10ce37462d3002c296efe1b5b955a0a498d1f3b;hp=-c;p=collectd.git Merge branch 'master' into connectivity --- e10ce37462d3002c296efe1b5b955a0a498d1f3b diff --combined Makefile.am index e46d8dc5,5470b9b3..f8353d4c --- a/Makefile.am +++ b/Makefile.am @@@ -768,15 -768,12 +768,21 @@@ chrony_la_LDFLAGS = $(PLUGIN_LDFLAGS chrony_la_LIBADD = -lm endif + if BUILD_PLUGIN_CHECK_UPTIME + pkglib_LTLIBRARIES += check_uptime.la + check_uptime_la_SOURCES = src/check_uptime.c + check_uptime_la_LDFLAGS = $(PLUGIN_LDFLAGS) + endif + +if BUILD_PLUGIN_CONNECTIVITY +pkglib_LTLIBRARIES += connectivity.la +connectivity_la_SOURCES = src/connectivity.c +connectivity_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBMNL_CFLAGS) +connectivity_la_CPPFLAGS = $(AM_CPPFLAGS) $(BUILD_WITH_LIBYAJL_CPPFLAGS) +connectivity_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBYAJL_LDFLAGS) +connectivity_la_LIBADD = $(BUILD_WITH_LIBYAJL_LIBS) $(BUILD_WITH_LIBMNL_LIBS) libignorelist.la +endif + if BUILD_PLUGIN_CONNTRACK pkglib_LTLIBRARIES += conntrack.la conntrack_la_SOURCES = src/conntrack.c diff --combined configure.ac index 3ff2189f,9ff6408f..c190784d --- a/configure.ac +++ b/configure.ac @@@ -6362,7 -6362,6 +6362,7 @@@ plugin_battery="no plugin_bind="no" plugin_ceph="no" plugin_cgroups="no" +plugin_connectivity="no" plugin_conntrack="no" plugin_contextswitch="no" plugin_cpu="no" @@@ -6481,10 -6480,6 +6481,10 @@@ if test "x$ac_system" = "xLinux"; the plugin_ovs_events="yes" plugin_ovs_stats="yes" plugin_procevent="yes" + + if test "x$with_libmnl" = "xyes"; then + plugin_connectivity="yes" + fi fi if test "x$have_pci_regs_h" = "xyes"; then @@@ -6795,7 -6790,7 +6795,8 @@@ AC_PLUGIN([bind], [$plug AC_PLUGIN([ceph], [$plugin_ceph], [Ceph daemon statistics]) AC_PLUGIN([cgroups], [$plugin_cgroups], [CGroups CPU usage accounting]) AC_PLUGIN([chrony], [yes], [Chrony statistics]) + AC_PLUGIN([check_uptime], [yes], [Notify about uptime reset]) +AC_PLUGIN([connectivity], [$plugin_connectivity], [Network interface up/down events]) AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack statistics]) AC_PLUGIN([contextswitch], [$plugin_contextswitch], [context switch statistics]) AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics]) @@@ -7227,7 -7222,7 +7228,8 @@@ AC_MSG_RESULT([ bind . . . . . . . AC_MSG_RESULT([ ceph . . . . . . . . $enable_ceph]) AC_MSG_RESULT([ cgroups . . . . . . . $enable_cgroups]) AC_MSG_RESULT([ chrony. . . . . . . . $enable_chrony]) + AC_MSG_RESULT([ check_uptime. . . . . $enable_check_uptime]) +AC_MSG_RESULT([ connectivity. . . . . $enable_connectivity]) AC_MSG_RESULT([ conntrack . . . . . . $enable_conntrack]) AC_MSG_RESULT([ contextswitch . . . . $enable_contextswitch]) AC_MSG_RESULT([ cpu . . . . . . . . . $enable_cpu]) diff --combined src/collectd.conf.in index 659c098b,f8c48080..a194b475 --- a/src/collectd.conf.in +++ b/src/collectd.conf.in @@@ -102,7 -102,7 +102,8 @@@ #@BUILD_PLUGIN_CEPH_TRUE@LoadPlugin ceph #@BUILD_PLUGIN_CGROUPS_TRUE@LoadPlugin cgroups #@BUILD_PLUGIN_CHRONY_TRUE@LoadPlugin chrony + #@BUILD_PLUGIN_CHECK_UPTIME_TRUE@LoadPlugin check_uptime +#@BUILD_PLUGIN_CONNECTIVITY_TRUE@LoadPlugin connectivity #@BUILD_PLUGIN_CONNTRACK_TRUE@LoadPlugin conntrack #@BUILD_PLUGIN_CONTEXTSWITCH_TRUE@LoadPlugin contextswitch @BUILD_PLUGIN_CPU_TRUE@@BUILD_PLUGIN_CPU_TRUE@LoadPlugin cpu @@@ -385,10 -385,6 +386,10 @@@ # Timeout "2" # +# +# Interface eth0 +# + # # CGroup "libvirt" # IgnoreSelected false diff --combined src/collectd.conf.pod index 01b068bf,8dff63c1..c13a0677 --- a/src/collectd.conf.pod +++ b/src/collectd.conf.pod @@@ -1548,6 -1548,35 +1548,35 @@@ at all, B cgroups are selected =back + =head2 Plugin C + + The I designed to check and notify about host or service + status based on I metric. + + When new metric of I type appears in cache, OK notification is sent. + When new value for metric is less than previous value, WARNING notification is + sent about host/service restart. + When no new updates comes for metric and cache entry expires, then FAILURE + notification is sent about unreachable host or service. + + By default (when no explicit configuration), plugin checks for I metric. + + B + + + Type "uptime" + Type "my_uptime_type" + + + =over 4 + + =item B I + + Metric type to check for status/values. The type should consist single GAUGE + data source. + + =back + =head2 Plugin C The C plugin collects ntp data from a B server, such as clock @@@ -1574,47 -1603,6 +1603,47 @@@ Connection timeout in seconds. Default =back +=head2 Plugin Connectivity + +connectivity - Documentation of collectd's C + + + LoadPlugin connectivity + # ... + + Interface eth0 + + +The C queries interface status using netlink (man 7 netlink) which provides information about network interfaces via the NETLINK_ROUTE family (man 7 rtnetlink). The plugin translates the value it receives to collectd's internal format and, depending on the write plugins you have loaded, it may be written to disk or submitted to another instance. +The plugin listens to interfaces enumerated within the plugin configuration (see below). If no interfaces are listed, then the default is for all interfaces to be monitored. + +This example shows C monitoring all interfaces. +LoadPlugin connectivity + + + +This example shows C monitoring 2 interfaces, "eth0" and "eth1". +LoadPlugin connectivity + + Interface eth0 + Interface eth1 + + +This example shows C monitoring all interfaces except "eth1". +LoadPlugin connectivity + + Interface eth1 + IgnoreSelected true + + +=over 4 + +=item B I + +interface(s) to monitor connect to. + +=back + =head2 Plugin C This plugin collects IP conntrack statistics.