Class: PEClient::Resource::MetricsV1 Deprecated
- Inherits:
-
BaseWithPort
- Object
- BaseWithPort
- PEClient::Resource::MetricsV1
- Defined in:
- lib/pe_client/resources/metrics.v1.rb
Overview
Deprecated.
Use MetricsV2 instead.
Puppet Enterprise (PE) includes an optional web endpoint for Java Management Extension (JMX) metrics managed beans (MBeans).
Constant Summary collapse
- BASE_PATH =
The base path for Metrics API v1 endpoints.
"/metrics/v1"- PORT =
Default Metrics v1 API Port
8140
Instance Method Summary collapse
-
#get(metrics) ⇒ Hash+
Retrieves requested MBean metrics.
-
#mbeans ⇒ Hash
Lists available MBeans.
Methods inherited from BaseWithPort
Constructor Details
This class inherits a constructor from PEClient::Resource::BaseWithPort
Instance Method Details
#get(metrics) ⇒ Hash+
Retrieves requested MBean metrics.
45 46 47 48 49 50 51 |
# File 'lib/pe_client/resources/metrics.v1.rb', line 45 def get(metrics) if metrics.is_a?(String) @client.get "#{BASE_PATH}/mbeans/#{metrics}" else @client.post "#{BASE_PATH}/mbeans", body: metrics end end |
#mbeans ⇒ Hash
Lists available MBeans.
36 37 38 |
# File 'lib/pe_client/resources/metrics.v1.rb', line 36 def mbeans @client.get "#{BASE_PATH}/mbeans" end |