mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
services: zabbix-front-end: Restore backwards compatibility.
Commit e301f1a8ed
removed the NGINX argument
entirely, but users may rely on and override it. Reported by rekado on #guix.
* gnu/services/monitoring.scm (%zabbix-front-end-nginx-configuration): Restore
exported variable.
(zabbix-front-end-nginx-extension): New procedure.
(zabbix-front-end-configuration): Remove FASTCGI-PARAMS field. Restore NGINX
field, but default to the empty list.
(zabbix-front-end-service-type): Extend NGINX-SERVICE-TYPE by
ZABBIX-FRONT-END-NGINX-EXTENSION.
* doc/guix.texi (Monitoring Services): Regenerate documentation.
This commit is contained in:
parent
fda218009b
commit
326e08bf0f
2 changed files with 42 additions and 15 deletions
|
@ -25804,31 +25804,32 @@ Available @code{zabbix-front-end-configuration} fields are:
|
|||
@item @code{zabbix-server} (default: @code{zabbix-server}) (type: file-like)
|
||||
The Zabbix server package to use.
|
||||
|
||||
@item @code{fastcgi-params} (type: list)
|
||||
List of FastCGI parameter pairs that will be included in the NGINX
|
||||
configuration.
|
||||
@item @code{nginx} (default: @code{()}) (type: list)
|
||||
List of @pxref{NGINX,@code{nginx-server-configuration}} blocks for the
|
||||
Zabbix front-end. When empty, a default that listens on port 80 is
|
||||
used.
|
||||
|
||||
@item @code{db-host} (default: @code{\"localhost\"}) (type: string)
|
||||
@item @code{db-host} (default: @code{"localhost"}) (type: string)
|
||||
Database host name.
|
||||
|
||||
@item @code{db-port} (default: @code{5432}) (type: number)
|
||||
Database port.
|
||||
|
||||
@item @code{db-name} (default: @code{\"zabbix\"}) (type: string)
|
||||
@item @code{db-name} (default: @code{"zabbix"}) (type: string)
|
||||
Database name.
|
||||
|
||||
@item @code{db-user} (default: @code{\"zabbix\"}) (type: string)
|
||||
@item @code{db-user} (default: @code{"zabbix"}) (type: string)
|
||||
Database user.
|
||||
|
||||
@item @code{db-password} (default: @code{\"\"}) (type: string)
|
||||
@item @code{db-password} (default: @code{""}) (type: string)
|
||||
Database password. Please, use @code{db-secret-file} instead.
|
||||
|
||||
@item @code{db-secret-file} (default: @code{\"\"}) (type: string)
|
||||
@item @code{db-secret-file} (default: @code{""}) (type: string)
|
||||
Secret file which will be appended to @file{zabbix.conf.php} file. This
|
||||
file contains credentials for use by Zabbix front-end. You are expected
|
||||
to create it manually.
|
||||
|
||||
@item @code{zabbix-host} (default: @code{\"localhost\"}) (type: string)
|
||||
@item @code{zabbix-host} (default: @code{"localhost"}) (type: string)
|
||||
Zabbix server hostname.
|
||||
|
||||
@item @code{zabbix-port} (default: @code{10051}) (type: number)
|
||||
|
|
|
@ -50,7 +50,8 @@ (define-module (gnu services monitoring)
|
|||
zabbix-agent-configuration
|
||||
zabbix-agent-service-type
|
||||
zabbix-front-end-configuration
|
||||
zabbix-front-end-service-type))
|
||||
zabbix-front-end-service-type
|
||||
%zabbix-front-end-configuration-nginx))
|
||||
|
||||
|
||||
;;;
|
||||
|
@ -574,14 +575,39 @@ (define zabbix-front-end-nginx-configuration
|
|||
fastcgi-params))))))))))
|
||||
(listen '("80")))))))
|
||||
|
||||
(define %zabbix-front-end-nginx-configuration
|
||||
(nginx-server-configuration
|
||||
(root #~(string-append #$zabbix-server:front-end "/share/zabbix/php"))
|
||||
(index '("index.php"))
|
||||
(locations
|
||||
(let ((php-location (nginx-php-location)))
|
||||
(list (nginx-location-configuration
|
||||
(inherit php-location)
|
||||
(body (append (nginx-location-configuration-body php-location)
|
||||
(list "
|
||||
fastcgi_param PHP_VALUE \"post_max_size = 16M
|
||||
max_execution_time = 300\";
|
||||
")))))))
|
||||
(listen '("80"))))
|
||||
|
||||
(define (zabbix-front-end-nginx-extension config)
|
||||
(match config
|
||||
(($ <zabbix-front-end-configuration> _ server nginx)
|
||||
(if (null? nginx)
|
||||
(list
|
||||
(nginx-server-configuration
|
||||
(inherit %zabbix-front-end-nginx-configuration)
|
||||
(root #~(string-append #$server:front-end "/share/zabbix/php"))))
|
||||
nginx))))
|
||||
|
||||
(define-configuration zabbix-front-end-configuration
|
||||
(zabbix-server
|
||||
(file-like zabbix-server)
|
||||
"The Zabbix server package to use.")
|
||||
(fastcgi-params
|
||||
(list '(("post_max_size" . "16M")
|
||||
("max_execution_time" . "300")))
|
||||
"List of FastCGI parameter pairs that will be included in the NGINX configuration.")
|
||||
(nginx
|
||||
(list '())
|
||||
"List of @pxref{NGINX, @code{nginx-server-configuration}} blocks for the
|
||||
Zabbix front-end. When empty, a default that listens on port 80 is used.")
|
||||
(db-host
|
||||
(string "localhost")
|
||||
"Database host name.")
|
||||
|
@ -686,7 +712,7 @@ (define zabbix-front-end-service-type
|
|||
(list (service-extension activation-service-type
|
||||
zabbix-front-end-activation)
|
||||
(service-extension nginx-service-type
|
||||
zabbix-front-end-nginx-configuration)
|
||||
zabbix-front-end-nginx-extension)
|
||||
;; Make sure php-fpm is instantiated.
|
||||
(service-extension php-fpm-service-type
|
||||
(const #t))))
|
||||
|
|
Loading…
Reference in a new issue