diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-01-26 18:05:15 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-01-26 18:05:42 +0000 |
commit | 112b5b91647c3dea45cc1c9bc364df526c8012f1 (patch) | |
tree | 450af925135ec664c4310a1eb28b69481094ee2a /collectors/nfacct.plugin | |
parent | Releasing debian version 1.32.1-2. (diff) | |
download | netdata-112b5b91647c3dea45cc1c9bc364df526c8012f1.tar.xz netdata-112b5b91647c3dea45cc1c9bc364df526c8012f1.zip |
Merging upstream version 1.33.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/nfacct.plugin')
-rw-r--r-- | collectors/nfacct.plugin/plugin_nfacct.c | 42 |
1 files changed, 12 insertions, 30 deletions
diff --git a/collectors/nfacct.plugin/plugin_nfacct.c b/collectors/nfacct.plugin/plugin_nfacct.c index 7876c231f..35209a281 100644 --- a/collectors/nfacct.plugin/plugin_nfacct.c +++ b/collectors/nfacct.plugin/plugin_nfacct.c @@ -1,6 +1,8 @@ // SPDX-License-Identifier: GPL-3.0-or-later #include "libnetdata/libnetdata.h" +#include "libnetdata/required_dummies.h" + #include <linux/netfilter/nfnetlink_conntrack.h> #include <libmnl/libmnl.h> #include <libnetfilter_acct/libnetfilter_acct.h> @@ -22,34 +24,6 @@ static inline size_t mnl_buffer_size() { return (size_t)s; } -// callback required by fatal() -void netdata_cleanup_and_exit(int ret) { - exit(ret); -} - -void send_statistics( const char *action, const char *action_result, const char *action_data) { - (void) action; - (void) action_result; - (void) action_data; - return; -} - -// callbacks required by popen() -void signals_block(void) {}; -void signals_unblock(void) {}; -void signals_reset(void) {}; - -// callback required by eval() -int health_variable_lookup(const char *variable, uint32_t hash, struct rrdcalc *rc, calculated_number *result) { - (void)variable; - (void)hash; - (void)rc; - (void)result; - return 0; -}; - -// required by get_system_cpus() -char *netdata_configured_host_prefix = ""; // variables static int debug = 0; static int netdata_update_every = 1; @@ -690,7 +664,11 @@ static void nfacct_send_metrics() { if(likely(d->updated)) { if(unlikely(!d->packets_dimension_added)) { d->packets_dimension_added = 1; - printf("CHART netfilter.nfacct_packets '' 'Netfilter Accounting Packets' 'packets/s'\n"); + printf( + "CHART netfilter.nfacct_packets '' 'Netfilter Accounting Packets' 'packets/s' 'nfacct' '' stacked %d %d %s\n", + NETDATA_CHART_PRIO_NETFILTER_PACKETS, + nfacct_root.update_every, + PLUGIN_NFACCT_NAME); printf("DIMENSION %s '' incremental 1 %d\n", d->name, nfacct_root.update_every); } } @@ -721,7 +699,11 @@ static void nfacct_send_metrics() { if(likely(d->updated)) { if(unlikely(!d->bytes_dimension_added)) { d->bytes_dimension_added = 1; - printf("CHART netfilter.nfacct_bytes '' 'Netfilter Accounting Bandwidth' 'kilobytes/s'\n"); + printf( + "CHART netfilter.nfacct_bytes '' 'Netfilter Accounting Bandwidth' 'kilobytes/s' 'nfacct' '' stacked %d %d %s\n", + NETDATA_CHART_PRIO_NETFILTER_BYTES, + nfacct_root.update_every, + PLUGIN_NFACCT_NAME); printf("DIMENSION %s '' incremental 1 %d\n", d->name, 1000 * nfacct_root.update_every); } } |