Class: SnmpTrapMonitoring

Inherits:
Object
  • Object
show all
Defined in:
lib/monitor/server/snmp/snmptrap_monitoring.rb

Instance Method Summary collapse

Constructor Details

#initialize(st, snmptp_ref, sev) ⇒ SnmpTrapMonitoring

Returns a new instance of SnmpTrapMonitoring.



3
4
5
6
7
8
# File 'lib/monitor/server/snmp/snmptrap_monitoring.rb', line 3

def initialize (st, snmptp_ref, sev)
		@state=st
 @snmptrap_ref=snmptp_ref
		#index of $status
 @severity=sev
end

Instance Method Details

#active?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/monitor/server/snmp/snmptrap_monitoring.rb', line 18

def active?()
	return @state==1
end

#get_snmptrap_refObject



10
11
12
# File 'lib/monitor/server/snmp/snmptrap_monitoring.rb', line 10

def get_snmptrap_ref()
	return @snmptrap_ref
end

#get_stateObject



14
15
16
# File 'lib/monitor/server/snmp/snmptrap_monitoring.rb', line 14

def get_state()
	return @state
end

#raw_severityObject



22
23
24
# File 'lib/monitor/server/snmp/snmptrap_monitoring.rb', line 22

def raw_severity()
	return @severity
end

#severityObject



26
27
28
29
30
31
# File 'lib/monitor/server/snmp/snmptrap_monitoring.rb', line 26

def severity()
	if @severity > 0
		return $status[@severity-1]
	end
	return nil
end