Created
September 16, 2015 07:45
-
-
Save anonymous/41124d7df7a451886c2a to your computer and use it in GitHub Desktop.
testing in pry
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
[1] pry(main)> require 'zabbixsync' | |
=> true | |
[2] pry(main)> zabbix = ZabbixSync.new | |
=> #<ZabbixSync:0x000000012e5490 | |
@blacklist=[], | |
@client= | |
#<ZabbixApi::Client:0x000000012e5328 | |
@auth_hash="af0db44b1bfe429c8f6cf142dfba7b81", | |
@options={:url=>"http://localhost/zabbix/api_jsonrpc.php", :user=>"Admin", :password=>"zabbix"}, | |
@version="2.4.6">, | |
@config_file={}, | |
@config_file_name="/usr/local/etc/zabbix_sync.conf", | |
@export_dir_name="data", | |
@export_format="xml", | |
@imported_templates=[], | |
@rules= | |
{:templates=>{:createMissing=>true, :updateExisting=>true}, | |
:applications=>{:createMissing=>true, :updateExisting=>true, :deleteMissing=>true}, | |
:items=>{:createMissing=>true, :updateExisting=>true, :deleteMissing=>true}, | |
:triggers=>{:createMissing=>true, :updateExisting=>true, :deleteMissing=>true}, | |
:graphs=>{:createMissing=>true, :updateExisting=>true, :deleteMissing=>true}, | |
:templateScreens=>{:createMissing=>true, :updateExisting=>true}, | |
:discoveryRules=>{:createMissing=>true, :updateExisting=>true, :deleteMissing=>true}, | |
:templateLinkage=>{:createMissing=>true}, | |
:groups=>{:createMissing=>true}}, | |
@templates_file_name="data/templates.json"> | |
[3] pry(main)> if File.exists?(zabbix.config_file_name) | |
[3] pry(main)* zabbix.config_file = YAML.load(File.read zabbix.config_file_name) | |
[3] pry(main)* end | |
=> {"blacklist"=>["Template BL"]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment