fluent-plugin-zabbix-agent 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +17 -0
- data/lib/fluent/plugin/in_zabbix_agent.rb +5 -1
- data/lib/fluent_plugin_zabbix_agent/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b45abf607c6bced10d479b80b7554b72e8b5899c
|
|
4
|
+
data.tar.gz: 743abbd86ab81996e2eb696cfeda665204e01936
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b77a5589ee51d15e1082a8128ce5d012170b05f6fd2836f2950a715741b429798b1170f798cd352a4264651b01134fa5aed32b964252a41dd19cb292f8eb9c70
|
|
7
|
+
data.tar.gz: 4ee48510670af790c32aef58609aafa2272932c6b598f7fe152c3b9d6ae67bb89c3ca5c5affb384dc15f59c9ef9faeecfc388f8b0b082c46a6955f51f175948c
|
data/README.md
CHANGED
|
@@ -92,3 +92,20 @@ Or install it yourself as:
|
|
|
92
92
|
```
|
|
93
93
|
2015-01-02 12:30:40 +0000 zabbix.item: {"load_avg1":0.06,"system.cpu.load[all,avg5]":0.03,"hostname":"my-server"}
|
|
94
94
|
```
|
|
95
|
+
|
|
96
|
+
### Hash record key
|
|
97
|
+
|
|
98
|
+
```apache
|
|
99
|
+
<source>
|
|
100
|
+
type zabbix_agent
|
|
101
|
+
extra {"hostname", "my-host"}
|
|
102
|
+
items {
|
|
103
|
+
"system.cpu.load[all,avg1]": {"name": "load_avg1", "source": "all"}
|
|
104
|
+
}
|
|
105
|
+
</source>
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
2015-01-02 12:30:40 +0000 zabbix.item: {"name":"load_avg1","source":"all","value":0.0,"hostname":"my-host"}
|
|
111
|
+
```
|
|
@@ -139,7 +139,11 @@ class Fluent::ZabbixAgentInput < Fluent::Input
|
|
|
139
139
|
router.emit(@tag, time.to_i, bulk_record.merge(extra))
|
|
140
140
|
else
|
|
141
141
|
records = value_by_item.map do |key, value|
|
|
142
|
-
|
|
142
|
+
if key.is_a?(Hash)
|
|
143
|
+
key.merge(@item_value_key => value)
|
|
144
|
+
else
|
|
145
|
+
{@item_key_key => key, @item_value_key => value}
|
|
146
|
+
end
|
|
143
147
|
end
|
|
144
148
|
|
|
145
149
|
records.each do |rcrd|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluent-plugin-zabbix-agent
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Genki Sugawara
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-09-
|
|
11
|
+
date: 2015-09-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: fluentd
|