Sha256: 2997ab8f1dd997e8d884746423ad2b394cce9409b9261cfa3b399f0a3ea19a85
Contents?: true
Size: 471 Bytes
Versions: 12
Compression:
Stored size: 471 Bytes
Contents
#!/usr/bin/env ruby require 'zabbix_sender_api' sender = Zabbix::Sender::Pipe.new rawdata = { :myFirstKey => 0, :mySecondKey => 100 } data = Zabbix::Sender::Batch.new rawdata.each_pair {|key,value| data.addItemData(key: key,value: value) } disco = Zabbix::Sender::Discovery.new(key: 'discoveryRuleKey') disco.add_entity(:SOMEUSEFULVALUE => 'aValue', :ANOTHERONE => 'somethingElse') data.addDiscovery(disco) puts data.to_senderline sender.sendBatchAtomic(data)
Version data entries
12 entries across 12 versions & 1 rubygems