@cryptotaxi247 / netdata-1 / commits / 0db0108c5

fix for ipvs

Costa Tsaousis (ktsaou) committed Mar 30, 2014 at 22:33 UTC 0db0108c50ad07a3792cda757869a5a02328806a
1 file changed +5 -5
netdata.c
+5 -5
@@ -2340,13 +2340,13 @@ int do_proc_net_ip_vs_stats() {
2340
2341 RRD_STATS *st = rrd_stats_find(RRD_TYPE_NET_IPVS ".sockets");
2342 if(!st) {
2343 - st = rrd_stats_create(RRD_TYPE_NET_IPVS ".sockets", RRD_TYPE_NET_IPVS ".sockets", save_history, "IPVS Connections", "Connections", RRD_TYPE_NET_IPVS);
2343 + st = rrd_stats_create(RRD_TYPE_NET_IPVS ".sockets", RRD_TYPE_NET_IPVS ".sockets", save_history, "IPVS New Connections", "new connections", RRD_TYPE_NET_IPVS);
2344 if(!st) {
2345 error("Cannot create RRD_STATS for %s.", RRD_TYPE_NET_IPVS ".sockets");
2346 return 1;
2347 }
2348
2349 - if(!rrd_stats_dimension_add(st, "connections", "connections", sizeof(unsigned long long), 1, 1, RRD_DIMENSION_ABSOLUTE))
2349 + if(!rrd_stats_dimension_add(st, "connections", "connections", sizeof(unsigned long long), 1, 1, RRD_DIMENSION_INCREMENTAL))
2350 error("Cannot add RRD_STATS dimension %s.", "connections");
2351 }
2352 else rrd_stats_next(st);
@@ -2374,11 +2374,11 @@ int do_proc_net_ip_vs_stats() {
2374 rrd_stats_dimension_set(st, "sent", &OutPackets);
2375 rrd_stats_done(st);
2376
2377 - st = rrd_stats_find(RRD_TYPE_NET_IPVS ".bytes");
2377 + st = rrd_stats_find(RRD_TYPE_NET ".ipvs");
2378 if(!st) {
2379 - st = rrd_stats_create(RRD_TYPE_NET_IPVS ".bytes", RRD_TYPE_NET_IPVS ".bytes", save_history, "IPVS Bandwidth", "bandwidth in kilobits/s", RRD_TYPE_NET_IPVS);
2379 + st = rrd_stats_create(RRD_TYPE_NET ".ipvs", RRD_TYPE_NET ".ipvs", save_history, "IPVS Bandwidth", "bandwidth in kilobits/s", RRD_TYPE_NET);
2380 if(!st) {
2381 - error("Cannot create RRD_STATS for %s.", RRD_TYPE_NET_IPVS ".bytes");
2381 + error("Cannot create RRD_STATS for %s.", RRD_TYPE_NET ".ipvs");
2382 return 1;
2383 }
2384