Browse files

*** empty log message ***

  • Loading branch information...
1 parent cd74621 commit 72f585740e63917516e77f40116564801f71328a massie committed Jan 29, 2005
Showing with 16 additions and 3 deletions.
  1. +4 −3 monitor-core/gmond/g25_config.c
  2. +2 −0 monitor-core/lib/ganglia.h
  3. +10 −0 monitor-core/lib/libgmond.c
View
7 monitor-core/gmond/g25_config.c
@@ -1,6 +1,7 @@
/* $Id$ */
#include <stdio.h>
#include <dotconf.h>
+#include "ganglia.h"
#include "g25_config.h"
gmond_config_t gmond_config;
@@ -283,10 +284,10 @@ print_config(char *path, gmond_config_t *config)
{
fprintf(stdout, " access {\n ip=\"%s\"\n mask = 24\n action = \"allow\"\n }\n", p);
}
+ fprintf(stdout,"}\n");/* close acl */
}
- fprintf(stdout,"}\n\n");
-
-
+ fprintf(stdout,"}\n\n"); /* close tcp_accept_channel */
+ fprintf(stdout,"%s\n", Ganglia_default_collection_groups());
return 0;
}
View
2 monitor-core/lib/ganglia.h
@@ -62,6 +62,8 @@ int Ganglia_gmetric_send( Ganglia_gmetric gmetric, Ganglia_udp_send_channels sen
void Ganglia_gmetric_destroy( Ganglia_gmetric gmetric );
void build_default_gmond_configuration(Ganglia_pool context);
+char *Ganglia_default_collection_groups(void);
+
extern int gexec_errno;
View
10 monitor-core/lib/libgmond.c
@@ -155,6 +155,9 @@ tcp_accept_channel { \n\
} \n\
\n\
\n\
+"
+
+#define COLLECTION_GROUP_LIST "\
/* The old internal 2.5.x metric array has been replaced by the following \n\
collection_group directives. What follows is the default behavior for \n\
collecting and sending metrics that is as close to 2.5.x behavior as \n\
@@ -424,10 +427,17 @@ collection_group { \n\
\n\
"
+char *
+Ganglia_default_collection_groups(void)
+{
+ return COLLECTION_GROUP_LIST;
+}
+
void
build_default_gmond_configuration(apr_pool_t *context)
{
default_gmond_configuration = apr_pstrdup(context, BASE_GMOND_CONFIGURATION);
+ default_gmond_configuration = apr_pstrcat(context, default_gmond_configuration, COLLECTION_GROUP_LIST, NULL);
#if SOLARIS
default_gmond_configuration = apr_pstrcat(context, default_gmond_configuration, SOLARIS_SPECIFIC_CONFIGURATION, NULL);
#endif

0 comments on commit 72f5857

Please sign in to comment.