Forge Home

healthcheck

Puppet resources to evaluate the health and status of things

278,332 downloads

2,423 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 2.1.0 (latest)
  • 2.0.0
  • 1.0.1
  • 1.0.0
  • 0.4.1
  • 0.4.0
  • 0.3.0
  • 0.2.0
  • 0.1.0
released Apr 30th 2024
This version is compatible with:
  • Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
  • Puppet >= 7.0.0 < 9.0.0
  • , , , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'puppet-healthcheck', '2.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppet-healthcheck
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppet-healthcheck --version 2.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

puppet/healthcheck — version 2.1.0 Apr 30th 2024

puppet-healthcheck

Types

tcp_conn_validator

tcp_conn_validator is used to verify that a service is listening on a given port. It could be used to test either a remote or a local service. It support both IPv4 and IPv6 connection strings. It also works with hostname.

tcp_conn_validator { 'foo-machine ssh service' :
  host => '192.168.0.42',
  port   => 22,
}

The namevar of this resource can also be the connection string. It comes handy when one already have an array of ip:port or hostname:port string to test.

mongodb_cluster_nodes = ['192.168.0.2:27017', 'node02.foo.bar.com:27017']
tcp_conn_validator { $mongodb_cluster_nodes : }

host

IP address or server DNS name on which the service is supposed to be bound to. Required if the namevar is not a connection string.

port

Port on which the service is supposed to listen. Required if the namevar is not a connection string.

try_sleep

The time to sleep in seconds between ‘tries’. Default: 1

timeout

Number of seconds to wait before timing out. Default: 60

http_conn_validator

http_conn_validator is used to verify that an http server is answering on a given port. It could be used to test either a remote or a local service. It support both IPv4 and IPv6 connection strings. It also works with hostname.

It currently has the Accept header hardcoded to application/json, you can only connect to sites that return json

See https://github.com/voxpupuli/puppet-healthcheck/blob/b3723805d629cc01767a2fb12c4c8a023d707f94/lib/puppet_x/puppet-community/http_validator.rb#L19 for details

http_conn_validator { 'foo-machine home' :
  host    => '127.0.0.1',
  port    => 80,
  use_ssl => true,
}

The namevar of this resource can also be the connection string. It comes handy when one already have an array of URLs string to test.

appli_cluster_nodes = ['https://server1.com/test-url', 'https://server2.com/test-url']
http_conn_validator { $appli_cluster_nodes : }

host

IP address or server DNS name on which the service is supposed to be bound to. Required if the namevar is not a connection string.

port

Port on which the service is supposed to listen. Required if the namevar is not a connection string.

use_ssl

Whether the connection will be attempted using https. Default: false

test_url

URL to use for testing if the HTTP server is up. Default: /

try_sleep

The time to sleep in seconds between ‘tries’. Default: 1

timeout

Number of seconds to wait before timing out. Default: 60

expected_code

Expected HTTP result code to consider success. Default: 200

verify_peer

Whether to verify the peer credentials, if possible. Verification will not take place if the CA certificate is missing