Class: Monit::Server

Inherits:
Object
  • Object
show all
Defined in:
lib/monit/server.rb

Overview

The server section from the Monit XML

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Server

Returns a new instance of Server.



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/monit/server.rb', line 6

def initialize(options = {})
  @id = options["id"]
  @incarnation = options["incarnation"]
  @version = options["version"]
  @uptime = options["uptime"].to_i
  @poll = options["poll"].to_i
  @startdelay = options["startdelay"].to_i
  @localhostname = options["localhostname"]
  @controlfile = options["controlfile"]
  @httpd = options["httpd"].is_a?(HTTPD) ? options["httpd"] : HTTPD.new(options["httpd"])
end

Instance Attribute Details

#controlfileObject (readonly)

Returns the value of attribute controlfile.



4
5
6
# File 'lib/monit/server.rb', line 4

def controlfile
  @controlfile
end

#httpdObject (readonly)

Returns the value of attribute httpd.



4
5
6
# File 'lib/monit/server.rb', line 4

def httpd
  @httpd
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/monit/server.rb', line 4

def id
  @id
end

#incarnationObject (readonly)

Returns the value of attribute incarnation.



4
5
6
# File 'lib/monit/server.rb', line 4

def incarnation
  @incarnation
end

#localhostnameObject (readonly)

Returns the value of attribute localhostname.



4
5
6
# File 'lib/monit/server.rb', line 4

def localhostname
  @localhostname
end

#pollObject (readonly)

Returns the value of attribute poll.



4
5
6
# File 'lib/monit/server.rb', line 4

def poll
  @poll
end

#startdelayObject (readonly)

Returns the value of attribute startdelay.



4
5
6
# File 'lib/monit/server.rb', line 4

def startdelay
  @startdelay
end

#uptimeObject (readonly)

Returns the value of attribute uptime.



4
5
6
# File 'lib/monit/server.rb', line 4

def uptime
  @uptime
end

#versionObject (readonly)

Returns the value of attribute version.



4
5
6
# File 'lib/monit/server.rb', line 4

def version
  @version
end