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


11.10.17 Servicios de monitorización

Servicio Tailon

Tailon es una aplicación web para la visualización y búsqueda en archivos de registro.

El ejemplo siguiente configura el servicio con los valores predeterminados. Por omisión, se puede acceder a Tailon en el puerto 8080 (http://localhost:8080).

(service tailon-service-type)

El ejemplo siguiente personaliza más la configuración de Tailon, añadiendo sed a la lista de órdenes permitidas.

(service tailon-service-type
         (tailon-configuration
           (config-file
             (tailon-configuration-file
               (allowed-commands '("tail" "grep" "awk" "sed"))))))
Tipo de datos: tailon-configuration

Tipo de datos que representa la configuración de Tailon. Este tipo tiene los siguientes parámetros:

config-file (predeterminado: (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 Expresiones-G).

Por ejemplo, para usar un archivo local, se puede usar la función local-file:

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

El paquete tailon usado.

Tipo de datos: tailon-configuration-file

Tipo de datos que representa las opciones de configuración de Tailon. Este tipo tiene los siguientes parámetros:

files (predeterminados: (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 (predeterminado: "localhost:8080")

Dirección y puerto al que Tailon debe asociarse.

relative-root (predeterminado: #f)

Ruta URL usada por Tailon, use #f para no usar una ruta.

allow-transfers? (predeterminado: #t)

Permite la descarga de archivos de registro en la interfaz web.

follow-names? (predeterminado: #t)

Permite la lectura de archivos todavía no existentes.

tail-lines (predeterminado: 200)

Número de líneas a leer inicialmente de cada archivo.

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

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

debug? (predeterminado: #f)

Proporcione el valor #t en debug? para mostrar mensajes de depuración.

wrap-lines (predeterminado: #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 (predeterminado: #f)

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

users (predeterminado: #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     '(("usuaria1" . "contraseña1")
               ("usuaria2" . "contraseña2"))))

Servicio Darkstat

Darkstat es un programa de interceptación de paquetes que captura el tráfico de la red, calcula estadísticas sobre su uso y proporciona informes a través de HTTP.

Variable: darkstat-service-type

Este es el tipo de servicio del servicio darkstat, su valor debe ser un registro darkstat-configuration como en este ejemplo:

Tipo de datos: darkstat-configuration

Tipo de datos que representa la configuración de darkstat.

package (predeterminado: darkstat)

El paquete darkstat usado.

interface

Captura el tráfico en la interfaz de red especificada.

port (predeterminado: "667")

Asocia la interfaz web al puerto especificado.

bind-address (predeterminada: "127.0.0.1")

Asocia la interfaz web a la dirección especificada.

base (predeterminada: "/")

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

Servicio del exportador de nodos Prometheus

El “exportador de nodos” Prometheus pone a disposición del sistema de monitorización Prometheus las estadísticas de hardware y el sistema operativo proporcionadas por el núcleo Linux. Este servicio debe desplegarse en todos los nodos físicos y máquinas virtuales, donde la monitorización de estas estadísticas sea deseable.

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.

Tipo de datos: prometheus-node-exporter-configuration

Tipo de datos que representa la configuración de node_exporter.

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

El paquete prometheus-node-exporter usado.

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

Asocia la interfaz web a la dirección especificada.

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 (predeterminadas: '())

Extra options to pass to the Prometheus node exporter.

vnStat Network Traffic Monitor

vnStat is a network traffic monitor that uses interface statistics provided by the kernel rather than traffic sniffing. This makes it a light resource monitor, regardless of network traffic rate.

Variable: vnstat-service-type

This is the service type for the vnStat daemon and accepts a vnstat-configuration value.

The following example will configure the service with default values:

Data Type: vnstat-configuration

Available vnstat-configuration fields are:

package (default: vnstat) (type: file-like)

The vnstat package.

database-directory (default: "/var/lib/vnstat") (type: string)

Specifies the directory where the database is to be stored. A full path must be given and a leading ’/’ isn’t required.

5-minute-hours (default: 48) (type: maybe-integer)

Data retention duration for the 5 minute resolution entries. The configuration defines for how many past hours entries will be stored. Set to -1 for unlimited entries or to 0 to disable the data collection of this resolution.

64bit-interface-counters (default: -2) (type: maybe-integer)

Select interface counter handling. Set to 1 for defining that all interfaces use 64-bit counters on the kernel side and 0 for defining 32-bit counter. Set to -1 for using the old style logic used in earlier versions where counter values within 32-bits are assumed to be 32-bit and anything larger is assumed to be a 64-bit counter. This may produce false results if a 64-bit counter is reset within the 32-bits. Set to -2 for using automatic detection based on available kernel datastructures.

always-add-new-interfaces? (default: #t) (type: maybe-boolean)

Enable or disable automatic creation of new database entries for interfaces not currently in the database even if the database file already exists when the daemon is started. New database entries will also get created for new interfaces seen while the daemon is running. Pseudo interfaces ‘lo’, ‘lo0’ and ‘sit0’ are always excluded from getting added.

bandwidth-detection? (default: #t) (type: maybe-boolean)

Try to automatically detect max-bandwidth value for each monitored interface. Mostly only ethernet interfaces support this feature. max-bandwidth will be used as fallback value if detection fails. Any interface specific max-BW configuration will disable the detection for the specified interface. In Linux, the detection is disabled for tun interfaces due to the Linux kernel always reporting 10 Mbit regardless of the used real interface.

bandwidth-detection-interval (default: 5) (type: maybe-integer)

How often in minutes interface specific detection of max-bandwidth is done for detecting possible changes when bandwidth-detection is enabled. Can be disabled by setting to 0. Value range: ‘0’..‘30

boot-variation (default: 15) (type: maybe-integer)

Time in seconds how much the boot time reported by system kernel can variate between updates. Value range: ‘0’..‘300

check-disk-space? (default: #t) (type: maybe-boolean)

Enable or disable the availability check of at least some free disk space before a database write.

create-directories? (default: #t) (type: maybe-boolean)

Enable or disable the creation of directories when a configured path doesn’t exist. This includes database-directory.

daemon-group (type: maybe-user-group)

Specify the group to which the daemon process should switch during startup. Set to %unset-value to disable group switching.

daemon-user (type: maybe-user-account)

Specify the user to which the daemon process should switch during startup. Set to %unset-value to disable user switching.

daily-days (default: 62) (type: maybe-integer)

Data retention duration for the one day resolution entries. The configuration defines for how many past days entries will be stored. Set to -1 for unlimited entries or to 0 to disable the data collection of this resolution.

database-synchronous (default: -1) (type: maybe-integer)

Change the setting of the SQLite "synchronous" flag which controls how much care is taken to ensure disk writes have fully completed when writing data to the database before continuing other actions. Higher values take extra steps to ensure data safety at the cost of slower performance. A value of 0 will result in all handling being left to the filesystem itself. Set to -1 to select the default value according to database mode controlled by database-write-ahead-logging setting. See SQLite documentation for more details regarding values from 1 to 3. Value range: ‘-1’..‘3

database-write-ahead-logging? (default: #f) (type: maybe-boolean)

Enable or disable SQLite Write-Ahead Logging mode for the database. See SQLite documentation for more details and note that support for read-only operations isn’t available in older SQLite versions.

hourly-days (default: 4) (type: maybe-integer)

Data retention duration for the one hour resolution entries. The configuration defines for how many past days entries will be stored. Set to -1 for unlimited entries or to 0 to disable the data collection of this resolution.

log-file (type: maybe-string)

Specify log file path and name to be used if use-logging is set to 1.

max-bandwidth (type: maybe-integer)

Maximum bandwidth for all interfaces. If the interface specific traffic exceeds the given value then the data is assumed to be invalid and rejected. Set to 0 in order to disable the feature. Value range: ‘0’..‘50000

max-bw (type: maybe-alist)

Same as max-bandwidth but can be used for setting individual limits for selected interfaces. This is an association list of interfaces as strings to integer values. For example,

(max-bw `(("eth0" .  15000)
          ("ppp0" .  10000)))

bandwidth-detection is disabled on an interface specific level for each max-bw configuration. Value range: ‘0’..‘50000

monthly-months (default: 25) (type: maybe-integer)

Data retention duration for the one month resolution entries. The configuration defines for how many past months entries will be stored. Set to -1 for unlimited entries or to 0 to disable the data collection of this resolution.

month-rotate (default: 1) (type: maybe-integer)

Day of month that months are expected to change. Usually set to 1 but can be set to alternative values for example for tracking monthly billed traffic where the billing period doesn’t start on the first day. For example, if set to 7, days of February up to and including the 6th will count for January. Changing this option will not cause existing data to be recalculated. Value range: ‘1’..‘28

month-rotate-affects-years? (default: #f) (type: maybe-boolean)

Enable or disable month-rotate also affecting yearly data. Applicable only when month-rotate has a value greater than one.

offline-save-interval (default: 30) (type: maybe-integer)

How often in minutes cached interface data is saved to file when all monitored interfaces are offline. Value range: save-interval..‘60

pid-file (default: "/var/run/vnstatd.pid") (type: maybe-string)

Specify pid file path and name to be used.

poll-interval (default: 5) (type: maybe-integer)

How often in seconds interfaces are checked for status changes. Value range: ‘2’..‘60

rescan-database-on-save? (type: maybe-boolean)

Automatically discover added interfaces from the database and start monitoring. The rescan is done every save-interval or offline-save-interval minutes depending on the current activity state.

save-interval (default: 5) (type: maybe-integer)

How often in minutes cached interface data is saved to file. Value range: ( update-interval / 60 )..‘60

save-on-status-change? (default: #t) (type: maybe-boolean)

Enable or disable the additional saving to file of cached interface data when the availability of an interface changes, i.e., when an interface goes offline or comes online.

time-sync-wait (default: 5) (type: maybe-integer)

How many minutes to wait during daemon startup for system clock to sync if most recent database update appears to be in the future. This may be needed in systems without a real-time clock (RTC) which require some time after boot to query and set the correct time. 0 = wait disabled. Value range: ‘0’..‘60

top-day-entries (default: 20) (type: maybe-integer)

Data retention duration for the top day entries. The configuration defines how many of the past top day entries will be stored. Set to -1 for unlimited entries or to 0 to disable the data collection of this resolution.

trafficless-entries? (default: #t) (type: maybe-boolean)

Create database entries even when there is no traffic during the entry’s time period.

update-file-owner? (default: #t) (type: maybe-boolean)

Enable or disable the update of file ownership during daemon process startup. During daemon startup, only database, log and pid files will be modified if the user or group change feature ( daemon-user or daemon-group ) is enabled and the files don’t match the requested user or group. During manual database creation, this option will cause file ownership to be inherited from the database directory if the directory already exists. This option only has effect when the process is started as root or via sudo.

update-interval (default: 20) (type: maybe-integer)

How often in seconds the interface data is updated. Value range: poll-interval..‘300

use-logging (default: 2) (type: maybe-integer)

Enable or disable logging. Accepted values are: 0 = disabled, 1 = logfile and 2 = syslog.

use-utc? (type: maybe-boolean)

Enable or disable using UTC as timezone in the database for all entries. When enabled, all entries added to the database will use UTC regardless of the configured system timezone. When disabled, the configured system timezone will be used. Changing this setting will not result in already existing data to be modified.

yearly-years (default: -1) (type: maybe-integer)

Data retention duration for the one year resolution entries. The configuration defines for how many past years entries will be stored. Set to -1 for unlimited entries or to 0 to disable the data collection of this resolution.

Servidor Zabbix

Zabbix is a high performance monitoring system that can collect data from a variety of sources and provide the results in a web-based interface. Alerting and reporting is built-in, as well as templates for common operating system metrics such as network utilization, CPU load, and disk space consumption.

This service provides the central Zabbix monitoring service; you also need zabbix-front-end-service-type to configure Zabbix and display results, and optionally zabbix-agent-service-type on machines that should be monitored (other data sources are supported, such as Prometheus Node Exporter).

Variable: zabbix-server-service-type

This is the service type for the Zabbix server service. Its value must be a zabbix-server-configuration record, shown below.

Data Type: zabbix-server-configuration

Los campos disponibles de zabbix-server-configuration son:

zabbix-server (default: zabbix-server) (type: file-like)

El paquete zabbix-server.

user (default: "zabbix") (type: string)

Usuaria que ejecutará el servidor Zabbix.

group (default: "zabbix") (type: string)

Grupo que ejecutará el servidor Zabbix.

db-host (default: "127.0.0.1") (type: string)

El nombre de máquina de la base de datos.

db-name (default: "zabbix") (type: string)

Nombre de la base de datos.

db-user (default: "zabbix") (type: string)

Usuaria de la base de datos.

db-password (default: "") (type: string)

Contraseña de la base de datos. Por favor, en vez de esto use include-files con DBPassword=SECRET dentro de un archivo especificado.

db-port (default: 5432) (type: number)

Puerto de la base de datos.

log-type (default: "") (type: string)

Especifica donde se escriben los mensajes de registro:

  • system - syslog.
  • file - archivo especificado con el parámetro log-file.
  • console - salida estándar.
log-file (default: "/var/log/zabbix/server.log") (type: string)

Nombre del archivo de registro para el parámetro file de log-type.

pid-file (default: "/var/run/zabbix/zabbix_server.pid") (type: string)

Nombre del archivo de PID.

ssl-ca-location (default: "/etc/ssl/certs/ca-certificates.crt") (type: string)

La localización de los archivos de autoridades de certificación (CA) para la verificación de certificados SSL de los servidores.

ssl-cert-location (default: "/etc/ssl/certs") (type: string)

Localización de los certificados SSL de los clientes.

extra-options (default: "") (type: extra-options)

Opciones adicionales que se añadirán al final del archivo de configuración de Zabbix.

include-files (default: '()) (type: include-files)

Puede incluir archivos individuales o todos los archivos en un directorio en el archivo de configuración.

Agente Zabbix

The Zabbix agent gathers information about the running system for the Zabbix monitoring server. It has a variety of built-in checks, and can be extended with custom user parameters.

Variable: zabbix-agent-service-type

This is the service type for the Zabbix agent service. Its value must be a zabbix-agent-configuration record, shown below.

Data Type: zabbix-agent-configuration

Los campos disponibles de zabbix-agent-configuration son:

zabbix-agent (default: zabbix-agentd) (type: file-like)

El paquete zabbix-agent.

user (default: "zabbix") (type: string)

Usuaria que ejecutará el agente Zabbix.

group (default: "zabbix") (type: string)

Grupo que ejecutará el agente Zabbix.

hostname (default: "") (type: string)

Nombre de máquina único y sensible a mayúsculas que es necesario para la comprobaciones activas y debe corresponder con el nombre de máquina configurado en el servidor.

log-type (default: "") (type: string)

Especifica donde se escriben los mensajes de registro:

  • system - syslog.
  • file - file specified with log-file parameter.
  • console - salida estándar.
log-file (default: "/var/log/zabbix/agent.log") (type: string)

Nombre del archivo de registro para el parámetro file de log-type.

pid-file (default: "/var/run/zabbix/zabbix_agent.pid") (type: string)

Nombre del archivo de PID.

server (default: '("127.0.0.1")) (type: list)

Lista de direcciones IP, opcionalmente en notación CIDR, o nombres de máquina de servidores y proxy Zabbix. Se aceptarán conexiones entrantes únicamente desde las máquinas proporcionadas aquí.

server-active (default: '("127.0.0.1")) (type: list)

Lista de pares IP:puerto (o máquina:puerto) de servidores Zabbix y servidores Zabbix para las comprobaciones activas. Si no se especifica un puerto, se usa el puerto predeterminado. Si no se especifica este parámetro, las comprobaciones activas se desactivan.

extra-options (default: "") (type: extra-options)

Opciones adicionales que se añadirán al final del archivo de configuración de Zabbix.

include-files (default: '()) (type: include-files)

Puede incluir archivos individuales o todos los archivos en un directorio en el archivo de configuración.

Motor de visualización de Zabbix

The Zabbix front-end provides a web interface to Zabbix. It does not need to run on the same machine as the Zabbix server. This service works by extending the PHP-FPM and NGINX services with the configuration necessary for loading the Zabbix user interface.

Variable: zabbix-front-end-service-type

This is the service type for the Zabbix web frontend. Its value must be a zabbix-front-end-configuration record, shown below.

Data Type: zabbix-front-end-configuration

Los campos disponibles de zabbix-front-end-configuration son:

zabbix-server (default: zabbix-server) (type: file-like)

The Zabbix server package to use.

nginx (default: '()) (type: list)

List of nginx-server-configuration blocks for the Zabbix front-end. When empty, a default that listens on port 80 is used.

db-host (default: "localhost") (type: string)

El nombre de máquina de la base de datos.

db-port (default: 5432) (type: number)

Puerto de la base de datos.

db-name (default: "zabbix") (type: string)

Nombre de la base de datos.

db-user (default: "zabbix") (type: string)

Usuaria de la base de datos.

db-password (default: "") (type: string)

Contraseña de la base de datos. Por favor, en vez de esto use db-secret-file.

db-secret-file (default: "") (type: string)

Archivo secreto que se añadirá al final del archivo zabbix.conf.php. Este archivo contiene las credenciales usadas por el motor de visualización de Zabbix. Se espera que usted lo cree manualmente.

zabbix-host (default: "localhost") (type: string)

Nombre de máquina del servidor Zabbix.

zabbix-port (default: 10051) (type: number)

Puerto del servidor Zabbix.


Next: Servicios Kerberos, Previous: File-Sharing Services, Up: Servicios   [Contents][Index]