Class: SyslogMonitoring

Inherits:
Object
  • Object
show all
Defined in:
lib/monitor/server/syslog/syslog_monitoring.rb

Instance Method Summary collapse

Constructor Details

#initialize(st, syslog_ref, sev) ⇒ SyslogMonitoring

Returns a new instance of SyslogMonitoring.



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

def initialize (st, syslog_ref, sev)
		@state=st
 @syslog_ref=syslog_ref
		#index of $status, 0 is auto map syslog severity
 @severity=sev
end

Instance Method Details

#active?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/monitor/server/syslog/syslog_monitoring.rb', line 18

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

#get_stateObject



14
15
16
# File 'lib/monitor/server/syslog/syslog_monitoring.rb', line 14

def get_state()
	return @state
end

#get_syslog_refObject



10
11
12
# File 'lib/monitor/server/syslog/syslog_monitoring.rb', line 10

def get_syslog_ref()
	return @syslog_ref
end

#raw_severityObject



22
23
24
# File 'lib/monitor/server/syslog/syslog_monitoring.rb', line 22

def raw_severity()
	return @severity
end

#severityObject



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

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