Beispiel #1
0
static int storm_mon_module_init ( apr_pool_t *p )
{
	int i;

	libmetrics_init();

	for (i = 0; storm_mon_module.metrics_info[i].name != NULL; i++)
	{
		 MMETRIC_INIT_METADATA (&(storm_mon_module.metrics_info[i]),p);
		 MMETRIC_ADD_METADATA  (&(storm_mon_module.metrics_info[i]),MGROUP,"srm");
	}
	return 0;
}
Beispiel #2
0
static int mem_metric_init ( apr_pool_t *p )
{
    int i;

    libmetrics_init();

    for (i = 0; mem_module.metrics_info[i].name != NULL; i++) {
        /* Initialize the metadata storage for each of the metrics and then
         *  store one or more key/value pairs.  The define MGROUPS defines
         *  the key for the grouping attribute. */
        MMETRIC_INIT_METADATA(&(mem_module.metrics_info[i]),p);
        MMETRIC_ADD_METADATA(&(mem_module.metrics_info[i]),MGROUP,"memory");
    }

    return 0;
}
static int user_metric_init ( apr_pool_t *p )
{
    int i;

    libmetrics_init();

    pool = p;
    apr_thread_mutex_create(&mutex, APR_THREAD_MUTEX_UNNESTED, pool);

    for (i = 0; user_module.metrics_info[i].name != NULL; i++) {
        /* Initialize the metadata storage for each of the metrics and then
         *  store one or more key/value pairs.  The define MGROUPS defines
         *  the key for the grouping attribute. */
        MMETRIC_INIT_METADATA(&(user_module.metrics_info[i]),p);
        MMETRIC_ADD_METADATA(&(user_module.metrics_info[i]),MGROUP,"user");
    }

    return 0;
}