diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-09-03 10:23:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-09-03 10:23:48 +0000 |
commit | cd7ed12292aef11d9062b64f61215174e8cc1860 (patch) | |
tree | 9998ab03d153956743d9319cf3a0279b9593ce36 /collectors/nfacct.plugin/plugin_nfacct.c | |
parent | Releasing debian version 1.16.1-6. (diff) | |
download | netdata-cd7ed12292aef11d9062b64f61215174e8cc1860.tar.xz netdata-cd7ed12292aef11d9062b64f61215174e8cc1860.zip |
Merging upstream version 1.17.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | collectors/nfacct.plugin/plugin_nfacct.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/collectors/nfacct.plugin/plugin_nfacct.c b/collectors/nfacct.plugin/plugin_nfacct.c index feec34b85..21c2e4aee 100644 --- a/collectors/nfacct.plugin/plugin_nfacct.c +++ b/collectors/nfacct.plugin/plugin_nfacct.c @@ -715,15 +715,18 @@ static void nfacct_send_metrics() { printf("CHART netfilter.nfacct_packets '' 'Netfilter Accounting Packets' 'packets/s'\n"); printf("DIMENSION %s '' incremental 1 %d\n", d->name, nfacct_root.update_every); } - printf( - "BEGIN netfilter.nfacct_packets\n" - "SET %s = %lld\n" - "END\n" + } + } + printf("BEGIN netfilter.nfacct_packets\n"); + for(d = nfacct_root.nfacct_metrics; d ; d = d->next) { + if(likely(d->updated)) { + printf("SET %s = %lld\n" , d->name , (collected_number)d->pkts ); } } + printf("END\n"); // ---------------------------------------------------------------- @@ -743,15 +746,18 @@ static void nfacct_send_metrics() { printf("CHART netfilter.nfacct_bytes '' 'Netfilter Accounting Bandwidth' 'kilobytes/s'\n"); printf("DIMENSION %s '' incremental 1 %d\n", d->name, 1000 * nfacct_root.update_every); } - printf( - "BEGIN netfilter.nfacct_bytes\n" - "SET %s = %lld\n" - "END\n" + } + } + printf("BEGIN netfilter.nfacct_bytes\n"); + for(d = nfacct_root.nfacct_metrics; d ; d = d->next) { + if(likely(d->updated)) { + printf("SET %s = %lld\n" , d->name , (collected_number)d->bytes ); } } + printf("END\n"); } #endif // HAVE_LIBNETFILTER_ACCT |