voxpupuli / puppet-healthcheck Goto Github PK
View Code? Open in Web Editor NEWPuppet resources to evaluate the health and status of things.
Home Page: https://forge.puppet.com/puppet/healthcheck
License: Apache License 2.0
Puppet resources to evaluate the health and status of things.
Home Page: https://forge.puppet.com/puppet/healthcheck
License: Apache License 2.0
http_conn_validator { 'influxdb-conn-validator_auth' :
host => 'localhost',
port => 8086,
use_ssl => false,
test_url => '/health',
try_sleep => 5,
}
Notice: Unable to connect to the server (http://localhost:8086/health): undefined method `fetch' for nil:NilClass
Notice: Failed to make an HTTP connection; sleeping 5 seconds before retry
Notice: Unable to connect to the server (http://localhost:8086/health): undefined method `fetch' for nil:NilClass
Notice: Failed to make an HTTP connection; sleeping 5 seconds before retry
Notice: Unable to connect to the server (http://localhost:8086/health): undefined method `fetch' for nil:NilClass
Notice: Failed to make an HTTP connection; sleeping 5 seconds before retry
Notice: Unable to connect to the server (http://localhost:8086/health): undefined method `fetch' for nil:NilClass
Notice: Failed to make an HTTP connection; sleeping 5 seconds before retry
Notice: Unable to connect to the server (http://localhost:8086/health): undefined method `fetch' for nil:NilClass
Notice: Failed to make an HTTP connection; sleeping 5 seconds before retry
Notice: Unable to connect to the server (http://localhost:8086/health): undefined method `fetch' for nil:NilClass
Notice: Failed to make an HTTP connection; sleeping 5 seconds before retry
Notice: Unable to connect to the server (http://localhost:8086/health): undefined method `fetch' for nil:NilClass
Notice: Failed to make an HTTP connection; sleeping 5 seconds before retry
Notice: Unable to connect to the server (http://localhost:8086/health): undefined method `fetch' for nil:NilClass
Notice: Failed to make an HTTP connection; sleeping 5 seconds before retry
Notice: Unable to connect to the server (http://localhost:8086/health): undefined method `fetch' for nil:NilClass
Notice: Failed to make an HTTP connection; sleeping 5 seconds before retry
Notice: Unable to connect to the server (http://localhost:8086/health): undefined method `fetch' for nil:NilClass
Notice: Failed to make an HTTP connection; sleeping 5 seconds before retry
Notice: Unable to connect to the server (http://localhost:8086/health): undefined method `fetch' for nil:NilClass
Notice: Failed to make an HTTP connection; sleeping 5 seconds before retry
Notice: Unable to connect to the server (http://localhost:8086/health): undefined method `fetch' for nil:NilClass
Notice: Failed to make an HTTP connection; sleeping 5 seconds before retry
Notice: Unable to connect to the server (http://localhost:8086/health): undefined method `fetch' for nil:NilClass
Notice: Failed to make an HTTP connection within timeout window of 60 seconds; giving up.
Notice: /Stage[main]/Influxdb/Http_conn_validator[influxdb-conn-validator_auth]/ensure: current_value 'absent', should be 'present' (noop) (corrective)
Debug: /Stage[main]/Influxdb/Http_conn_validator[influxdb-conn-validator_auth]: The container Class[Influxdb] will propagate my refresh event
Seems arguments are not to get passed on...
Works fine on 1.0.1
time puppet apply --debug -e "tcp_conn_validator { '1.2.3.4:443': timeout => 10}"
The Tcp_conn_validator resource takes 2 minutes to execute.
The Tcp_conn_validator should fail after 10 seconds.
[...]
Info: Applying configuration version '1709733218'
Notice: Failed to connect to the host within timeout window of 10 seconds; giving up.
Error: Unable to connect to the host. (1.2.3.4:443)
Error: /Stage[main]/Main/Tcp_conn_validator[1.2.3.4:443]/ensure: change from 'absent' to 'present' failed: Unable to connect to the host. (1.2.3.4:443)
Debug: Class[Main]: Resource is being skipped, unscheduling all events
Debug: Stage[main]: Resource is being skipped, unscheduling all events
Debug: Finishing transaction 12780
Debug: Storing state
Debug: Pruned old state cache entries in 0.00 seconds
Debug: Stored state in 0.01 seconds
Notice: Applied catalog in 120.12 seconds
[...]
The 2 minutes timeout seems to be the http_connect_timeout of Puppet, which is used in https://github.com/voxpupuli/puppet-healthcheck/blob/master/lib/puppet_x/puppet-community/tcp_validator.rb#L31 . I think this timeout should at least be configurable. And it should be at most the timeout of the Tcp_conn_resource.
When running a Puppet run containing tcp_conn_validator
I saw this warning emitted by Puppet:
Warning: Accessing 'configtimeout' as a setting is deprecated.
(location: /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/settings.rb:1165:in `issue_deprecation_warning')
and traced it back to this line: https://github.com/voxpupuli/puppet-healthcheck/blob/master/lib/puppet_x/puppet-community/tcp_validator.rb#L31
http_validator.rb uses deprecated
conn = Puppet::Network::HttpPool.http_instance(http_server, http_port, use_ssl, verify_peer)
which leads to warnings in newer Puppet versions
Warning: The method 'Puppet::Network::HttpPool.http_instance' is deprecated. Use Puppet.runtime[:http] instead
(file & line not available)
See here:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.