README.md in fluent-plugin-munin-0.2.2 vs README.md in fluent-plugin-munin-0.3.1
- old
+ new
@@ -28,14 +28,16 @@
interval 10s # Optional (default: 1m)
tag_prefix input.munin # Required
# specify munin plugin names by comma separated values.
service cpu # Optional (not specify, fetch all enabled munin metrics)
# inserting hostname into record.
- record_hostname yes # Optional (yes/no)
- # multi row results to be nested or separated record.
- nest_result no # Optional (yes/no)
- nest_keyname data # Optional (default: result)
+ record_hostname yes # Optional (default: no)
+ # converting values type from string to number.
+ convert_type yes # Optional (default: no)
+ # metrics datasets to be nested or separated record.
+ nest_result no # Optional (default: no)
+ nest_key data # Optional (default: result)
</source>
<match input.munin.*>
type stdout
</match>
@@ -50,19 +52,24 @@
record_hostname: yes, nest_result: no
`````
input.munin.cpu: {"hostname":"myhost.example.com","service":"cpu","user":"113183","nice":"340","system":"26584","idle":"74205345","iowait":"26134","irq":"1","softirq":"506","steal":"0","guest":"0"}
`````
-record_hostname: yes, nest_result: yes
+record_hostname: yes, nest_result: no, convert_type: yes #RECOMMEND
`````
+input.munin.cpu: {"hostname":"myhost.example.com","service":"cpu","user":113183,"nice":340,"system":26584,"idle":74205345,"iowait":26134,"irq":1,"softirq":506,"steal":0,"guest":0}
+`````
+
+record_hostname: yes, nest_result: yes, nest_key: data
+`````
input.munin.cpu: {"hostname":"myhost.example.com","service":"cpu","data":{"user":"113183","nice":"340","system":"26584","idle":"74205345","iowait":"26134","irq":"1","softirq":"506","steal":"0","guest":"0"}}
`````
### MongoDB find example
-record_hostname: yes, nest_result: yes
+record_hostname: yes, nest_result: yes, convert_type: yes
`````
> use munin
-> db.cpu.find({ "data.iowait" : { $gt : "200000" } })
+> db.cpu.find({ "data.iowait" : { $gt : 200000 } })
`````
## TODO
patches welcome!