Navigation Menu

Skip to content

Commit

Permalink
*** empty log message ***
Browse files Browse the repository at this point in the history
  • Loading branch information
massie committed Jan 14, 2005
1 parent eea06c0 commit 9069c9c
Show file tree
Hide file tree
Showing 6 changed files with 649 additions and 398 deletions.
2 changes: 1 addition & 1 deletion monitor-core/configure.in
Expand Up @@ -392,7 +392,7 @@ echo " / /_/ / /_/ / / / / /_/ / / / /_/ /"
echo " \____/\__,_/_/ /_/\__, /_/_/\__,_/"
echo " /____/"
echo ""
echo "Copyright (c) 2004 University of California, Berkeley"
echo "Copyright (c) 2005 University of California, Berkeley"
echo ""
echo "Version: $GANGLIA_VERSION ($GANGLIA_RELEASE_NAME)"
echo "Library: Release $LT_RELEASE $LT_CURRENT:$LT_REVISION:$LT_AGE"
Expand Down
2 changes: 2 additions & 0 deletions monitor-core/gmond/conf.c
@@ -1,6 +1,7 @@
#include <stdio.h>
#include "conf.h"

#if 0
extern cfg_t *config_file;

/* This function is necessary only because I need
Expand Down Expand Up @@ -34,3 +35,4 @@ value_callback(cfg_t *cfg, cfg_opt_t *opt, const char *value, void *result)
fprintf(stderr,"CALLED\n");
return 0;
}
#endif
59 changes: 8 additions & 51 deletions monitor-core/gmond/conf.h
Expand Up @@ -8,15 +8,13 @@ in order for the documentation to be in order with the code

#include "confuse.h"

void init_validate_funcs(void);

#define DEFAULT_CONFIGURATION "\
behavior { \n\
setuid = no \n\
user = nobody \n\
} \n\
udp_send_channel { \n\
ip = 127.0.0.1 \n\
mcast_join = 239.2.11.71 \n\
port = 8649 \n\
} \n\
udp_recv_channel { \n\
Expand All @@ -28,26 +26,18 @@ tcp_accept_channel { \n\
port = 8666 \n\
} \n\
collection_group { \n\
name = \"cpu_stat\" \n\
collect_every = 60 \n\
metric { \n\
name = \"cpu_user\" \n\
absolute_minimum = 0 \n\
absolute_maximum = 100 \n\
} \n\
metric { \n\
name = \"cpu_sys\" \n\
absolute_minimum = 0 \n\
absolute_maximum = 100 \n\
name = \"cpu_system\" \n\
} \n\
metric { \n\
name = \"cpu_idle\" \n\
absolute_minimum = 0 \n\
absolute_maximum = 100 \n\
} \n\
metric { \n\
name = \"cpu_nice\" \n\
absolute_minimum = 0 \n\
absolute_maximum = 100 \n\
} \n\
} \n\
"
Expand Down Expand Up @@ -77,7 +67,6 @@ static cfg_opt_t udp_send_channel_opts[] = {
CFG_STR("mcast_if", NULL, CFGF_NONE),
CFG_STR("ip", NULL, CFGF_NONE ),
CFG_INT("port", -1, CFGF_NONE ),
CFG_STR("protocol", "xdr", CFGF_NONE),
CFG_END()
};

Expand All @@ -86,7 +75,6 @@ static cfg_opt_t udp_recv_channel_opts[] = {
CFG_STR("bind", NULL, CFGF_NONE ),
CFG_INT("port", -1, CFGF_NONE ),
CFG_STR("mcast_if", NULL, CFGF_NONE),
CFG_STR("protocol", "xdr", CFGF_NONE),
CFG_STR("allow_ip", NULL, CFGF_NONE),
CFG_STR("allow_mask", NULL, CFGF_NONE),
CFG_END()
Expand All @@ -96,64 +84,33 @@ static cfg_opt_t tcp_accept_channel_opts[] = {
CFG_STR("bind", NULL, CFGF_NONE ),
CFG_INT("port", -1, CFGF_NONE ),
CFG_STR("interface", NULL, CFGF_NONE),
CFG_STR("protocol", "xml", CFGF_NONE),
CFG_STR("allow_ip", NULL, CFGF_NONE),
CFG_STR("allow_mask", NULL, CFGF_NONE),
CFG_END()
};

int metric_validate_func(cfg_t *cfg, cfg_opt_t *opt);
cfg_callback_t value_cb;

static cfg_opt_t metric_opts[] = {
CFG_BOOL( "absolute_minimum_given", 0, CFGF_NONE ),
CFG_FLOAT("absolute_minimum", 0, CFGF_NONE ),
CFG_BOOL( "absolute_minimum_alert_given", 0, CFGF_NONE ),
CFG_FLOAT("absolute_minimum_alert", 0, CFGF_NONE ),
CFG_BOOL( "absolute_minimum_warning_given", 0, CFGF_NONE ),
CFG_FLOAT("absolute_minimum_warning", 0, CFGF_NONE ),
CFG_BOOL( "absolute_maximum_warning_given", 0, CFGF_NONE ),
CFG_FLOAT("absolute_maximum_warning", 0, CFGF_NONE ),
CFG_BOOL( "absolute_maximum_alert_given", 0, CFGF_NONE ),
CFG_FLOAT("absolute_maximum_alert", 0, CFGF_NONE ),
CFG_BOOL( "absolute_maximum_given", 0, CFGF_NONE ),
CFG_FLOAT("absolute_maximum", 0, CFGF_NONE ),
CFG_BOOL( "relative_change_normal_given", 0, CFGF_NONE),
CFG_FLOAT("relative_change_normal", 0, CFGF_NONE),
CFG_BOOL( "relative_change_warning_given", 0, CFGF_NONE),
CFG_FLOAT("relative_change_warning", 0, CFGF_NONE),
CFG_BOOL( "relative_change_alert_given", 0, CFGF_NONE),
CFG_FLOAT("relative_change_alert", 0, CFGF_NONE),
CFG_STR("units", NULL, CFGF_NONE ),
CFG_STR("name", NULL, CFGF_NONE ),
CFG_INT("current_state", 0, CFGF_NONE), /* high_alert, high_warning, normal, low_warning, low_alert */
CFG_END()
};

static cfg_opt_t static_collection_group_opts[] = {
CFG_STR("name", NULL, CFGF_NONE),
CFG_INT("collection_interval", 60, CFGF_NONE),
CFG_FLOAT("value_threshold", -1, CFGF_NONE),
CFG_END()
};

/* Group with metrics that change... */
static cfg_opt_t collection_group_opts[] = {
CFG_STR("name", NULL, CFGF_NONE),
CFG_SEC("metric", metric_opts, CFGF_MULTI),
CFG_INT("collection_interval", 60, CFGF_NONE),
CFG_INT("announce_interval", 3600, CFGF_NONE), /* tmax */
CFG_INT("lifetime", 0, CFGF_NONE), /* dmax */
CFG_BOOL("collect_once", 0, CFGF_NONE),
CFG_INT("collect_every", 60, CFGF_NONE),
CFG_INT("time_threshold", 3600, CFGF_NONE), /* tmax */
CFG_INT("lifetime", 0, CFGF_NONE), /* dmax */
CFG_END()
};


static cfg_opt_t gmond_opts[] = {
CFG_SEC("cluster", cluster_opts, CFGF_NONE),
CFG_SEC("behavior", behavior_opts, CFGF_NONE),
CFG_SEC("udp_send_channel", udp_send_channel_opts, CFGF_MULTI),
CFG_SEC("udp_recv_channel", udp_recv_channel_opts, CFGF_MULTI),
CFG_SEC("tcp_accept_channel", tcp_accept_channel_opts, CFGF_MULTI),
CFG_SEC("static_collection_group", static_collection_group_opts, CFGF_MULTI),
CFG_SEC("collection_group", collection_group_opts, CFGF_MULTI),
CFG_END()
};
Expand Down

0 comments on commit 9069c9c

Please sign in to comment.