cf-hub
cf-hub
connects to cf-serverd
instances to collect data
about a host managed by CFEngine. cf-agent
and cf-monitord
both store data at host in local databases. cf-hub
connects to a
cf-serverd
instance running at a host and collect the data into its own
central database. cf-hub
automatically schedules data collection from hosts
that have registered a connection with a collocated cf-serverd
cf-hub
keeps the promises made in common
, and is affected by
common
and hub
control bodies.
cf-hub
collects data generated from the default run only, what you'd
get if you ran cf-agent
without specifying a file name. This is to
avoid reporting on data generated by test or extraordinary executions.
Notes:
cf-hub
always considers the classhub
to be defined.
Command reference
--continuous , -c value - Continuous update mode of operation. Number of report gathering iterations can be specified.
--color , -C value - Enable colorized output. Possible values: 'always', 'auto', 'never'. If option is used, the default value is 'auto'
--debug , -d value - Set debugging level 0,1,2,3
--file , -f value - Specify an alternative input file than the default
--no-fork , -F - Run as a foreground processes (do not fork)
--log-level , -g value - Specify how detailed logs should be. Possible values: 'error', 'warning', 'notice', 'info', 'verbose', 'debug'
--help , -h - Print the help message
--query-host , -H value - Remote hosts to gather reports from (for -q)
--inject-hosts, -i value - Inject and trust hosts from a hosts file (mapping IPs to public key file paths, one entry per line)
--inform , -I - Print basic information about actions taken
--no-lock , -K - Ignore locking constraints during execution (ifelapsed/expireafter) if "too soon" to run
--logging , -l - Enable logging of report collection and maintenance to hub_log in the log directory
--show-license, -L value - Show license information for this hub. Searches default locations, or specify a filename.
--manpage , -M - Print the man page
--dry-run , -n - All talk and no action mode - make no changes, only inform of promises not kept
--query , -q value - Collect reports from remote host. Value is 'rebase' or 'delta'. -H option is required.
--splay_updates, -s - Splay/load balance full-updates, overriding bootstrap times, assuming a default 5 minute update schedule.
--timestamp , -t - Log timestamps on each line of log output
--query-timeout, -T value - Connection timeout for querying clients (seconds)
--verbose , -v - Output verbose information about the behaviour of the agent
--version , -V - Output the version of the software
Control Promises
body hub control
{
export_zenoss => "/var/www/reports/summary.z";
}
exclude_hosts
Description: A list of IP addresses of hosts to exclude from report collection
This list of IP addresses will not be queried for reports by cf-hub
, even
though they are in the last-seen database.
The lists may contain network addresses in CIDR notation or regular expressions to match the IP address. However, host names are currently not supported.
Type: slist
Allowed input range: (arbitrary string)
Example:
body hub control
{
exclude_hosts => { "192.168.12.21", "10.10", "10.12.*" };
}
Notes:
History: Was introduced in 3.3.0, Enterprise 2.1.1 (2011)
hub_schedule
Description: List of classes indicating when pull collection round should be initiated.
Type: slist
Allowed input range: (arbitrary string)
Default value: { "Min00", "Min05", "Min10", "Min15", "Min20", "Min25", "Min30", "Min35", "Min40", "Min45", "Min50", "Min55" }
Example:
body hub control
{
# Collect reports every at the top and half of the hour. Additionally collect
# reports during the evening or night between Minute 45 and 50.
hub_schedule => { "Min00", "Min30", "(Evening|Night).Min45_50" };
}
History:
- Introduced in version 3.1.0b1, Enterprise 2.0.0b1 (2010)
query_timeout
Description: Timeout (s) for connecting to host when querying.
Type: int
Allowed input range: (0,300)
Default value: 30
Example:
body hub control
{
# Configure network connection timeout when connecting to hosts
# for querying reporting data.
query_timeout => "10";
}
Notes:
This timeout is for individual connection attempts.
cf-hub
will retry many times if it fails to connect.
The total time it uses for one host before giving up can be up to 10 times the configured query_timeout
.
Also note that this value is passed to the underlying OS code (select()
), there is no guarantee that it will wait for that long.
This parameter can also be set using the command line option, --query-timeout
.
If specified in both policy and command line, the command line option takes precedence.
If one of the options (command line or policy) specifies 0
, the other one is used.
If both are not specified (or 0
), the default is used.
History:
- Introduced in version 3.15.0
port
Description: Default port for contacting hosts
Type: int
Allowed input range: 1024,99999
Default value: 5308
Examples:
body hub control
{
port => "5308";
}
body server control
{
specialhost::
port => "5308";
!specialhost::
port => "5308";
}
Notes:
The standard or registered port number is tcp/5308. CFEngine does not presently use its registered udp port with the same number, but this could change in the future.
Changing the standard port number is not recommended practice. You should not do it without a good reason.
client_history_timeout
Description: If the hub can't reach a client for this many (or more) hours, it will not collect the missed reports and it will continue collection from current time. This is done to speed-up report collection and minimize data transfer. The default value is 6 hours.
Type: int
Allowed input range: 1,65535
Default value: 6
Examples:
body hub control
{
client_history_timeout => 6;
}
History: Was introduced in version 3.6.4 and is not compatible with older CFEngine versions.
Deprecated attributes
export_zenoss
History:
- deprecated in 3.6.0
- introduced in version 3.1.0, Enterprise 2.0.0 (2010)