Separate net.inet6.ip6.stats module
Vladimir Kobal committed
Mar 14, 2017 at 17:51 UTC
8856eca5853b0dc731ceb16b35bbb62dd1159d15
3 files changed
+209
-140
src/freebsd_sysctl.c
+207
-140
@@ -2135,23 +2135,225 @@ int do_net_inet_ip_stats(int update_every, usec_t dt) {
2135
return 0;
2136
}
2137
2138
+// --------------------------------------------------------------------------------------------------------------------
2139
+// net.inet6.ip6.stats
2140
+
2141
+int do_net_inet6_ip6_stats(int update_every, usec_t dt) {
2142
+ static int do_ip6_packets = -1, do_ip6_fragsout = -1, do_ip6_fragsin = -1, do_ip6_errors = -1;
2143
+
2144
+ if (unlikely(do_ip6_packets == -1)) {
2145
+ do_ip6_packets = config_get_boolean_ondemand("plugin:freebsd:sysctl", "ipv6 packets", CONFIG_BOOLEAN_AUTO);
2146
+ do_ip6_fragsout = config_get_boolean_ondemand("plugin:freebsd:sysctl", "ipv6 fragments sent", CONFIG_BOOLEAN_AUTO);
2147
+ do_ip6_fragsin = config_get_boolean_ondemand("plugin:freebsd:sysctl", "ipv6 fragments assembly",
2148
+ CONFIG_BOOLEAN_AUTO);
2149
+ do_ip6_errors = config_get_boolean_ondemand("plugin:freebsd:sysctl", "ipv6 errors", CONFIG_BOOLEAN_AUTO);
2150
+ }
2151
+
2152
+ if (likely(do_ip6_packets || do_ip6_fragsout || do_ip6_fragsin || do_ip6_errors)) {
2153
+ static int mib[4] = {0, 0, 0, 0};
2154
+ struct ip6stat ip6stat;
2155
+
2156
+ if (unlikely(GETSYSCTL_SIMPLE("net.inet6.ip6.stats", mib, ip6stat))) {
2157
+ do_ip6_packets = 0;
2158
+ error("DISABLED: ipv6.packets chart");
2159
+ do_ip6_fragsout = 0;
2160
+ error("DISABLED: ipv6.fragsout chart");
2161
+ do_ip6_fragsin = 0;
2162
+ error("DISABLED: ipv6.fragsin chart");
2163
+ do_ip6_errors = 0;
2164
+ error("DISABLED: ipv6.errors chart");
2165
+ error("DISABLED: net.inet6.ip6.stats module");
2166
+ return 1;
2167
+ } else {
2168
+
2169
+ // --------------------------------------------------------------------
2170
+
2171
+ if (do_ip6_packets == CONFIG_BOOLEAN_YES || (do_ip6_packets == CONFIG_BOOLEAN_AUTO &&
2172
+ (ip6stat.ip6s_localout || ip6stat.ip6s_total ||
2173
+ ip6stat.ip6s_forward || ip6stat.ip6s_delivered))) {
2174
+ do_ip6_packets = CONFIG_BOOLEAN_YES;
2175
+
2176
+ static RRDSET *st = NULL;
2177
+ static RRDDIM *rd_received = NULL, *rd_sent = NULL, *rd_forwarded = NULL, *rd_delivers = NULL;
2178
+
2179
+ if (unlikely(!st)) {
2180
+ st = rrdset_create_localhost("ipv6",
2181
+ "packets",
2182
+ NULL,
2183
+ "packets",
2184
+ NULL,
2185
+ "IPv6 Packets",
2186
+ "packets/s",
2187
+ 3000,
2188
+ update_every,
2189
+ RRDSET_TYPE_LINE
2190
+ );
2191
+
2192
+ rd_received = rrddim_add(st, "received", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2193
+ rd_sent = rrddim_add(st, "sent", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
2194
+ rd_forwarded = rrddim_add(st, "forwarded", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2195
+ rd_delivers = rrddim_add(st, "delivers", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
2196
+ } else
2197
+ rrdset_next(st);
2198
+
2199
+ rrddim_set_by_pointer(st, rd_sent, ip6stat.ip6s_localout);
2200
+ rrddim_set_by_pointer(st, rd_received, ip6stat.ip6s_total);
2201
+ rrddim_set_by_pointer(st, rd_forwarded, ip6stat.ip6s_forward);
2202
+ rrddim_set_by_pointer(st, rd_delivers, ip6stat.ip6s_delivered);
2203
+ rrdset_done(st);
2204
+ }
2205
+
2206
+ // --------------------------------------------------------------------
2207
+
2208
+ if (do_ip6_fragsout == CONFIG_BOOLEAN_YES || (do_ip6_fragsout == CONFIG_BOOLEAN_AUTO &&
2209
+ (ip6stat.ip6s_fragmented || ip6stat.ip6s_cantfrag ||
2210
+ ip6stat.ip6s_ofragments))) {
2211
+ do_ip6_fragsout = CONFIG_BOOLEAN_YES;
2212
+
2213
+ static RRDSET *st = NULL;
2214
+ static RRDDIM *rd_ok = NULL, *rd_failed = NULL, *rd_all = NULL;
2215
+
2216
+ if (unlikely(!st)) {
2217
+ st = rrdset_create_localhost("ipv6",
2218
+ "fragsout",
2219
+ NULL,
2220
+ "fragments",
2221
+ NULL,
2222
+ "IPv6 Fragments Sent",
2223
+ "packets/s",
2224
+ 3010,
2225
+ update_every,
2226
+ RRDSET_TYPE_LINE
2227
+ );
2228
+
2229
+ rrdset_flag_set(st, RRDSET_FLAG_DETAIL);
2230
+
2231
+ rd_ok = rrddim_add(st, "ok", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2232
+ rd_failed = rrddim_add(st, "failed", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
2233
+ rd_all = rrddim_add(st, "all", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2234
+ } else
2235
+ rrdset_next(st);
2236
+
2237
+ rrddim_set_by_pointer(st, rd_ok, ip6stat.ip6s_fragmented);
2238
+ rrddim_set_by_pointer(st, rd_failed, ip6stat.ip6s_cantfrag);
2239
+ rrddim_set_by_pointer(st, rd_all, ip6stat.ip6s_ofragments);
2240
+ rrdset_done(st);
2241
+ }
2242
+
2243
+ // --------------------------------------------------------------------
2244
+
2245
+ if (do_ip6_fragsin == CONFIG_BOOLEAN_YES || (do_ip6_fragsin == CONFIG_BOOLEAN_AUTO &&
2246
+ (ip6stat.ip6s_reassembled || ip6stat.ip6s_fragdropped ||
2247
+ ip6stat.ip6s_fragtimeout || ip6stat.ip6s_fragments))) {
2248
+ do_ip6_fragsin = CONFIG_BOOLEAN_YES;
2249
+
2250
+ static RRDSET *st = NULL;
2251
+ static RRDDIM *rd_ok = NULL, *rd_failed = NULL, *rd_timeout = NULL, *rd_all = NULL;
2252
+
2253
+ if (unlikely(!st)) {
2254
+ st = rrdset_create_localhost("ipv6",
2255
+ "fragsin",
2256
+ NULL,
2257
+ "fragments",
2258
+ NULL,
2259
+ "IPv6 Fragments Reassembly",
2260
+ "packets/s",
2261
+ 3011,
2262
+ update_every,
2263
+ RRDSET_TYPE_LINE
2264
+ );
2265
+
2266
+ rrdset_flag_set(st, RRDSET_FLAG_DETAIL);
2267
+
2268
+ rd_ok = rrddim_add(st, "ok", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2269
+ rd_failed = rrddim_add(st, "failed", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
2270
+ rd_timeout = rrddim_add(st, "timeout", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
2271
+ rd_all = rrddim_add(st, "all", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2272
+ } else
2273
+ rrdset_next(st);
2274
+
2275
+ rrddim_set_by_pointer(st, rd_ok, ip6stat.ip6s_reassembled);
2276
+ rrddim_set_by_pointer(st, rd_failed, ip6stat.ip6s_fragdropped);
2277
+ rrddim_set_by_pointer(st, rd_timeout, ip6stat.ip6s_fragtimeout);
2278
+ rrddim_set_by_pointer(st, rd_all, ip6stat.ip6s_fragments);
2279
+ rrdset_done(st);
2280
+ }
2281
+
2282
+ // --------------------------------------------------------------------
2283
+
2284
+ if (do_ip6_errors == CONFIG_BOOLEAN_YES || (do_ip6_errors == CONFIG_BOOLEAN_AUTO && (
2285
+ ip6stat.ip6s_toosmall ||
2286
+ ip6stat.ip6s_odropped ||
2287
+ ip6stat.ip6s_badoptions ||
2288
+ ip6stat.ip6s_badvers ||
2289
+ ip6stat.ip6s_exthdrtoolong ||
2290
+ ip6stat.ip6s_sources_none ||
2291
+ ip6stat.ip6s_tooshort ||
2292
+ ip6stat.ip6s_cantforward ||
2293
+ ip6stat.ip6s_noroute))) {
2294
+ do_ip6_errors = CONFIG_BOOLEAN_YES;
2295
+
2296
+ static RRDSET *st = NULL;
2297
+ static RRDDIM *rd_in_discards = NULL, *rd_out_discards = NULL,
2298
+ *rd_in_hdr_errors = NULL, *rd_in_addr_errors = NULL, *rd_in_truncated_pkts = NULL,
2299
+ *rd_in_no_routes = NULL, *rd_out_no_routes = NULL;
2300
+
2301
+ if (unlikely(!st)) {
2302
+ st = rrdset_create_localhost("ipv6",
2303
+ "errors",
2304
+ NULL,
2305
+ "errors",
2306
+ NULL,
2307
+ "IPv6 Errors",
2308
+ "packets/s",
2309
+ 3002,
2310
+ update_every,
2311
+ RRDSET_TYPE_LINE
2312
+ );
2313
+
2314
+ rrdset_flag_set(st, RRDSET_FLAG_DETAIL);
2315
+
2316
+ rd_in_discards = rrddim_add(st, "InDiscards", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2317
+ rd_out_discards = rrddim_add(st, "OutDiscards", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
2318
+ rd_in_hdr_errors = rrddim_add(st, "InHdrErrors", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2319
+ rd_in_addr_errors = rrddim_add(st, "InAddrErrors", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2320
+ rd_in_truncated_pkts = rrddim_add(st, "InTruncatedPkts", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2321
+ rd_in_no_routes = rrddim_add(st, "InNoRoutes", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2322
+ rd_out_no_routes = rrddim_add(st, "OutNoRoutes", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
2323
+ } else
2324
+ rrdset_next(st);
2325
+
2326
+ rrddim_set_by_pointer(st, rd_in_discards, ip6stat.ip6s_toosmall);
2327
+ rrddim_set_by_pointer(st, rd_out_discards, ip6stat.ip6s_odropped);
2328
+ rrddim_set_by_pointer(st, rd_in_hdr_errors, ip6stat.ip6s_badoptions + ip6stat.ip6s_badvers +
2329
+ ip6stat.ip6s_exthdrtoolong);
2330
+ rrddim_set_by_pointer(st, rd_in_addr_errors, ip6stat.ip6s_sources_none);
2331
+ rrddim_set_by_pointer(st, rd_in_truncated_pkts, ip6stat.ip6s_tooshort);
2332
+ rrddim_set_by_pointer(st, rd_in_no_routes, ip6stat.ip6s_cantforward);
2333
+ rrddim_set_by_pointer(st, rd_out_no_routes, ip6stat.ip6s_noroute);
2334
+ rrdset_done(st);
2335
+ }
2336
+ }
2337
+ } else {
2338
+ error("DISABLED: net.inet6.ip6.stats module");
2339
+ return 1;
2340
+ }
2341
+
2342
+ return 0;
2343
+}
2344
+
2345
// --------------------------------------------------------------------------------------------------------------------
2346
// old sources
2347
2348
int do_freebsd_sysctl_old(int update_every, usec_t dt) {
2349
static int do_disk_io = -1,
2350
do_bandwidth = -1,
2144
- do_ip6_packets = -1, do_ip6_fragsout = -1, do_ip6_fragsin = -1, do_ip6_errors = -1,
2351
do_icmp6 = -1, do_icmp6_redir = -1, do_icmp6_errors = -1, do_icmp6_echos = -1, do_icmp6_router = -1,
2352
do_icmp6_neighbor = -1, do_icmp6_types = -1, do_space = -1, do_inodes = -1;
2353
2354
if (unlikely(do_disk_io == -1)) {
2355
do_disk_io = config_get_boolean("plugin:freebsd:sysctl", "stats for all disks", 1);
2356
do_bandwidth = config_get_boolean("plugin:freebsd:sysctl", "bandwidth", 1);
2151
- do_ip6_packets = config_get_boolean_ondemand("plugin:freebsd:sysctl", "ipv6 packets", CONFIG_BOOLEAN_AUTO);
2152
- do_ip6_fragsout = config_get_boolean_ondemand("plugin:freebsd:sysctl", "ipv6 fragments sent", CONFIG_BOOLEAN_AUTO);
2153
- do_ip6_fragsin = config_get_boolean_ondemand("plugin:freebsd:sysctl", "ipv6 fragments assembly", CONFIG_BOOLEAN_AUTO);
2154
- do_ip6_errors = config_get_boolean_ondemand("plugin:freebsd:sysctl", "ipv6 errors", CONFIG_BOOLEAN_AUTO);
2357
do_icmp6 = config_get_boolean_ondemand("plugin:freebsd:sysctl", "icmp", CONFIG_BOOLEAN_AUTO);
2358
do_icmp6_redir = config_get_boolean_ondemand("plugin:freebsd:sysctl", "icmp redirects", CONFIG_BOOLEAN_AUTO);
2359
do_icmp6_errors = config_get_boolean_ondemand("plugin:freebsd:sysctl", "icmp errors", CONFIG_BOOLEAN_AUTO);
@@ -2198,9 +2400,6 @@ int do_freebsd_sysctl_old(int update_every, usec_t dt) {
2400
u_long ift_obytes;
2401
} iftot = {0, 0};
2402
2201
- // NEEDED BY: do_ip6...
2202
- struct ip6stat ip6stat;
2203
-
2403
// NEEDED BY: do_icmp6...
2404
struct icmp6stat icmp6stat;
2405
struct icmp6_total {
@@ -2541,138 +2740,6 @@ int do_freebsd_sysctl_old(int update_every, usec_t dt) {
2740
2741
// --------------------------------------------------------------------
2742
2544
- if (likely(do_ip6_packets || do_ip6_fragsout || do_ip6_fragsin || do_ip6_errors)) {
2545
- if (unlikely(GETSYSCTL_BY_NAME("net.inet6.ip6.stats", ip6stat))) {
2546
- do_ip6_packets = 0;
2547
- error("DISABLED: ipv6.packets");
2548
- do_ip6_fragsout = 0;
2549
- error("DISABLED: ipv6.fragsout");
2550
- do_ip6_fragsin = 0;
2551
- error("DISABLED: ipv6.fragsin");
2552
- do_ip6_errors = 0;
2553
- error("DISABLED: ipv6.errors");
2554
- } else {
2555
- if (do_ip6_packets == CONFIG_BOOLEAN_YES || (do_ip6_packets == CONFIG_BOOLEAN_AUTO &&
2556
- (ip6stat.ip6s_localout || ip6stat.ip6s_total ||
2557
- ip6stat.ip6s_forward || ip6stat.ip6s_delivered))) {
2558
- do_ip6_packets = CONFIG_BOOLEAN_YES;
2559
- st = rrdset_find_localhost("ipv6.packets");
2560
- if (unlikely(!st)) {
2561
- st = rrdset_create_localhost("ipv6", "packets", NULL, "packets", NULL, "IPv6 Packets", "packets/s", 3000,
2562
- update_every, RRDSET_TYPE_LINE);
2563
-
2564
- rrddim_add(st, "received", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2565
- rrddim_add(st, "sent", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
2566
- rrddim_add(st, "forwarded", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2567
- rrddim_add(st, "delivers", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
2568
- } else
2569
- rrdset_next(st);
2570
-
2571
- rrddim_set(st, "sent", ip6stat.ip6s_localout);
2572
- rrddim_set(st, "received", ip6stat.ip6s_total);
2573
- rrddim_set(st, "forwarded", ip6stat.ip6s_forward);
2574
- rrddim_set(st, "delivers", ip6stat.ip6s_delivered);
2575
- rrdset_done(st);
2576
- }
2577
-
2578
- // --------------------------------------------------------------------
2579
-
2580
- if (do_ip6_fragsout == CONFIG_BOOLEAN_YES || (do_ip6_fragsout == CONFIG_BOOLEAN_AUTO &&
2581
- (ip6stat.ip6s_fragmented || ip6stat.ip6s_cantfrag ||
2582
- ip6stat.ip6s_ofragments))) {
2583
- do_ip6_fragsout = CONFIG_BOOLEAN_YES;
2584
- st = rrdset_find_localhost("ipv6.fragsout");
2585
- if (unlikely(!st)) {
2586
- st = rrdset_create_localhost("ipv6", "fragsout", NULL, "fragments", NULL, "IPv6 Fragments Sent",
2587
- "packets/s", 3010, update_every, RRDSET_TYPE_LINE);
2588
- rrdset_flag_set(st, RRDSET_FLAG_DETAIL);
2589
-
2590
- rrddim_add(st, "ok", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2591
- rrddim_add(st, "failed", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
2592
- rrddim_add(st, "all", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2593
- } else
2594
- rrdset_next(st);
2595
-
2596
- rrddim_set(st, "ok", ip6stat.ip6s_fragmented);
2597
- rrddim_set(st, "failed", ip6stat.ip6s_cantfrag);
2598
- rrddim_set(st, "all", ip6stat.ip6s_ofragments);
2599
- rrdset_done(st);
2600
- }
2601
-
2602
- // --------------------------------------------------------------------
2603
-
2604
- if (do_ip6_fragsin == CONFIG_BOOLEAN_YES || (do_ip6_fragsin == CONFIG_BOOLEAN_AUTO &&
2605
- (ip6stat.ip6s_reassembled || ip6stat.ip6s_fragdropped ||
2606
- ip6stat.ip6s_fragtimeout || ip6stat.ip6s_fragments))) {
2607
- do_ip6_fragsin = CONFIG_BOOLEAN_YES;
2608
- st = rrdset_find_localhost("ipv6.fragsin");
2609
- if (unlikely(!st)) {
2610
- st = rrdset_create_localhost("ipv6", "fragsin", NULL, "fragments", NULL, "IPv6 Fragments Reassembly",
2611
- "packets/s", 3011, update_every, RRDSET_TYPE_LINE);
2612
- rrdset_flag_set(st, RRDSET_FLAG_DETAIL);
2613
-
2614
- rrddim_add(st, "ok", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2615
- rrddim_add(st, "failed", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
2616
- rrddim_add(st, "timeout", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
2617
- rrddim_add(st, "all", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2618
- } else
2619
- rrdset_next(st);
2620
-
2621
- rrddim_set(st, "ok", ip6stat.ip6s_reassembled);
2622
- rrddim_set(st, "failed", ip6stat.ip6s_fragdropped);
2623
- rrddim_set(st, "timeout", ip6stat.ip6s_fragtimeout);
2624
- rrddim_set(st, "all", ip6stat.ip6s_fragments);
2625
- rrdset_done(st);
2626
- }
2627
-
2628
- // --------------------------------------------------------------------
2629
-
2630
- if (do_ip6_errors == CONFIG_BOOLEAN_YES || (do_ip6_errors == CONFIG_BOOLEAN_AUTO && (
2631
- ip6stat.ip6s_toosmall ||
2632
- ip6stat.ip6s_odropped ||
2633
- ip6stat.ip6s_badoptions ||
2634
- ip6stat.ip6s_badvers ||
2635
- ip6stat.ip6s_exthdrtoolong ||
2636
- ip6stat.ip6s_sources_none ||
2637
- ip6stat.ip6s_tooshort ||
2638
- ip6stat.ip6s_cantforward ||
2639
- ip6stat.ip6s_noroute))) {
2640
- do_ip6_errors = CONFIG_BOOLEAN_YES;
2641
- st = rrdset_find_localhost("ipv6.errors");
2642
- if (unlikely(!st)) {
2643
- st = rrdset_create_localhost("ipv6", "errors", NULL, "errors", NULL, "IPv6 Errors", "packets/s", 3002,
2644
- update_every, RRDSET_TYPE_LINE);
2645
- rrdset_flag_set(st, RRDSET_FLAG_DETAIL);
2646
-
2647
- rrddim_add(st, "InDiscards", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2648
- rrddim_add(st, "OutDiscards", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
2649
-
2650
- rrddim_add(st, "InHdrErrors", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2651
- rrddim_add(st, "InAddrErrors", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2652
- rrddim_add(st, "InTruncatedPkts", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2653
- rrddim_add(st, "InNoRoutes", NULL, 1, 1, RRD_ALGORITHM_INCREMENTAL);
2654
-
2655
- rrddim_add(st, "OutNoRoutes", NULL, -1, 1, RRD_ALGORITHM_INCREMENTAL);
2656
- } else
2657
- rrdset_next(st);
2658
-
2659
- rrddim_set(st, "InDiscards", ip6stat.ip6s_toosmall);
2660
- rrddim_set(st, "OutDiscards", ip6stat.ip6s_odropped);
2661
-
2662
- rrddim_set(st, "InHdrErrors",
2663
- ip6stat.ip6s_badoptions + ip6stat.ip6s_badvers + ip6stat.ip6s_exthdrtoolong);
2664
- rrddim_set(st, "InAddrErrors", ip6stat.ip6s_sources_none);
2665
- rrddim_set(st, "InTruncatedPkts", ip6stat.ip6s_tooshort);
2666
- rrddim_set(st, "InNoRoutes", ip6stat.ip6s_cantforward);
2667
-
2668
- rrddim_set(st, "OutNoRoutes", ip6stat.ip6s_noroute);
2669
- rrdset_done(st);
2670
- }
2671
- }
2672
- }
2673
-
2674
- // --------------------------------------------------------------------
2675
-
2743
if (likely(do_icmp6 || do_icmp6_redir || do_icmp6_errors || do_icmp6_echos || do_icmp6_router || do_icmp6_neighbor || do_icmp6_types)) {
2744
if (unlikely(GETSYSCTL_BY_NAME("net.inet6.icmp6.stats", icmp6stat))) {
2745
do_icmp6 = 0;
src/plugin_freebsd.c
+1
@@ -39,6 +39,7 @@ static struct freebsd_module {
39
{ .name = "net.inet.udp.stats", .dim = "udp_stats", .enabled = 1, .func = do_net_inet_udp_stats },
40
{ .name = "net.inet.icmp.stats", .dim = "icmp_stats", .enabled = 1, .func = do_net_inet_icmp_stats },
41
{ .name = "net.inet.ip.stats", .dim = "ip_stats", .enabled = 1, .func = do_net_inet_ip_stats },
42
+ { .name = "net.inet6.ip6.stats", .dim = "ip6_stats", .enabled = 1, .func = do_net_inet6_ip6_stats },
43
44
// CPU metrics
45
{ .name = "kern.cp_times", .dim = "cp_times", .enabled = 1, .func = do_kern_cp_times },
src/plugin_freebsd.h
+1
@@ -30,6 +30,7 @@ extern int do_net_inet_tcp_stats(int update_every, usec_t dt);
30
extern int do_net_inet_udp_stats(int update_every, usec_t dt);
31
extern int do_net_inet_icmp_stats(int update_every, usec_t dt);
32
extern int do_net_inet_ip_stats(int update_every, usec_t dt);
33
+extern int do_net_inet6_ip6_stats(int update_every, usec_t dt);
34
35
extern int do_freebsd_sysctl_old(int update_every, usec_t dt);
36