I'm playing with the amqp output plugin, wihch uses util_format_json.c for
putting the values in the wire.
However, for multi-valued samples the name each value, as well as the type
(COUNTER, GUAGE etc) are missing.
For example, for load average the json looks like this:
[
{"values":[0.0561523,0.188477,0.276855],
"time":1268776516,
"interval":10,
"host":"host.domain.com",
"plugin":"load",
"plugin_instance":"",
"type":"load",
"type_instance":""}
]
The three values are named 'shortterm', 'midterm' and 'longterm' and are all
of type GUAGE.
For systems that are "far away" from collectd without access to the types
database, it would be nice to have this info.
May I suggest a format for the JSON to incorporate this data.
Again, using load as an example:
[
{"values":{"shortterm:GUAGE":0.0561523, "midterm:GUAGE":0.188477,
"longterm:GUAGE":0.276855},
"time":1268776516,
"interval":10,
"host":"host.domain.com",
"plugin":"load",
"plugin_instance":"",
"type":"load",
"type_instance":""}
]
Basically changing "values" from an array to a hash, keyed by a
"name:type".
Thoughts?
- Bob
_______________________________________________
collectd mailing list
[email protected]
http://mailman.verplant.org/listinfo/collectd