Class: PEClient::Resource::StatusV1
- Defined in:
- lib/pe_client/resources/status.v1.rb
Overview
You can use the status API to check the health of Puppet Enterprise (PE) components and services. It is useful for automatically monitoring your infrastructure, removing unhealthy service instances from a load-balanced pool, checking configuration values, or troubleshooting issues in PE.
Constant Summary collapse
- BASE_PATH =
The base path for Status API v1 endpoints.
"/status/v1"- CONSOLE_SERVICES_PORT =
Default Console Services Status API Port
4433- PUPPET_SERVER_PORT =
Default Puppet Server Status API Port
8140- ORCHESTRATOR_PORT =
Default Orchestrator Status API Port
8143- PUPPETDB_PORT =
Default PuppetDB Status API Port
8081
Instance Method Summary collapse
-
#console_services(service_name: nil, level: nil, timeout: nil) ⇒ Hash
The services endpoints provide machine-consumable information about running services.
-
#console_simple(service_name: nil) ⇒ String
The status service plaintext endpoints are intended for load balancers that don’t support JSON parsing or parameter setting.
-
#orchestrator_services(service_name: nil, level: nil, timeout: nil) ⇒ Hash
The services endpoints provide machine-consumable information about running services.
-
#orchestrator_simple(service_name: nil) ⇒ String
The status service plaintext endpoints are intended for load balancers that don’t support JSON parsing or parameter setting.
-
#pe_jruby_metrics(level: "debug") ⇒ Hash
Returns information about the JRuby pools from which Puppet Server fulfills agent requests.
-
#pe_master(level: "debug") ⇒ Hash
Returns information about the routes that agents use to connect to the primary server.
-
#pe_puppet_profiler(level: "debug") ⇒ Hash
Returns statistics about catalog compilation.
-
#puppet_server_services(service_name: nil, level: nil, timeout: nil) ⇒ Hash
The services endpoints provide machine-consumable information about running services.
-
#puppet_server_simple(service_name: nil) ⇒ String
The status service plaintext endpoints are intended for load balancers that don’t support JSON parsing or parameter setting.
-
#puppetdb_services(service_name: nil, level: nil, timeout: nil) ⇒ Hash
The services endpoints provide machine-consumable information about running services.
-
#puppetdb_simple(service_name: nil) ⇒ String
The status service plaintext endpoints are intended for load balancers that don’t support JSON parsing or parameter setting.
Methods inherited from Base
Constructor Details
This class inherits a constructor from PEClient::Resource::Base
Instance Method Details
#console_services(service_name: nil, level: nil, timeout: nil) ⇒ Hash
The services endpoints provide machine-consumable information about running services. They are intended for scripting and integration with other services.
60 61 62 |
# File 'lib/pe_client/resources/status.v1.rb', line 60 def console_services(service_name: nil, level: nil, timeout: nil) services :console_services, service_name:, level:, timeout: end |
#console_simple(service_name: nil) ⇒ String
The status service plaintext endpoints are intended for load balancers that don’t support JSON parsing or parameter setting. These endpoints return simple string bodies (either the service’s state or a simple error message) and a relevant status code.
107 108 109 |
# File 'lib/pe_client/resources/status.v1.rb', line 107 def console_simple(service_name: nil) simple :console_services, service_name: end |
#orchestrator_services(service_name: nil, level: nil, timeout: nil) ⇒ Hash
The services endpoints provide machine-consumable information about running services. They are intended for scripting and integration with other services.
81 82 83 |
# File 'lib/pe_client/resources/status.v1.rb', line 81 def orchestrator_services(service_name: nil, level: nil, timeout: nil) services :orchestrator, service_name:, level:, timeout: end |
#orchestrator_simple(service_name: nil) ⇒ String
The status service plaintext endpoints are intended for load balancers that don’t support JSON parsing or parameter setting. These endpoints return simple string bodies (either the service’s state or a simple error message) and a relevant status code.
128 129 130 |
# File 'lib/pe_client/resources/status.v1.rb', line 128 def orchestrator_simple(service_name: nil) simple :orchestrator, service_name: end |
#pe_jruby_metrics(level: "debug") ⇒ Hash
Returns information about the JRuby pools from which Puppet Server fulfills agent requests.
146 147 148 |
# File 'lib/pe_client/resources/status.v1.rb', line 146 def pe_jruby_metrics(level: "debug") services :puppet_server, service_name: "pe-jruby-metrics", level: end |
#pe_master(level: "debug") ⇒ Hash
Returns information about the routes that agents use to connect to the primary server.
155 156 157 |
# File 'lib/pe_client/resources/status.v1.rb', line 155 def pe_master(level: "debug") services :puppet_server, service_name: "pe-master", level: end |
#pe_puppet_profiler(level: "debug") ⇒ Hash
Returns statistics about catalog compilation. You can use this data to discover which functions or resources are consuming the most resources or are most frequently used.
165 166 167 |
# File 'lib/pe_client/resources/status.v1.rb', line 165 def pe_puppet_profiler(level: "debug") services :puppet_server, service_name: "pe-puppet-profiler", level: end |
#puppet_server_services(service_name: nil, level: nil, timeout: nil) ⇒ Hash
The services endpoints provide machine-consumable information about running services. They are intended for scripting and integration with other services.
71 72 73 |
# File 'lib/pe_client/resources/status.v1.rb', line 71 def puppet_server_services(service_name: nil, level: nil, timeout: nil) services :puppet_server, service_name:, level:, timeout: end |
#puppet_server_simple(service_name: nil) ⇒ String
The status service plaintext endpoints are intended for load balancers that don’t support JSON parsing or parameter setting. These endpoints return simple string bodies (either the service’s state or a simple error message) and a relevant status code.
118 119 120 |
# File 'lib/pe_client/resources/status.v1.rb', line 118 def puppet_server_simple(service_name: nil) simple :puppet_server, service_name: end |
#puppetdb_services(service_name: nil, level: nil, timeout: nil) ⇒ Hash
The services endpoints provide machine-consumable information about running services. They are intended for scripting and integration with other services.
90 91 92 |
# File 'lib/pe_client/resources/status.v1.rb', line 90 def puppetdb_services(service_name: nil, level: nil, timeout: nil) services :puppetdb, service_name:, level:, timeout: end |
#puppetdb_simple(service_name: nil) ⇒ String
The status service plaintext endpoints are intended for load balancers that don’t support JSON parsing or parameter setting. These endpoints return simple string bodies (either the service’s state or a simple error message) and a relevant status code.
137 138 139 |
# File 'lib/pe_client/resources/status.v1.rb', line 137 def puppetdb_simple(service_name: nil) simple :puppetdb, service_name: end |