Sha256: 916f2c046b3f9df8700c76a0af05b055dbfecde4f465f277d146c9e646f8e06a

Contents?: true

Size: 754 Bytes

Versions: 3

Compression:

Stored size: 754 Bytes

Contents

class ZabbixApi
  class Scripts < Basic
    def method_name
      'script'
    end

    # The id field name used for identifying specific Screen objects via Zabbix API
    #
    # @return [String]
    def indentify
      'name'
    end

    # Submits a request to the zabbix api
    # data - A Hash containing the scriptid and hostid
    #
    # Example:
    #   execute({ scriptid: '12', hostid: '32 })
    #
    # Returns nothing
    def execute(data)
      @client.api_request(
        method: 'script.execute',
        params: {
          scriptid: data[:scriptid],
          hostid: data[:hostid]
        }
      )
    end

    def getscriptsbyhost(data)
      @client.api_request(method: 'script.getscriptsbyhosts', params: data)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
zabbixapi-4.2.0 lib/zabbixapi/classes/scripts.rb
zabbixapi-4.1.2 lib/zabbixapi/classes/scripts.rb
zabbixapi-4.1.1 lib/zabbixapi/classes/scripts.rb