X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Fplugin.h;h=70a22326e09f7b3f492877711e6b5152e5e369c8;hb=f5adf265a374e5e0dba89a4a9903e7719dc57039;hp=dfc608e8d54d68857ffbfba306e33adf293fec84;hpb=2a8ee0dbb694eac183fff0306ea9c41c46facad7;p=collectd.git diff --git a/src/daemon/plugin.h b/src/daemon/plugin.h index dfc608e8..70a22326 100644 --- a/src/daemon/plugin.h +++ b/src/daemon/plugin.h @@ -33,6 +33,10 @@ #include "meta_data.h" #include "utils_time.h" +#if HAVE_PTHREAD_H +# include +#endif + #define PLUGIN_FLAGS_GLOBAL 0x0001 #define DATA_MAX_NAME_LEN 64 @@ -318,6 +322,17 @@ int plugin_unregister_data_set (const char *name); int plugin_unregister_log (const char *name); int plugin_unregister_notification (const char *name); +/* + * NAME + * plugin_log_available_writers + * + * DESCRIPTION + * This function can be called to output a list of _all_ registered + * writers to the logfacility. + * Since some writers dynamically build their name it can be hard for + * the configuring person to know it. This function will fill this gap. + */ +void plugin_log_available_writers (); /* * NAME @@ -340,7 +355,7 @@ int plugin_dispatch_values (value_list_t const *vl); * plugin_dispatch_multivalue * * SYNOPSIS - * plugin_dispatch_multivalue (vl, 1, + * plugin_dispatch_multivalue (vl, 1, DS_TYPE_GAUGE, * "free", 42.0, * "used", 58.0, * NULL); @@ -352,8 +367,16 @@ int plugin_dispatch_values (value_list_t const *vl); * calculated and dispatched, rather than the absolute values. Values that are * NaN are dispatched as NaN and will not influence the total. * - * The variadic arguments is a list of type_instance / gauge pairs, that are - * interpreted as type "char const *" and "gauge_t". The last argument must be + * The variadic arguments is a list of type_instance / type pairs, that are + * interpreted as type "char const *" and type, encoded by their corresponding + * "store_type": + * + * - "gauge_t" when "DS_TYPE_GAUGE" + * - "absolute_t" when "DS_TYPE_ABSOLUTE" + * - "derive_t" when "DS_TYPE_DERIVE" + * - "counter_t" when "DS_TYPE_COUNTER" + * + * The last argument must be * a NULL pointer to signal end-of-list. * * RETURNS @@ -361,7 +384,7 @@ int plugin_dispatch_values (value_list_t const *vl); */ __attribute__((sentinel)) int plugin_dispatch_multivalue (value_list_t const *vl, - _Bool store_percentage, ...); + _Bool store_percentage, int store_type, ...); int plugin_dispatch_missing (const value_list_t *vl);