Difference between revisions of "Plugin:Write MongoDB"
From collectd Wiki
(→Example data: Update to the new format.) |
(→Synopsis: add how we name the writer.) |
||
Line 21: | Line 21: | ||
</Node> | </Node> | ||
</Plugin> | </Plugin> | ||
+ | |||
+ | This will register a writer with the following name: | ||
+ | write_mongodb/localhost | ||
== Example data == | == Example data == |
Revision as of 14:24, 18 June 2014
Write MongoDB plugin | |
---|---|
Type: | read |
Callbacks: | config, write |
Status: | supported |
First version: | 5.1 |
Copyright: | 2010 Akkarit Sangpetch 2010 Florian Forster 2012 Chris Lundquist |
License: | MIT license |
Manpage: | collectd.conf(5) |
List of Plugins |
The Write MongoDB plugin writes data collected by collectd to an instance of MongoDB, a schema-less "NoSQL" database.
Contents
Synopsis
<Plugin "write_mongodb"> <Node "default"> Host "localhost" Port "27017" Timeout 2000 StoreRates true </Node> </Plugin>
This will register a writer with the following name:
write_mongodb/localhost
Example data
Data is added to the collectd.${plugin} "collection". They currently have the following format:
/* Collection "collectd.${plugin}" = */
{
"time": 1330940612.932, /* BSON date (UTC milliseconds) */
"host": "localhost", /* string */
"plugin_instance": "", /* string */
"type": "load", /* string */
"type_instance": "", /* string */
"values": [ /* array of numbers */
0.42, 0.37, 0.11
],
"dstypes": [ /* array of strings */
"gauge", "gauge", "gauge"
],
"dsnames": [ /* array of strings */
"shortterm", "midterm", "longterm"
]
}
Dependencies
See also