This adds the support for string meta_data in PUTVAL. This allows users
to send meta_data using either the unixsock plugin or the exec plugin.
The meta_data is specified using options of the form meta:<KEY>=<VALUE>.
As an example, meta:foo=bar will add an entry with key "foo" and value
"bar".
if ((errno == 0) && (endptr != NULL) && (endptr != value) && (tmp > 0.0))
vl->interval = DOUBLE_TO_CDTIME_T(tmp);
- } else
+ } else if (strncasecmp("meta:", key, 5) == 0) {
+ if (vl->meta == NULL) {
+ vl->meta = meta_data_create();
+ if (vl->meta == NULL) {
+ return 1;
+ }
+ }
+ return meta_data_add_string(vl->meta, key + 5, value);
+ } else {
return 1;
-
+ }
return 0;
} /* int set_option */