Class: Bark::Server
- Inherits:
-
Object
- Object
- Bark::Server
- Defined in:
- lib/bark/server.rb
Overview
The Server class hits the Status Monit API endpoint and then segments it accordingly
Instance Method Summary collapse
-
#control_file ⇒ String
Retrieves the platform's control file path.
-
#hostname ⇒ String
Retrieves the platform's hostname.
-
#httpd ⇒ Hash
Retrieves the platform's httpd instance object.
-
#httpd_address ⇒ String
Retrieves the platform's httpd instance address / hostname.
-
#httpd_port ⇒ String
Retrieves the platform's httpd instance port number.
-
#httpd_ssl ⇒ String
Retrieves the platform's httpd instance SSL boolean (binary).
-
#id ⇒ String
Retrieves the platform's id.
-
#incarnation ⇒ String
Retrieves the platform's incarnation.
-
#initialize(client) ⇒ Server
constructor
A new instance of Server.
-
#monit_version ⇒ String
Retrieves the platform's monit version number.
-
#poll ⇒ String
Retrieves the platform's polling rate.
-
#start_delay ⇒ String
Retrieves the platform's start delay time.
-
#status ⇒ Hash
Retrieves the server's status.
-
#uptime ⇒ String
Retrieves the platform's uptime.
Constructor Details
Instance Method Details
#control_file ⇒ String
Retrieves the platform's control file path
70 71 72 |
# File 'lib/bark/server.rb', line 70 def control_file @status.current[:monit][:server][:controlfile] end |
#hostname ⇒ String
Retrieves the platform's hostname
63 64 65 |
# File 'lib/bark/server.rb', line 63 def hostname @status.current[:monit][:server][:localhostname] end |
#httpd ⇒ Hash
Retrieves the platform's httpd instance object
77 78 79 |
# File 'lib/bark/server.rb', line 77 def httpd @status.current[:monit][:server][:httpd] end |
#httpd_address ⇒ String
Retrieves the platform's httpd instance address / hostname
84 85 86 |
# File 'lib/bark/server.rb', line 84 def httpd_address @status.current[:monit][:server][:httpd][:address] end |
#httpd_port ⇒ String
Retrieves the platform's httpd instance port number
91 92 93 |
# File 'lib/bark/server.rb', line 91 def httpd_port @status.current[:monit][:server][:httpd][:port] end |
#httpd_ssl ⇒ String
Retrieves the platform's httpd instance SSL boolean (binary)
98 99 100 |
# File 'lib/bark/server.rb', line 98 def httpd_ssl @status.current[:monit][:server][:httpd][:ssl] end |
#id ⇒ String
Retrieves the platform's id
21 22 23 |
# File 'lib/bark/server.rb', line 21 def id @status.current[:monit][:server][:id] end |
#incarnation ⇒ String
Retrieves the platform's incarnation
28 29 30 |
# File 'lib/bark/server.rb', line 28 def incarnation @status.current[:monit][:server][:incarnation] end |
#monit_version ⇒ String
Retrieves the platform's monit version number
35 36 37 |
# File 'lib/bark/server.rb', line 35 def monit_version @status.current[:monit][:server][:version] end |
#poll ⇒ String
Retrieves the platform's polling rate
49 50 51 |
# File 'lib/bark/server.rb', line 49 def poll @status.current[:monit][:server][:poll] end |
#start_delay ⇒ String
Retrieves the platform's start delay time
56 57 58 |
# File 'lib/bark/server.rb', line 56 def start_delay @status.current[:monit][:server][:startdelay] end |
#status ⇒ Hash
Retrieves the server's status
14 15 16 |
# File 'lib/bark/server.rb', line 14 def status @status.current[:monit][:server] end |
#uptime ⇒ String
Retrieves the platform's uptime
42 43 44 |
# File 'lib/bark/server.rb', line 42 def uptime @status.current[:monit][:server][:uptime] end |