Class: ZabbixManager::Drules

Inherits:
Basic
  • Object
show all
Defined in:
lib/zabbix_manager/classes/drules.rb

Instance Method Summary collapse

Methods inherited from Basic

#add, #all, #create, #create_or_update, #create_raw, #delete, #delete_raw, #destroy, #dump_by_id, #get, #get_full_data, #get_id, #get_or_create, #get_raw, #hash_equals?, #identity_filter, #initialize, #key, #keys, #log, #normalize_hash, #parse_keys, #update, #update_raw

Constructor Details

This class inherits a constructor from ZabbixManager::Basic

Instance Method Details

#default_optionsHash

返回创建网络发现规则时使用的默认周期和启用状态。

Returns:

  • (Hash)

    网络发现规则默认属性



22
23
24
25
26
27
# File 'lib/zabbix_manager/classes/drules.rb', line 22

def default_options
  {
    delay: "1h",
    status: 0
  }
end

#identifyString

返回网络发现规则用于业务识别的字段名。

Returns:

  • (String)


15
16
17
# File 'lib/zabbix_manager/classes/drules.rb', line 15

def identify
  "name"
end

#method_nameString

返回网络发现规则对应的 Zabbix API 方法前缀。

Returns:

  • (String)


8
9
10
# File 'lib/zabbix_manager/classes/drules.rb', line 8

def method_name
  "drule"
end