Next: , Previous: , Up: Services   [Contents][Index]


10.8.15 Monitoring Services

Tailon Service

Tailon is a web application for viewing and searching log files.

The following example will configure the service with default values. By default, Tailon can be accessed on port 8080 (http://localhost:8080).

(service tailon-service-type)

The following example customises more of the Tailon configuration, adding sed to the list of allowed commands.

(service tailon-service-type
         (tailon-configuration
           (config-file
             (tailon-configuration-file
               (allowed-commands '("tail" "grep" "awk" "sed"))))))
Data Type: tailon-configuration

Data type representing the configuration of Tailon. This type has the following parameters:

config-file (default: (tailon-configuration-file))

The configuration file to use for Tailon. This can be set to a tailon-configuration-file record value, or any gexp (see G-Expressions).

For example, to instead use a local file, the local-file function can be used:

(service tailon-service-type
         (tailon-configuration
           (config-file (local-file "./my-tailon.conf"))))
package (default: tailon)

The tailon package to use.

Data Type: tailon-configuration-file

Data type representing the configuration options for Tailon. This type has the following parameters:

files (default: (list "/var/log"))

List of files to display. The list can include strings for a single file or directory, or a list, where the first item is the name of a subsection, and the remaining items are the files or directories in that subsection.

bind (default: "localhost:8080")

Address and port to which Tailon should bind on.

relative-root (default: #f)

URL path to use for Tailon, set to #f to not use a path.

allow-transfers? (default: #t)

Allow downloading the log files in the web interface.

follow-names? (default: #t)

Allow tailing of not-yet existent files.

tail-lines (default: 200)

Number of lines to read initially from each file.

allowed-commands (default: (list "tail" "grep" "awk"))

Commands to allow running. By default, sed is disabled.

debug? (default: #f)

Set debug? to #t to show debug messages.

wrap-lines (default: #t)

Initial line wrapping state in the web interface. Set to #t to initially wrap lines (the default), or to #f to initially not wrap lines.

http-auth (default: #f)

HTTP authentication type to use. Set to #f to disable authentication (the default). Supported values are "digest" or "basic".

users (default: #f)

If HTTP authentication is enabled (see http-auth), access will be restricted to the credentials provided here. To configure users, use a list of pairs, where the first element of the pair is the username, and the 2nd element of the pair is the password.

(tailon-configuration-file
  (http-auth "basic")
  (users     '(("user1" . "password1")
               ("user2" . "password2"))))

Darkstat Service

Darkstat is a packet sniffer that captures network traffic, calculates statistics about usage, and serves reports over HTTP.

Variable: Scheme Variable darkstat-service-type

This is the service type for the darkstat service, its value must be a darkstat-configuration record as in this example:

(service darkstat-service-type
         (darkstat-configuration
           (interface "eno1")))
Data Type: darkstat-configuration

Data type representing the configuration of darkstat.

package (default: darkstat)

The darkstat package to use.

interface

Capture traffic on the specified network interface.

port (default: "667")

Bind the web interface to the specified port.

bind-address (default: "127.0.0.1")

Bind the web interface to the specified address.

base (default: "/")

Specify the path of the base URL. This can be useful if darkstat is accessed via a reverse proxy.

Prometheus Node Exporter Service

The Prometheus “node exporter” makes hardware and operating system statistics provided by the Linux kernel available for the Prometheus monitoring system. This service should be deployed on all physical nodes and virtual machines, where monitoring these statistics is desirable.

Variable: Scheme variable prometheus-node-exporter-service-type

This is the service type for the prometheus-node-exporter service, its value must be a prometheus-node-exporter-configuration.

(service prometheus-node-exporter-service-type)
Data Type: prometheus-node-exporter-configuration

Data type representing the configuration of node_exporter.

package (default: go-github-com-prometheus-node-exporter)

The prometheus-node-exporter package to use.

web-listen-address (default: ":9100")

Bind the web interface to the specified address.

textfile-directory (default: "/var/lib/prometheus/node-exporter")

This directory can be used to export metrics specific to this machine. Files containing metrics in the text format, with the filename ending in .prom should be placed in this directory.

extra-options (default: '())

Extra options to pass to the Prometheus node exporter.

Zabbix server

Zabbix provides monitoring metrics, among others network utilization, CPU load and disk space consumption:

Available zabbix-server-configuration fields are:

zabbix-server-configuration parameter: package zabbix-server

The zabbix-server package.

zabbix-server-configuration parameter: string user

User who will run the Zabbix server.

Defaults to ‘"zabbix"’.

zabbix-server-configuration parameter: group group

Group who will run the Zabbix server.

Defaults to ‘"zabbix"’.

zabbix-server-configuration parameter: string db-host

Database host name.

Defaults to ‘"127.0.0.1"’.

zabbix-server-configuration parameter: string db-name

Database name.

Defaults to ‘"zabbix"’.

zabbix-server-configuration parameter: string db-user

Database user.

Defaults to ‘"zabbix"’.

zabbix-server-configuration parameter: string db-password

Database password. Please, use include-files with DBPassword=SECRET inside a specified file instead.

Defaults to ‘""’.

zabbix-server-configuration parameter: number db-port

Database port.

Defaults to ‘5432’.

zabbix-server-configuration parameter: string log-type

Specifies where log messages are written to:

Defaults to ‘""’.

zabbix-server-configuration parameter: string log-file

Log file name for log-type file parameter.

Defaults to ‘"/var/log/zabbix/server.log"’.

zabbix-server-configuration parameter: string pid-file

Name of PID file.

Defaults to ‘"/var/run/zabbix/zabbix_server.pid"’.

zabbix-server-configuration parameter: string ssl-ca-location

The location of certificate authority (CA) files for SSL server certificate verification.

Defaults to ‘"/etc/ssl/certs/ca-certificates.crt"’.

zabbix-server-configuration parameter: string ssl-cert-location

Location of SSL client certificates.

Defaults to ‘"/etc/ssl/certs"’.

zabbix-server-configuration parameter: string extra-options

Extra options will be appended to Zabbix server configuration file.

Defaults to ‘""’.

zabbix-server-configuration parameter: include-files include-files

You may include individual files or all files in a directory in the configuration file.

Defaults to ‘()’.

Zabbix agent

Zabbix agent gathers information for Zabbix server.

Available zabbix-agent-configuration fields are:

zabbix-agent-configuration parameter: package zabbix-agent

The zabbix-agent package.

zabbix-agent-configuration parameter: string user

User who will run the Zabbix agent.

Defaults to ‘"zabbix"’.

zabbix-agent-configuration parameter: group group

Group who will run the Zabbix agent.

Defaults to ‘"zabbix"’.

zabbix-agent-configuration parameter: string hostname

Unique, case sensitive hostname which is required for active checks and must match hostname as configured on the server.

Defaults to ‘""’.

zabbix-agent-configuration parameter: string log-type

Specifies where log messages are written to:

Defaults to ‘""’.

zabbix-agent-configuration parameter: string log-file

Log file name for log-type file parameter.

Defaults to ‘"/var/log/zabbix/agent.log"’.

zabbix-agent-configuration parameter: string pid-file

Name of PID file.

Defaults to ‘"/var/run/zabbix/zabbix_agent.pid"’.

zabbix-agent-configuration parameter: list server

List of IP addresses, optionally in CIDR notation, or hostnames of Zabbix servers and Zabbix proxies. Incoming connections will be accepted only from the hosts listed here.

Defaults to ‘("127.0.0.1")’.

zabbix-agent-configuration parameter: list server-active

List of IP:port (or hostname:port) pairs of Zabbix servers and Zabbix proxies for active checks. If port is not specified, default port is used. If this parameter is not specified, active checks are disabled.

Defaults to ‘("127.0.0.1")’.

zabbix-agent-configuration parameter: string extra-options

Extra options will be appended to Zabbix server configuration file.

Defaults to ‘""’.

zabbix-agent-configuration parameter: include-files include-files

You may include individual files or all files in a directory in the configuration file.

Defaults to ‘()’.

Zabbix front-end

This service provides a WEB interface to Zabbix server.

Available zabbix-front-end-configuration fields are:

zabbix-front-end-configuration parameter: nginx-server-configuration-list nginx

NGINX configuration.

zabbix-front-end-configuration parameter: string db-host

Database host name.

Defaults to ‘"localhost"’.

zabbix-front-end-configuration parameter: number db-port

Database port.

Defaults to ‘5432’.

zabbix-front-end-configuration parameter: string db-name

Database name.

Defaults to ‘"zabbix"’.

zabbix-front-end-configuration parameter: string db-user

Database user.

Defaults to ‘"zabbix"’.

zabbix-front-end-configuration parameter: string db-password

Database password. Please, use db-secret-file instead.

Defaults to ‘""’.

zabbix-front-end-configuration parameter: string db-secret-file

Secret file containing the credentials for the Zabbix front-end. The value must be a local file name, not a G-expression. You are expected to create this file manually. Its contents will be copied into zabbix.conf.php as the value of $DB['PASSWORD'].

Defaults to ‘""’.

zabbix-front-end-configuration parameter: string zabbix-host

Zabbix server hostname.

Defaults to ‘"localhost"’.

zabbix-front-end-configuration parameter: number zabbix-port

Zabbix server port.

Defaults to ‘10051’.


Next: , Previous: , Up: Services   [Contents][Index]