aboutsummaryrefslogtreecommitdiff
path: root/gnu/tests
diff options
context:
space:
mode:
authorOleg Pykhalov <go.wigust@gmail.com>2018-11-29 20:30:49 +0300
committerOleg Pykhalov <go.wigust@gmail.com>2018-12-17 22:09:10 +0300
commit6106d7cae49fb6686a237b53d465c89211ecad8f (patch)
tree267e7c4f0f3d455ea577623e955aedefadf16e9e /gnu/tests
parent6b1c4179e2596d860b1c49dea8021bc39d28da67 (diff)
downloadguix-6106d7cae49fb6686a237b53d465c89211ecad8f.tar
guix-6106d7cae49fb6686a237b53d465c89211ecad8f.tar.gz
services: monitoring: Add 'zabbix-agent'.
* gnu/services/monitoring.scm (zabbix-server-service-type, zabbix-agent-account, zabbix-agent-activation, zabbix-agent-config-file, zabbix-agent-shepherd-service, generate-zabbix-agent-documentation): New procedures. (zabbix-agent-service-type): New 'service-type'. * gnu/tests/monitoring.scm (run-zabbix-server-test): Test 'zabbix-agent'. (%zabbix-os): Add 'zabbix-agent' service. * doc/guix.texi (Monitoring Services): Document 'zabbix-agent'.
Diffstat (limited to 'gnu/tests')
-rw-r--r--gnu/tests/monitoring.scm18
1 files changed, 17 insertions, 1 deletions
diff --git a/gnu/tests/monitoring.scm b/gnu/tests/monitoring.scm
index edc41c4a30..76a2d3e946 100644
--- a/gnu/tests/monitoring.scm
+++ b/gnu/tests/monitoring.scm
@@ -235,6 +235,20 @@ zabbix||{}
'(file-exists? "/var/run/zabbix/zabbix_server.pid")
marionette))
+ ;; Wait for zabbix-agent to be up and running.
+ (test-assert "zabbix-agent running"
+ (marionette-eval
+ '(begin
+ (use-modules (gnu services herd))
+ (start-service 'zabbix-agent))
+ marionette))
+
+ ;; Make sure the PID file is created.
+ (test-assert "zabbix-agent PID file"
+ (marionette-eval
+ '(file-exists? "/var/run/zabbix/zabbix_agent.pid")
+ marionette))
+
(test-end)
(exit (= (test-runner-fail-count (test-runner-current)) 0)))))
@@ -250,7 +264,9 @@ zabbix||{}
(service zabbix-server-service-type
(zabbix-server-configuration
(db-password "zabbix")
- (log-type "console"))))))
+ (log-type "console")))
+
+ (service zabbix-agent-service-type))))
(operating-system
(inherit base-os)
(packages (cons* postgresql (operating-system-packages base-os))))))