[collectd] dispatch string values as "counter"

Mehul Choube Mehul_Choube at symantec.com
Fri Sep 26 00:01:41 CEST 2014


It seems the input plugin can pass only numeric values. From plugin.h:

======= code snippet start =======

* Public data types
typedef unsigned long long counter_t;
typedef double gauge_t;
typedef int64_t derive_t;
typedef uint64_t absolute_t;

union value_u
        counter_t  counter;
        gauge_t    gauge;
        derive_t   derive;
        absolute_t absolute;
typedef union value_u value_t;

struct value_list_s
        value_t *values;
        int      values_len;
        cdtime_t time;
        cdtime_t interval;
        char     host[DATA_MAX_NAME_LEN];
        char     plugin[DATA_MAX_NAME_LEN];
        char     plugin_instance[DATA_MAX_NAME_LEN];
        char     type[DATA_MAX_NAME_LEN];
        char     type_instance[DATA_MAX_NAME_LEN];
        meta_data_t *meta;
typedef struct value_list_s value_list_t;

======= code snippet end =======

I want to pass string. I did look at disk and netapp plugin and it seems "plugin_instance" is being used to send disk label or volume name. Is there any other better way?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20140925/eb4c2c43/attachment.html>

More information about the collectd mailing list