Class: LogStash::Api::Commands::Base
- Inherits:
-
Object
- Object
- LogStash::Api::Commands::Base
- Defined in:
- lib/logstash/api/commands/base.rb
Direct Known Subclasses
DefaultMetadata, Node, Stats, System::BasicInfo, System::Plugins
Instance Attribute Summary collapse
-
#service ⇒ Object
readonly
Returns the value of attribute service.
Instance Method Summary collapse
- #extract_metrics(path, *keys) ⇒ Object
-
#initialize(service = LogStash::Api::Service.instance) ⇒ Base
constructor
A new instance of Base.
- #started_at ⇒ Object
- #uptime ⇒ Object
Constructor Details
Instance Attribute Details
#service ⇒ Object (readonly)
Returns the value of attribute service.
7 8 9 |
# File 'lib/logstash/api/commands/base.rb', line 7 def service @service end |
Instance Method Details
#extract_metrics(path, *keys) ⇒ Object
21 22 23 |
# File 'lib/logstash/api/commands/base.rb', line 21 def extract_metrics(path, *keys) service.extract_metrics(path, *keys) end |
#started_at ⇒ Object
17 18 19 |
# File 'lib/logstash/api/commands/base.rb', line 17 def started_at (LogStash::Agent::STARTED_AT.to_f * 1000.0).to_i end |
#uptime ⇒ Object
13 14 15 |
# File 'lib/logstash/api/commands/base.rb', line 13 def uptime service.agent.uptime end |