Class: PEClient::Resource::MetricsV2
- Inherits:
-
BaseWithPort
- Object
- BaseWithPort
- PEClient::Resource::MetricsV2
- Defined in:
- lib/pe_client/resources/metrics.v2.rb
Overview
The Metrics v2 endpoints use the Jolokia library for Java Management Extension (JMX) metrics to query Orchestrator service metrics.
Constant Summary collapse
- BASE_PATH =
The base path for Metrics API v2 endpoints.
"/metrics/v2"- PORT =
Default Metrics v2 API Port
8081
Instance Method Summary collapse
-
#complex_read(body) ⇒ Hash
Use more complicated queries to retrieve orchestrator service metrics data or metadata.
-
#list ⇒ Hash
Get a list of all valid MBeans.
-
#read(mbean_names:, attributes:, inner_path_filter: nil) ⇒ Hash
Retrieve orchestrator service metrics data or metadata.
Methods inherited from BaseWithPort
Constructor Details
This class inherits a constructor from PEClient::Resource::BaseWithPort
Instance Method Details
#complex_read(body) ⇒ Hash
Use more complicated queries to retrieve orchestrator service metrics data or metadata.
60 61 62 |
# File 'lib/pe_client/resources/metrics.v2.rb', line 60 def complex_read(body) @client.post "#{BASE_PATH}/read", body: end |
#list ⇒ Hash
Get a list of all valid MBeans
34 35 36 |
# File 'lib/pe_client/resources/metrics.v2.rb', line 34 def list @client.get "#{BASE_PATH}/list" end |
#read(mbean_names:, attributes:, inner_path_filter: nil) ⇒ Hash
Retrieve orchestrator service metrics data or metadata.
47 48 49 50 51 |
# File 'lib/pe_client/resources/metrics.v2.rb', line 47 def read(mbean_names:, attributes:, inner_path_filter: nil) path = "#{BASE_PATH}/read/#{mbean_names}/#{attributes}" path += "/#{inner_path_filter}" if inner_path_filter @client.get path end |