-
Notifications
You must be signed in to change notification settings - Fork 28
Hosts
vadv edited this page Nov 20, 2012
·
3 revisions
Source code: hosts.rb
@host_default_options = {
:host => nil,
:port => 10050,
:status => 1,
:useip => 1,
:dns => '',
:ip => '0.0.0.0',
:proxy_hostid => 0,
:groups => [],
:useipmi => 0,
:ipmi_ip => '',
:ipmi_port => 623,
:ipmi_authtype => 0,
:ipmi_privilege => 0,
:ipmi_username => '',
:ipmi_password => ''
}
zbx.hosts.add(
:host => "hostname",
:usedns => 1,
:groups => [ :groupid => zbx.hostgroups.get_id(:name => "hostgroup") ]
)
zbx.hosts.create_or_update(
:host => host,
:usedns => 0,
:ip => "10.20.48.89",
:groups => [:groupid => zbx.hostgroups.get_id(:name => hostgroup)]
)
zbx.hosts.delete( zbx.hosts.get_id(:host => host) )