|
NAMEjail_exporter —
Prometheus exporter for jail metrics
SYNOPSIS
DESCRIPTIONCommand Line Argumentsjail_exporter is a Prometheus exporter for jail metrics.
The options are as follows:
Sub-Commandsjail_exporter also features a
bcrypt sub-command, useful for hashing the passwords
used for HTTP Basic authentication. This sub-command features the following
arguments:
HTTP Basic Authentication ConfigurationHTTP basic authentication is configured via a YAML configuration file. The format of this file follows the suggestions of the Prometheus exporter-toolkit. This authentication configuration consists of a “basic_auth_users” key which is a map of usernames to bcrypt hashed passwords. These hashes can be generated with thejail_exporter bcrypt
sub-command or any other utility capable of generating bcrypt hashes. Any keys
in the file other than “basic_auth_users” are ignored.
An example HTTP basic authentication configuration can be found in the EXAMPLES section. USAGEjail_exporter must be run as “root” in
order to access the required
rctl(8)
APIs. Although FreeBSD ships with RACCT/RCTL support
in the kernel, it is disabled by default. It can be enabled by setting
kern.racct.enable=“1”
in /boot/loader.conf. After setting this, a reboot
will be required to enable RACCT/RCTL.
METRICSThe metrics that are exported are those listed in the RESOURCES section of rctl(8), and the following additional metrics:
All metrics are prefixed with the string “jail_” and in most cases (except for the metrics mentioned above) possess a “name” label containing the name of the jail. An example of a metric output by the exporter would be: # HELP jail_cputime_seconds_total CPU time, in seconds # TYPE jail_cputime_seconds_total counter jail_cputime_seconds_total{name="test"} 300 ENVIRONMENT VARIABLESjail_exporter can also take its configuration from
environment variables. In the event that both command line options and
environment variables are specified, the command line options will win.
FILES
EXAMPLESHTTP Basic AuthenticationSimple configuration file for two users:--- basic_auth_users: foo:
'$2b$12$cGBwrALG2Crkm5jPdvzlG.R8.j8LMeCEecm4y/So6YVd4YiIrfqsW' bar:
'$2b$12$8c6yHGFexzAvbtNSHV3WNO0zJoaWfDy9WqX7s8vCAajV08LE/cW06' Sub-CommandsGenerating a bcrypt password hash by specifying the password on the command line using the default bcrypt cost:$ jail_exporter bcrypt
foopass Generating a random bcrypt password hash with an increased cost and custom length: $ jail_exporter bcrypt --random
--cost 14 --length 48 Generating a bcrypt password via the interactive prompt: $ jail_exporter bcrypt SEE ALSOrctl(4), loader.conf(5), ports(7), jail(8), rc(8), rctl(8)HISTORYjail_exporter was started during the summer of 2018 on
FreeBSD 11.1.
AUTHORSjail_exporter was developed by David
O'Rourke with contributions from
Fabian Freyer. BUGSPlease report bugs, issues, and feature requests to https://github.com/phyber/jail_exporter/issues
Visit the GSP FreeBSD Man Page Interface. |