Class: ZabbixApi::Configurations

Inherits:
Basic
  • Object
show all
Defined in:
lib/zabbixapi/classes/configurations.rb

Instance Method Summary collapse

Methods inherited from Basic

#add, #all, #create, #create_or_update, #default_options, #delete, #destroy, #dump_by_id, #get, #get_full_data, #get_id, #get_or_create, #get_raw, #hash_equals?, #initialize, #key, #keys, #log, #merge_params, #normalize_array, #normalize_hash, #parse_keys, #symbolize_keys, #update

Constructor Details

This class inherits a constructor from ZabbixApi::Basic

Instance Method Details

#array_flagBoolean

Returns:

  • (Boolean)

4
5
6
# File 'lib/zabbixapi/classes/configurations.rb', line 4

def array_flag
  true
end

#export(data) ⇒ Hash

Export configuration data using Zabbix API

Parameters:

  • data (Hash)

Returns:

  • (Hash)

Raises:

  • (ApiError)

    Error returned when there is a problem with the Zabbix API call.

  • (HttpError)

    Error raised when HTTP status from Zabbix Server response is not a 200 OK.


28
29
30
# File 'lib/zabbixapi/classes/configurations.rb', line 28

def export(data)
  @client.api_request(method: 'configuration.export', params: data)
end

#import(data) ⇒ Hash

Import configuration data using Zabbix API

Parameters:

  • data (Hash)

Returns:

  • (Hash)

Raises:

  • (ApiError)

    Error returned when there is a problem with the Zabbix API call.

  • (HttpError)

    Error raised when HTTP status from Zabbix Server response is not a 200 OK.


38
39
40
# File 'lib/zabbixapi/classes/configurations.rb', line 38

def import(data)
  @client.api_request(method: 'configuration.import', params: data)
end

#indentifyString

The id field name used for identifying specific Configuration objects via Zabbix API

Returns:

  • (String)

18
19
20
# File 'lib/zabbixapi/classes/configurations.rb', line 18

def indentify
  'host'
end

#method_nameString

The method name used for interacting with Configurations via Zabbix API

Returns:

  • (String)

11
12
13
# File 'lib/zabbixapi/classes/configurations.rb', line 11

def method_name
  'configuration'
end