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

Version Path
zabbix_sender_api-1.1.4 exe/example.rb
zabbix_sender_api-1.1.3 exe/example.rb
zabbix_sender_api-1.1.2 exe/example.rb
zabbix_sender_api-1.1.1 exe/example.rb
zabbix_sender_api-1.0.7 exe/example.rb
zabbix_sender_api-1.0.6 exe/example.rb
zabbix_sender_api-1.0.5 exe/example.rb
zabbix_sender_api-1.0.4 exe/example.rb
zabbix_sender_api-1.0.3 exe/example.rb
zabbix_sender_api-1.0.2 exe/example.rb
zabbix_sender_api-1.0.1 exe/example.rb
zabbix_sender_api-1.0.0 exe/example.rb