lib/arborist/monitor/snmp.rb
changeset 7 4548e58c8c66
parent 4 e6eb11b1e00d
child 8 e0b7c95a154f
equal deleted inserted replaced
6:71578fe8e9ec 7:4548e58c8c66
    21 module Arborist::Monitor::SNMP
    21 module Arborist::Monitor::SNMP
    22 	extend Loggability
    22 	extend Loggability
    23 	log_to :arborist
    23 	log_to :arborist
    24 
    24 
    25 	# The version of this library.
    25 	# The version of this library.
    26 	VERSION = '0.3.0'
    26 	VERSION = '0.3.1'
    27 
    27 
    28 	# Global defaults for instances of this monitor
    28 	# Global defaults for instances of this monitor
    29 	#
    29 	#
    30 	DEFAULT_OPTIONS = {
    30 	DEFAULT_OPTIONS = {
    31 		timeout:   2,
    31 		timeout:   2,
    32 		retries:   1,
    32 		retries:   1,
    33 		community: 'public',
    33 		community: 'public',
    34 		port:      161
    34 		port:      161
    35 	}
    35 	}
       
    36 
       
    37 	# Always request the node addresses and any config.
       
    38 	USED_PROPERTIES = [ :addresses, :config ].freeze
       
    39 
       
    40 	### Return the properties used by this monitor.
       
    41 	def self::node_properties
       
    42 		return USED_PROPERTIES
       
    43 	end
    36 
    44 
    37 
    45 
    38 	### Connect to the SNMP daemon and yield.
    46 	### Connect to the SNMP daemon and yield.
    39 	###
    47 	###
    40 	def run( nodes )
    48 	def run( nodes )