Created
February 16, 2016 18:27
-
-
Save yosiat/25712097b9e5b0e920c9 to your computer and use it in GitHub Desktop.
window bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:5},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:27:50Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:27:50Z",5]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:5},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:28:00Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:28:00Z",5]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:5},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:28:10Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:28:10Z",5]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:5},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:28:20Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:28:20Z",5]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:5},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:28:30Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:28:30Z",5]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:5},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:28:40Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:28:40Z",5]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:5},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:28:50Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:28:50Z",5]]}]}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Inserting 1455647143 = 5 | |
Inserting 1455647153 = 10 | |
Inserting 1455647163 = 15 | |
Inserting 1455647173 = 20 | |
Inserting 1455647183 = 25 | |
Inserting 1455647193 = 30 | |
Inserting 1455647203 = 35 | |
Inserting 1455647213 = 40 | |
Inserting 1455647223 = 45 | |
Inserting 1455647233 = 50 | |
Inserting 1455647243 = 55 | |
Inserting 1455647253 = 60 | |
Inserting 1455647263 = 65 | |
Inserting 1455647273 = 70 | |
Inserting 1455647283 = 75 | |
Inserting 1455647293 = 80 | |
Inserting 1455647303 = 85 | |
Inserting 1455647313 = 90 | |
Inserting 1455647323 = 95 | |
Inserting 1455647333 = 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'influxdb' | |
database = 'kapacitor_example' | |
name = 'window_data' | |
precision = 's' | |
retention = 'default' | |
influxb = InfluxDB::Client.new database, host: "localhost", port: 9092 | |
time = Time.now.to_i | |
value = 0 | |
20.times do | |
value = value + 5 | |
time = time + 10 | |
data = { | |
values: { value: value }, | |
timestamp: time | |
} | |
puts "Inserting #{time} = #{value}" | |
influxb.write_point(name, data, precision, retention) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:24},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:30:30Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:30:30Z",24]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:24},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:30:40Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:30:40Z",24]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:1},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:27:33Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:27:33Z",1]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:2},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:27:43Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:27:43Z",2]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:3},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:27:53Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:27:53Z",3]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:4},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:28:03Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:28:03Z",4]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:5},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:28:13Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:28:13Z",5]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:5},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:28:23Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:28:23Z",5]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:5},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:28:33Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:28:33Z",5]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:5},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:28:43Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:28:43Z",5]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:5},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:28:53Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:28:53Z",5]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:6},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:29:03Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:29:03Z",6]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:6},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:29:13Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:29:13Z",6]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:6},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:29:23Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:29:23Z",6]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:6},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:29:33Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:29:33Z",6]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:7},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:29:43Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:29:43Z",7]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:7},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:29:53Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:29:53Z",7]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:7},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:30:03Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:30:03Z",7]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:7},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:30:13Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:30:13Z",7]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:7},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:30:23Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:30:23Z",7]]}]}} | |
{"id":"window_data:nil","message":"window_data:nil is CRITICAL","details":"{\u0026#34;Name\u0026#34;:\u0026#34;window_data\u0026#34;,\u0026#34;TaskName\u0026#34;:\u0026#34;window_bug\u0026#34;,\u0026#34;Group\u0026#34;:\u0026#34;nil\u0026#34;,\u0026#34;Tags\u0026#34;:{},\u0026#34;ID\u0026#34;:\u0026#34;window_data:nil\u0026#34;,\u0026#34;Fields\u0026#34;:{\u0026#34;count\u0026#34;:8},\u0026#34;Level\u0026#34;:\u0026#34;CRITICAL\u0026#34;,\u0026#34;Message\u0026#34;:\u0026#34;window_data:nil is CRITICAL\u0026#34;}","time":"2016-02-16T18:30:33Z","level":"CRITICAL","data":{"series":[{"name":"window_data","columns":["time","count"],"values":[["2016-02-16T18:30:33Z",8]]}]}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Inserting 1455647243 = 5 | |
Inserting 1455647255 = 10 | |
Inserting 1455647269 = 15 | |
Inserting 1455647282 = 20 | |
Inserting 1455647296 = 25 | |
Inserting 1455647307 = 30 | |
Inserting 1455647320 = 35 | |
Inserting 1455647334 = 40 | |
Inserting 1455647345 = 45 | |
Inserting 1455647356 = 50 | |
Inserting 1455647371 = 55 | |
Inserting 1455647385 = 60 | |
Inserting 1455647398 = 65 | |
Inserting 1455647413 = 70 | |
Inserting 1455647428 = 75 | |
Inserting 1455647440 = 80 | |
Inserting 1455647451 = 85 | |
Inserting 1455647465 = 90 | |
Inserting 1455647476 = 95 | |
Inserting 1455647488 = 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'influxdb' | |
database = 'kapacitor_example' | |
name = 'window_data' | |
precision = 's' | |
retention = 'default' | |
influxb = InfluxDB::Client.new database, host: "localhost", port: 9092 | |
time = Time.now.to_i | |
value = 0 | |
prng = Random.new | |
20.times do | |
value = value + 5 | |
time = time + 10 + prng.rand(0..5) | |
data = { | |
values: { value: value }, | |
timestamp: time | |
} | |
puts "Inserting #{time} = #{value}" | |
influxb.write_point(name, data, precision, retention) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment