From 671427b533473af742e8295b551c8b3b6ee5f97e Mon Sep 17 00:00:00 2001 From: "Costa Tsaousis (ktsaou)" Date: Wed, 18 Mar 2015 19:51:13 +0200 Subject: [PATCH] disabled checks charts by default; set isdetail=1 to nfsd.rpc nfsd.net nfsd.filehandles --- src/main.c | 21 +++++++++++---------- src/proc_net_rpc_nfsd.c | 3 +++ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/main.c b/src/main.c index 662d4ace..1a58400a 100755 --- a/src/main.c +++ b/src/main.c @@ -34,18 +34,20 @@ struct netdata_static_thread { char *config_section; char *config_name; + int enabled; + pthread_t *thread; void *(*start_routine) (void *); }; struct netdata_static_thread static_threads[] = { - {"tc", "plugins", "tc", NULL, tc_main}, - {"idlejitter", "plugins", "idlejitter", NULL, cpuidlejitter_main}, - {"proc", "plugins", "proc", NULL, proc_main}, - {"plugins.d", NULL, NULL, NULL, pluginsd_main}, - {"check", "plugins", "checks", NULL, checks_main}, - {"web", NULL, NULL, NULL, socket_listen_main}, - {NULL, NULL, NULL, NULL, NULL} + {"tc", "plugins", "tc", 1, NULL, tc_main}, + {"idlejitter", "plugins", "idlejitter", 1, NULL, cpuidlejitter_main}, + {"proc", "plugins", "proc", 1, NULL, proc_main}, + {"plugins.d", NULL, NULL, 1, NULL, pluginsd_main}, + {"check", "plugins", "checks", 0, NULL, checks_main}, + {"web", NULL, NULL, 1, NULL, socket_listen_main}, + {NULL, NULL, NULL, 0, NULL, NULL} }; void kill_childs() @@ -282,11 +284,10 @@ int main(int argc, char **argv) for (i = 0; static_threads[i].name != NULL ; i++) { struct netdata_static_thread *st = &static_threads[i]; - int doit = 1; - if(st->config_name) doit = config_get_boolean(st->config_section, st->config_name, doit); + if(st->config_name) st->enabled = config_get_boolean(st->config_section, st->config_name, st->enabled); - if(doit) { + if(st->enabled) { st->thread = malloc(sizeof(pthread_t)); if(pthread_create(st->thread, NULL, st->start_routine, NULL)) diff --git a/src/proc_net_rpc_nfsd.c b/src/proc_net_rpc_nfsd.c index 6b80c47b..83ec9905 100644 --- a/src/proc_net_rpc_nfsd.c +++ b/src/proc_net_rpc_nfsd.c @@ -422,6 +422,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) { st = rrd_stats_find_bytype("nfsd", "filehandles"); if(!st) { st = rrd_stats_create("nfsd", "filehandles", NULL, "nfsd", "File Handles", "handles/s", 5001, update_every, CHART_TYPE_LINE); + st->isdetail = 1; rrd_stats_dimension_add(st, "stale", NULL, 1, update_every, RRD_DIMENSION_ABSOLUTE); rrd_stats_dimension_add(st, "total_lookups", NULL, 1, update_every, RRD_DIMENSION_INCREMENTAL); @@ -555,6 +556,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) { st = rrd_stats_find_bytype("nfsd", "net"); if(!st) { st = rrd_stats_create("nfsd", "net", NULL, "nfsd", "Network Reads", "reads/s", 5007, update_every, CHART_TYPE_STACKED); + st->isdetail = 1; rrd_stats_dimension_add(st, "udp", NULL, 1, update_every, RRD_DIMENSION_INCREMENTAL); rrd_stats_dimension_add(st, "tcp", NULL, 1, update_every, RRD_DIMENSION_INCREMENTAL); @@ -576,6 +578,7 @@ int do_proc_net_rpc_nfsd(int update_every, unsigned long long dt) { st = rrd_stats_find_bytype("nfsd", "rpc"); if(!st) { st = rrd_stats_create("nfsd", "rpc", NULL, "nfsd", "Remote Procedure Calls", "calls/s", 5008, update_every, CHART_TYPE_LINE); + st->isdetail = 1; rrd_stats_dimension_add(st, "all", NULL, 1, update_every, RRD_DIMENSION_INCREMENTAL); rrd_stats_dimension_add(st, "bad_format", NULL, -1, update_every, RRD_DIMENSION_INCREMENTAL); -- 2.39.2