Adding upstream version 1.34.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e393c3af3f
commit
4978089aab
4963 changed files with 677545 additions and 0 deletions
19
plugins/outputs/execd/examples/redis/redis_influx.rb
Normal file
19
plugins/outputs/execd/examples/redis/redis_influx.rb
Normal file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env ruby
|
||||
#
|
||||
# An example of funneling metrics to Redis pub/sub.
|
||||
#
|
||||
# to run this, you may need to:
|
||||
# gem install redis
|
||||
#
|
||||
require 'redis'
|
||||
|
||||
r = Redis.new(host: "127.0.0.1", port: 6379, db: 1)
|
||||
|
||||
loop do
|
||||
# example input: "counter_ruby count=0 1591741648101185000"
|
||||
line = STDIN.readline.chomp
|
||||
|
||||
key = line.split(" ")[0]
|
||||
key = key.split(",")[0]
|
||||
r.publish(key, line)
|
||||
end
|
21
plugins/outputs/execd/examples/redis/redis_json.rb
Normal file
21
plugins/outputs/execd/examples/redis/redis_json.rb
Normal file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env ruby
|
||||
#
|
||||
# An example of funneling metrics to Redis pub/sub.
|
||||
#
|
||||
# to run this, you may need to:
|
||||
# gem install redis
|
||||
#
|
||||
require 'redis'
|
||||
require 'json'
|
||||
|
||||
r = Redis.new(host: "127.0.0.1", port: 6379, db: 1)
|
||||
|
||||
loop do
|
||||
# example input: "{"fields":{"count":0},"name":"counter_ruby","tags":{"host":"localhost"},"timestamp":1586374982}"
|
||||
line = STDIN.readline.chomp
|
||||
|
||||
l = JSON.parse(line)
|
||||
|
||||
key = l["name"]
|
||||
r.publish(key, line)
|
||||
end
|
15
plugins/outputs/execd/examples/redis/telegraf.conf
Normal file
15
plugins/outputs/execd/examples/redis/telegraf.conf
Normal file
|
@ -0,0 +1,15 @@
|
|||
[agent]
|
||||
flush_interval = "1s"
|
||||
interval = "1s"
|
||||
|
||||
[[inputs.execd]]
|
||||
command = ["ruby", "plugins/inputs/execd/examples/count.rb"]
|
||||
signal = "none"
|
||||
|
||||
[[outputs.execd]]
|
||||
command = ["ruby", "plugins/outputs/execd/examples/redis/redis_influx.rb"]
|
||||
data_format = "influx"
|
||||
|
||||
# [[outputs.file]]
|
||||
# files = ["stdout"]
|
||||
# data_format = "influx"
|
Loading…
Add table
Add a link
Reference in a new issue