Class: PEClient::Resource::PuppetDB::AdminV1
- Defined in:
- lib/pe_client/resources/puppet_db/admin.v1.rb,
lib/pe_client/resources/puppet_db/admin.v1/archive.rb
Overview
PuppetDB’s administration API endpoints can be used for importing and exporting PuppetDB archives, triggering PuppetDB maintenance operations or to directly deleting a node, and generating information about the way your PuppetDB installation is using postgres.
Defined Under Namespace
Classes: Archive
Constant Summary collapse
Instance Method Summary collapse
- #archive ⇒ PEClient::Resource::PuppetDB::AdminV1::Archive
-
#cmd(command:, version:, payload:) ⇒ Hash
The cmd endpoint can be used to trigger PuppetDB maintenance operations or to directly delete a node.
-
#summary_stats ⇒ Hash
The summary-stats endpoint is used to generate information about the way your PuppetDB installation is using postgres.
Methods inherited from Base
Constructor Details
This class inherits a constructor from PEClient::Resource::Base
Instance Method Details
#archive ⇒ PEClient::Resource::PuppetDB::AdminV1::Archive
62 63 64 65 |
# File 'lib/pe_client/resources/puppet_db/admin.v1.rb', line 62 def archive require_relative "admin.v1/archive" @archive ||= AdminV1::Archive.new(@client) end |
#cmd(command:, version:, payload:) ⇒ Hash
The cmd endpoint can be used to trigger PuppetDB maintenance operations or to directly delete a node. Admin commands are processed synchronously separate from other PuppetDB commands.
43 44 45 |
# File 'lib/pe_client/resources/puppet_db/admin.v1.rb', line 43 def cmd(command:, version:, payload:) @client.post "#{BASE_PATH}/cmd", body: {command:, version:, payload:} end |
#summary_stats ⇒ Hash
This endpoint will execute a number of relatively expensive SQL commands against your database. It will not meaningfully impede performance of a running PuppetDB instance, but the request may take several minutes to complete.
The summary-stats endpoint is used to generate information about the way your PuppetDB installation is using postgres. Its intended purpose at this time is to aid in diagnosis of support issues, though users may find it independently useful.
57 58 59 |
# File 'lib/pe_client/resources/puppet_db/admin.v1.rb', line 57 def summary_stats @client.get "#{BASE_PATH}/summary-stats" end |