From unknown Tue Jun 24 17:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33549] [PATCH 0/6] Add Zabbix services. Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 29 Nov 2018 18:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33549 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33549@debbugs.gnu.org Cc: Oleg Pykhalov X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15435172647770 (code B ref -1); Thu, 29 Nov 2018 18:48:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Nov 2018 18:47:44 +0000 Received: from localhost ([127.0.0.1]:55090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSRLk-00021G-8N for submit@debbugs.gnu.org; Thu, 29 Nov 2018 13:47:44 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35703) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSRLj-000212-0B for submit@debbugs.gnu.org; Thu, 29 Nov 2018 13:47:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gSRLd-0008F6-04 for submit@debbugs.gnu.org; Thu, 29 Nov 2018 13:47:37 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48589) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gSRLc-0008F2-RO for submit@debbugs.gnu.org; Thu, 29 Nov 2018 13:47:36 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSRLb-0004zo-UO for guix-patches@gnu.org; Thu, 29 Nov 2018 13:47:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gSRLY-0008C0-Hy for guix-patches@gnu.org; Thu, 29 Nov 2018 13:47:35 -0500 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]:44622) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gSRLX-0008Ac-Ra for guix-patches@gnu.org; Thu, 29 Nov 2018 13:47:32 -0500 Received: by mail-lf1-x129.google.com with SMTP id z13so2228075lfe.11 for ; Thu, 29 Nov 2018 10:47:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vKeVnN98NpeOgyRsH+X+EjyKZnZ4GXZmV/nWQg6W/s0=; b=tKP+RHscSSf1eJEO9Y2mrlNHPZSycbi4+ZSfXIVoX2Y1cSYcfCCAgW4gm5v6ZMegYM rweL7TYFM3F3OOvPN5Kwu3ql1A6ve5NxXKiFEuyi9VmRojCMr/16X2UwFszj4KyI/i76 Asi0v6wVIjn33WsyaMB3lYHDtVDzimoSq980N3z9fEYLmRv/5qEZlSl3Qie86zBhsR9X sj9Atz1QbJRQzBJjAW78RV/7O9EyHJCopMwaH/cvG88UlnkAfAQIqvP590C8drV+dl+s JC9fTNMtpDQBV4c+++xg/zPHwx5gUXZ43raBcLAfA2TZtZLRFQRDAdWz9PPmOMWvYcnu cy2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vKeVnN98NpeOgyRsH+X+EjyKZnZ4GXZmV/nWQg6W/s0=; b=D9x3BzX3nc+x7lqMTaskPwxq0+wUl3GeaEwH+tLWz9sm0tSpz4nHmookSYwscIPUJ+ ugOwfhEonSNrN3Yzij0mTolANa+43xgOqZpO4N12qDte2m1RHuZptZ03ngp4yGqg2DUg 8fvOMO90x7XNKk+niqUWRorbRqxKlXU5Q4RvH14HPwDz8tlZq2W7WOE1+ufZwQA7k6YO vewKemFUw7UfxPHYc+VKs18ntS7bzUoBXIZrHtdvLY/GajRVd11/woAxZNh/pVVkd9jv sDgKVuZNIg1pznt7QUG4PpC4STdaMjToq/bJgm+vS+8ySmJK4Z5U+0HBQQnLTRRNJoNt ppNQ== X-Gm-Message-State: AA+aEWYOGUVgTdY6USyOnxSpHitU7r1FrHk5KVqTLKdLkEdaADKF6ClR Nreb4QMRFaxJiHiww4CC4ap6s6QCpaY= X-Google-Smtp-Source: AFSGD/UhIDyvPFqhwCJM0NxubFJNhwfQ519/+/tAaZ/TacXGlo+60+dRzU2HzJnxuhLqFhfdMx/VCw== X-Received: by 2002:a19:1a14:: with SMTP id a20mr1683653lfa.1.1543517249965; Thu, 29 Nov 2018 10:47:29 -0800 (PST) Received: from localhost.localdomain ([178.70.249.201]) by smtp.gmail.com with ESMTPSA id g15sm432039lfb.1.2018.11.29.10.47.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 10:47:29 -0800 (PST) From: Oleg Pykhalov Date: Thu, 29 Nov 2018 21:47:08 +0300 Message-Id: <20181129184708.4818-1-go.wigust@gmail.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hello Guix. This patch series adds Zabbix server, agent and front-end services. I replaced ‘match-lambda’ with ‘php-fpm-configuration-*’ procedures in ‘php-fpm-activation’, because it was not obvious for me why build failed after adding ‘timezone’ field and I spend a plenty of time to figure it out. I'm not sure about ‘php-with-bcmath’ package. ‘php’ package has a comment: Some of the bundled libraries have no proper upstream. Ideally we'd extract these out as separate packages: "mbstring/libmbfl" "date/lib" "bcmath/libbcmath". Well, ‘php-with-bcmath’ could be replaced in future with ‘bcmath/libbcmath’. I'm not ready to do this and it will stop a ‘zabbix-front-end’ service from pushing to master for unknown time. Thanks, Oleg. Oleg Pykhalov (6): gnu: zabbix-server: Split output. services: monitoring: Add 'zabbix-server'. services: monitoring: Add 'zabbix-agent'. services: php-fpm: Add 'timezone' configuration. gnu: Add php-with-bcmath. services: monitoring: Add 'zabbix-front-end'. doc/guix.texi | 320 +++++++++++++++++++++++++ gnu/packages/monitoring.scm | 21 +- gnu/packages/php.scm | 10 + gnu/services/monitoring.scm | 460 +++++++++++++++++++++++++++++++++++- gnu/services/web.scm | 48 ++-- gnu/tests/monitoring.scm | 233 +++++++++++++++++- 6 files changed, 1066 insertions(+), 26 deletions(-) -- 2.19.1 From unknown Tue Jun 24 17:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33549] [PATCH 1/6] gnu: zabbix-server: Split output. References: <20181129184708.4818-1-go.wigust@gmail.com> In-Reply-To: <20181129184708.4818-1-go.wigust@gmail.com> Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 29 Nov 2018 18:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33549 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33549@debbugs.gnu.org Cc: Oleg Pykhalov Received: via spool by 33549-submit@debbugs.gnu.org id=B33549.15435174698140 (code B ref 33549); Thu, 29 Nov 2018 18:52:01 +0000 Received: (at 33549) by debbugs.gnu.org; 29 Nov 2018 18:51:09 +0000 Received: from localhost ([127.0.0.1]:55096 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSRP3-000278-0M for submit@debbugs.gnu.org; Thu, 29 Nov 2018 13:51:09 -0500 Received: from mail-lj1-f171.google.com ([209.85.208.171]:39513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSRP1-00026a-7Y for 33549@debbugs.gnu.org; Thu, 29 Nov 2018 13:51:07 -0500 Received: by mail-lj1-f171.google.com with SMTP id t9-v6so2691109ljh.6 for <33549@debbugs.gnu.org>; Thu, 29 Nov 2018 10:51:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LIXN+I3LSW6JaCInQpLJdnPdD9JaCdY/htRhw5RV6qE=; b=ClKaIkzwTV9vO8Z7rIf4pm+VNGaArMK7tYFPeA/CbH/0Ia8cflqspvD3OwQmPvHyDv hQDWsIIvNrFC5jWnAPekvaskuC0NcqAv01f7+lWKAIDzPBd7ZW746Cfl86/9UzuEdvK7 rOWUpRDx1mz6ZOeB1XxjwgitGLDf4Q35rbwuaekA4AudI05iizxZUWmdSjnIAcEciYPE ifNDbolNdt7kjLzVl+liOiAc0C/ue1fXX0SLuSeSFThKE55dEKt1D41bIh1FSK4fKSjK gqmsVCFDuqpRgXPlQ47h46FCSu7CN1jTLNhXdvnc+znQL2FINtW/iQ3R4HmX9R8rGaGY Q4nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LIXN+I3LSW6JaCInQpLJdnPdD9JaCdY/htRhw5RV6qE=; b=iRuk53SYPee79Pg1r1yUdSgM9TKbah2msgVqzjCQ5Xf80paFSg9q5b+FE7ACOfx7JA 7MgmQcgBSBprVTTx9XV6xeX3keb7Wj+O21UOsEHXUvdbLr2R4oFoq53Pb7kTLNHu2TgJ zjB4KuoFtrAMAv2Ao5wniXQenKrUFK5INalabfmE0H4SvtcEdbLP2lcj8vxcROa4ZRfQ em+fHODh08Imoqp+B6y+yZKNhBV7yHmSllrskVIlERwSPgTsi4vtK/3JexHRo1DaqGq6 aRF0om5ThfsgRtFugQTETPo5Vco/4YSjOrddDTlFn1jdweKPf7aByqClitiSOkel1n0M Pc8Q== X-Gm-Message-State: AA+aEWZuYMvDJ3GWpZzB43U3doH2P4WOui9US9nIlfWPFhsVMscIsJ1V hG/JfVSVleSLLnD1ikLkXXnpbE1Xdgw= X-Google-Smtp-Source: AFSGD/WoYCR2pjJHAcjIxzYbOlzg/9dzXqCRclyyLqbZovG1m5XbNTg//3grLqrGRvzmWPqca6cJ0g== X-Received: by 2002:a2e:5c86:: with SMTP id q128-v6mr1969905ljb.119.1543517460607; Thu, 29 Nov 2018 10:51:00 -0800 (PST) Received: from localhost.localdomain ([178.70.249.201]) by smtp.gmail.com with ESMTPSA id k21-v6sm406705ljc.15.2018.11.29.10.50.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 10:50:59 -0800 (PST) From: Oleg Pykhalov Date: Thu, 29 Nov 2018 21:50:37 +0300 Message-Id: <20181129185042.6050-1-go.wigust@gmail.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/monitoring.scm (zabbix-server)[outputs]: Add 'front-end' and 'schema' outputs. --- gnu/packages/monitoring.scm | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/gnu/packages/monitoring.scm b/gnu/packages/monitoring.scm index b69ec07158..35fe4c7690 100644 --- a/gnu/packages/monitoring.scm +++ b/gnu/packages/monitoring.scm @@ -182,21 +182,34 @@ solution (client-side agent)") (package (inherit zabbix-agentd) (name "zabbix-server") + (outputs '("out" "front-end" "schema")) (arguments (substitute-keyword-arguments `(#:phases (modify-phases %standard-phases - (add-after 'install 'install-frontend + (add-after 'install 'install-front-end (lambda* (#:key outputs #:allow-other-keys) - (let* ((php (string-append (assoc-ref outputs "out") + (let* ((php (string-append (assoc-ref outputs "front-end") "/share/zabbix/php")) (front-end-conf (string-append php "/conf")) (etc (string-append php "/etc"))) (mkdir-p php) - (copy-recursively "./frontends/php" php) + (copy-recursively "frontends/php" php) + ;; Make front-end write config to ‘/etc/zabbix’ directory. (rename-file front-end-conf (string-append front-end-conf "-example")) - (symlink "/etc/zabbix" front-end-conf))))) + (symlink "/etc/zabbix" front-end-conf)) + #t)) + (add-after 'install 'install-schema + (lambda* (#:key outputs #:allow-other-keys) + (let ((database-directory + (string-append (assoc-ref outputs "schema") + "/database"))) + (for-each delete-file + (find-files "database" "Makefile\\.in|\\.am$")) + (mkdir-p database-directory) + (copy-recursively "database" database-directory)) + #t))) ,@(package-arguments zabbix-agentd)) ((#:configure-flags flags) `(cons* "--enable-server" -- 2.19.1 From unknown Tue Jun 24 17:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33549] [PATCH 2/6] services: monitoring: Add 'zabbix-server'. Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 29 Nov 2018 18:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33549 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33549@debbugs.gnu.org Cc: Oleg Pykhalov Received: via spool by 33549-submit@debbugs.gnu.org id=B33549.15435174738168 (code B ref 33549); Thu, 29 Nov 2018 18:52:02 +0000 Received: (at 33549) by debbugs.gnu.org; 29 Nov 2018 18:51:13 +0000 Received: from localhost ([127.0.0.1]:55100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSRP5-00027Z-LZ for submit@debbugs.gnu.org; Thu, 29 Nov 2018 13:51:12 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:41280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSRP2-00026q-DR for 33549@debbugs.gnu.org; Thu, 29 Nov 2018 13:51:09 -0500 Received: by mail-lj1-f195.google.com with SMTP id z80-v6so2688944ljb.8 for <33549@debbugs.gnu.org>; Thu, 29 Nov 2018 10:51:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PcEJdX9I9j8Z4SDpEZLNqDZeqmUSpQCUZP7sZqNi66E=; b=ADgskvYCjh5R1AjU7MlsSSIfDyMa7LM4uY3r/pk177qhec031ayT5XwrH703P8M41p guIrhi32wVZF7ka2etZDs0ufdc3o0035j0h/C8BjqI4YzeapzZ5FPqQWpF6elnx86dgG YoU9GEo4rYqOMp6K5FMteAVy6XARLxbvamgaTaGkfPSgvfb2OHos0Td000+S2vaTdTwJ le010pTJwEEZPiiy+PR7LOjxXLbfAqWEKXmYKkMdWsktErEEkl84ka0+yJAjPDsfSZAT F8nMNVHy7PjaYNp+hZgY8Ho5Z3iRZh/+YAjwBUZSUBPmRWECsjmMHWmDNZ7EakfZQFsX v8TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PcEJdX9I9j8Z4SDpEZLNqDZeqmUSpQCUZP7sZqNi66E=; b=bVuf4ThJ1rH/gyLHX0gENnhrBbLhYXTKqbOW046gunam16Ascs8z/aXRO6xy3ZmMDf 3xug/GCxXGew15o9BRBalOXaTLAQp9f84jGPGjLw1X2udGDENWyDTKSWG+sJoHEFazDJ iIjW4TQvvPIq7ED0PX6RiZ1BfBcldrriXPTnXL1ZOtbsnA5YnW+GsgW5vKq+PyYccErx 19/rmGomezSSWFbQs7FbplJIhX6DTdE/gph8BS5rogNpis7N15kj2YOmVzAL/VCrVNRl G5pa2/6aecGhp0PrYQyM4BsnZhtv6x42wbqZJLBNwwYkwDTcj36MRUYnhGG8yCW2NXMd 2oAw== X-Gm-Message-State: AA+aEWbwCByF704TksGUKEoQwWljCg3ku//YRqDPLkKPXnG+QYe0HXrY P8qGjG8Ny2f2Q+hdR73Ng6t8Ps25wbw= X-Google-Smtp-Source: AFSGD/XIYX3rRXxgOQwWCAY1IK1clvUA6Lwt03iribZ4GdCNwMfa5B1745ibrXvLjTO51TovmOvIww== X-Received: by 2002:a2e:612:: with SMTP id 18-v6mr1816170ljg.125.1543517461877; Thu, 29 Nov 2018 10:51:01 -0800 (PST) Received: from localhost.localdomain ([178.70.249.201]) by smtp.gmail.com with ESMTPSA id k21-v6sm406705ljc.15.2018.11.29.10.51.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 10:51:00 -0800 (PST) From: Oleg Pykhalov Date: Thu, 29 Nov 2018 21:50:38 +0300 Message-Id: <20181129185042.6050-2-go.wigust@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181129185042.6050-1-go.wigust@gmail.com> References: <20181129185042.6050-1-go.wigust@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/monitoring.scm (uglify-field-name, serialize-field, serialize-number, serialize-list, serialize-string, serialize-include-files, zabbix-server-account, zabbix-server-config-file, zabbix-server-activation, zabbix-server-shepherd-service, generate-zabbix-server-documentation): New procedures. (zabbix-server-service-type): New variable. * gnu/tests/monitoring.scm (%psql-user-create-zabbix, %psql-db-zabbix-create-script, %psql-db-create-zabbix, %psql-db-import-zabbix, %zabbix-os, %test-zabbix): New variables. (run-zabbix-server-test): New procedure. * doc/guix.texi (Monitoring Services): Document 'zabbix-server'. --- doc/guix.texi | 140 +++++++++++++++++++++++++++ gnu/services/monitoring.scm | 185 +++++++++++++++++++++++++++++++++++- gnu/tests/monitoring.scm | 168 +++++++++++++++++++++++++++++++- 3 files changed, 491 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index c040a8531a..48f7798742 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -16613,6 +16613,146 @@ Bind the web interface to the specified address. @end table @end deftp +@subsubheading Zabbix server +@cindex zabbix zabbix-server +Zabbix provides monitoring metrics, among others network utilization, CPU load +and disk space consumption: + +@itemize +@item High performance, high capacity (able to monitor hundreds of thousands of devices). +@item Auto-discovery of servers and network devices and interfaces. +@item Low-level discovery, allows to automatically start monitoring new items, file systems or network interfaces among others. +@item Distributed monitoring with centralized web administration. +@item Native high performance agents. +@item SLA, and ITIL KPI metrics on reporting. +@item High-level (business) view of monitored resources through user-defined visual console screens and dashboards. +@item Remote command execution through Zabbix proxies. +@end itemize + +@c %start of fragment + +Available @code{zabbix-server-configuration} fields are: + +@deftypevr {@code{zabbix-server-configuration} parameter} package zabbix-server +The zabbix-server package. + +@end deftypevr + +@deftypevr {@code{zabbix-server-configuration} parameter} string user +User who will run the Zabbix server. + +Defaults to @samp{"zabbix"}. + +@end deftypevr + +@deftypevr {@code{zabbix-server-configuration} parameter} group group +Group who will run the Zabbix server. + +Defaults to @samp{"zabbix"}. + +@end deftypevr + +@deftypevr {@code{zabbix-server-configuration} parameter} string db-host +Database host name. + +Defaults to @samp{"127.0.0.1"}. + +@end deftypevr + +@deftypevr {@code{zabbix-server-configuration} parameter} string db-name +Database name. + +Defaults to @samp{"zabbix"}. + +@end deftypevr + +@deftypevr {@code{zabbix-server-configuration} parameter} string db-user +Database user. + +Defaults to @samp{"zabbix"}. + +@end deftypevr + +@deftypevr {@code{zabbix-server-configuration} parameter} string db-password +Database password. Please, use @code{include-files} instead. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{zabbix-server-configuration} parameter} number db-port +Database port. + +Defaults to @samp{5432}. + +@end deftypevr + +@deftypevr {@code{zabbix-server-configuration} parameter} string log-type +Specifies where log messages are written to: + +@itemize @bullet +@item +@code{system} - syslog. + +@item +@code{file} - file specified with @code{log-file} parameter. + +@item +@code{console} - standard output. + +@end itemize + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{zabbix-server-configuration} parameter} string log-file +Log file name for @code{log-type} @code{file} parameter. + +Defaults to @samp{"/var/log/zabbix/server.log"}. + +@end deftypevr + +@deftypevr {@code{zabbix-server-configuration} parameter} string pid-file +Name of PID file. + +Defaults to @samp{"/var/run/zabbix/zabbix_server.pid"}. + +@end deftypevr + +@deftypevr {@code{zabbix-server-configuration} parameter} string ssl-ca-location +The location of certificate authority (CA) files for SSL server +certificate verification. + +Defaults to @samp{"/etc/ssl/certs/ca-certificates.crt"}. + +@end deftypevr + +@deftypevr {@code{zabbix-server-configuration} parameter} string ssl-cert-location +Location of SSL client certificates. + +Defaults to @samp{"/etc/ssl/certs"}. + +@end deftypevr + +@deftypevr {@code{zabbix-server-configuration} parameter} string extra-options +Extra options will be appended to Zabbix server configuration file. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{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 @samp{()}. + +@end deftypevr + + +@c %end of fragment + @node Kerberos Services @subsubsection Kerberos Services @cindex Kerberos diff --git a/gnu/services/monitoring.scm b/gnu/services/monitoring.scm index aa3b63a0e4..9655fb95e9 100644 --- a/gnu/services/monitoring.scm +++ b/gnu/services/monitoring.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018 Sou Bunnbu ;;; Copyright © 2018 Gábor Boskovits +;;; Copyright © 2018 Oleg Pykhalov ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,17 +20,23 @@ (define-module (gnu services monitoring) #:use-module (gnu services) + #:use-module (gnu services configuration) #:use-module (gnu services shepherd) #:use-module (gnu packages admin) #:use-module (gnu packages monitoring) #:use-module (gnu system shadow) #:use-module (guix gexp) + #:use-module (guix packages) #:use-module (guix records) #:use-module (ice-9 match) + #:use-module (srfi srfi-26) #:export (darkstat-configuration prometheus-node-exporter-configuration darkstat-service-type - prometheus-node-exporter-service-type)) + prometheus-node-exporter-service-type + + zabbix-server-configuration + zabbix-server-service-type)) ;;; @@ -125,3 +132,179 @@ prometheus.") (list (service-extension shepherd-root-service-type (compose list prometheus-node-exporter-shepherd-service)))))) + + +;;; +;;; Zabbix server +;;; + +(define (uglify-field-name field-name) + (apply string-append + (map (lambda (str) + (if (member (string->symbol str) '(ca db ssl)) + (string-upcase str) + (string-capitalize str))) + (string-split (string-delete #\? + (symbol->string field-name)) + #\-)))) + +(define (serialize-field field-name val) + (format #t "~a=~a~%" (uglify-field-name field-name) val)) + +(define (serialize-number field-name val) + (serialize-field field-name (number->string val))) + +(define (serialize-list field-name val) + (if (null? val) "" (serialize-field field-name (string-join val ",")))) + +(define (serialize-string field-name val) + (if (and (string? val) (string=? val "")) + "" + (serialize-field field-name val))) + +(define group? string?) + +(define serialize-group + (const "")) + +(define include-files? list?) + +(define (serialize-include-files field-name val) + (if (null? val) "" (for-each (cut serialize-field 'include <>) val))) + +(define-configuration zabbix-server-configuration + (zabbix-server + (package zabbix-server) + "The zabbix-server package.") + (user + (string "zabbix") + "User who will run the Zabbix server.") + (group ;for zabbix-server-account procedure + (group "zabbix") + "Group who will run the Zabbix server.") + (db-host + (string "127.0.0.1") + "Database host name.") + (db-name + (string "zabbix") + "Database name.") + (db-user + (string "zabbix") + "Database user.") + (db-password + (string "") + "Database password. Please, use @code{include-files} instead.") + (db-port + (number 5432) + "Database port.") + (log-type + (string "") + "Specifies where log messages are written to: +@itemize +@item @code{system} - syslog. +@item @code{file} - file specified with @code{log-file} parameter. +@item @code{console} - standard output. +@end itemize\n") + (log-file + (string "/var/log/zabbix/server.log") + "Log file name for @code{log-type} @code{file} parameter.") + (pid-file + (string "/var/run/zabbix/zabbix_server.pid") + "Name of PID file.") + (ssl-ca-location + (string "/etc/ssl/certs/ca-certificates.crt") + "The location of certificate authority (CA) files for SSL server +certificate verification.") + (ssl-cert-location + (string "/etc/ssl/certs") + "Location of SSL client certificates.") + (extra-options + (string "") + "Extra options will be appended to Zabbix server configuration file.") + (include-files + (include-files '()) + "You may include individual files or all files in a directory in the +configuration file.")) + +(define (zabbix-server-account config) + "Return the user accounts and user groups for CONFIG." + (let ((zabbix-user (zabbix-server-configuration-user config)) + (zabbix-group (zabbix-server-configuration-group config))) + (list (user-group (name zabbix-group) (system? #t)) + (user-account + (name zabbix-user) + (system? #t) + (group zabbix-group) + (comment "zabbix privilege separation user") + (home-directory (string-append "/var/run/" zabbix-user)) + (shell #~(string-append #$shadow "/sbin/nologin")))))) + +(define (zabbix-server-config-file config) + "Return the zabbix-server configuration file corresponding to CONFIG." + (computed-file + "zabbix_server.conf" + #~(begin + (call-with-output-file #$output + (lambda (port) + (display "# Generated by 'zabbix-server-service'.\n" port) + (display #$(with-output-to-string + (lambda () + (serialize-configuration + config zabbix-server-configuration-fields))) + port) + #t))))) + +(define (zabbix-server-activation config) + "Return the activation gexp for CONFIG." + (with-imported-modules '((guix build utils) + (ice-9 rdelim)) + #~(begin + (use-modules (guix build utils) + (ice-9 rdelim)) + (let ((user (getpw #$(zabbix-server-configuration-user config)))) + (for-each (lambda (file) + (let ((directory (dirname file))) + (mkdir-p directory) + (chown directory (passwd:uid user) (passwd:gid user)) + (chmod directory #o755))) + (list #$(zabbix-server-configuration-log-file config) + #$(zabbix-server-configuration-pid-file config) + "/etc/zabbix/maintenance.inc.php")))))) + +(define (zabbix-server-shepherd-service config) + "Return a for Zabbix server with CONFIG." + (list (shepherd-service + (provision '(zabbix-server)) + (documentation "Run Zabbix server daemon.") + (start #~(make-forkexec-constructor + (list #$(file-append (zabbix-server-configuration-zabbix-server config) + "/sbin/zabbix_server") + "--config" #$(zabbix-server-config-file config) + "--foreground") + #:user #$(zabbix-server-configuration-user config) + #:group #$(zabbix-server-configuration-group config) + #:pid-file #$(zabbix-server-configuration-pid-file config) + #:environment-variables + (list "SSL_CERT_DIR=/run/current-system/profile\ +/etc/ssl/certs" + "SSL_CERT_FILE=/run/current-system/profile\ +/etc/ssl/certs/ca-certificates.crt"))) + (stop #~(make-kill-destructor))))) + +(define zabbix-server-service-type + (service-type + (name 'zabbix-server) + (extensions + (list (service-extension shepherd-root-service-type + zabbix-server-shepherd-service) + (service-extension account-service-type + zabbix-server-account) + (service-extension activation-service-type + zabbix-server-activation))) + (default-value (zabbix-server-configuration)))) + +(define (generate-zabbix-server-documentation) + (generate-documentation + `((zabbix-server-configuration + ,zabbix-server-configuration-fields)) + 'zabbix-server-configuration)) diff --git a/gnu/tests/monitoring.scm b/gnu/tests/monitoring.scm index 3320a19a77..7a704eb01d 100644 --- a/gnu/tests/monitoring.scm +++ b/gnu/tests/monitoring.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018 Gábor Boskovits +;;; Copyright © 2018 Oleg Pykhalov ;;; ;;; This file is part of GNU Guix. ;;; @@ -17,13 +18,20 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu tests monitoring) + #:use-module (gnu packages databases) + #:use-module (gnu packages monitoring) #:use-module (gnu services) #:use-module (gnu services monitoring) #:use-module (gnu services networking) + #:use-module (gnu services databases) + #:use-module (gnu services shepherd) #:use-module (gnu system vm) + #:use-module (gnu system) #:use-module (gnu tests) #:use-module (guix gexp) - #:export (%test-prometheus-node-exporter)) + #:use-module (guix modules) + #:export (%test-prometheus-node-exporter + %test-zabbix)) ;;; @@ -95,3 +103,161 @@ (description "Connect to a running prometheus-node-exporter server.") (value (run-prometheus-node-exporter-server-test name %prometheus-node-exporter-os)))) + + +;;; +;;; Zabbix +;;; + +(define %psql-user-create-zabbix + "\ +sudo -u postgres psql <<< \"create user zabbix password 'zabbix';\" +") + +(define %psql-db-zabbix-create-script + "\ +sudo -u postgres psql --no-align <<< \\\\du +") + +(define %psql-db-create-zabbix + "\ +sudo -u postgres createdb -O zabbix -E Unicode -T template0 zabbix +") + +(define %psql-db-import-zabbix + #~(format #f "\ +cat ~a | sudo -u zabbix psql zabbix; +cat ~a | sudo -u zabbix psql zabbix; +cat ~a | sudo -u zabbix psql zabbix; +" + (string-append #$zabbix-server:schema + "/database/postgresql/schema.sql") + (string-append #$zabbix-server:schema + "/database/postgresql/images.sql") + (string-append #$zabbix-server:schema + "/database/postgresql/data.sql"))) + +(define* (run-zabbix-server-test name test-os) + "Run tests in %ZABBIX-OS, which has zabbix running." + (define os + (marionette-operating-system + test-os + #:imported-modules '((gnu services herd)))) + + (define vm + (virtual-machine + (operating-system os) + (port-forwardings '((8080 . 80))) + (memory-size 1024))) + + (define test + (with-imported-modules '((gnu build marionette)) + #~(begin + (use-modules (srfi srfi-11) + (srfi srfi-64) + (gnu build marionette) + (web client) + (web response) + (ice-9 popen) + (ice-9 rdelim)) + + (define marionette + (make-marionette (list #$vm))) + + (mkdir #$output) + (chdir #$output) + + (test-begin #$name) + + ;; XXX: Shepherd reads the config file *before* binding its control + ;; socket, so /var/run/shepherd/socket might not exist yet when the + ;; 'marionette' service is started. + (test-assert "shepherd socket ready" + (marionette-eval + `(begin + (use-modules (gnu services herd)) + (let loop ((i 10)) + (cond ((file-exists? (%shepherd-socket-file)) + #t) + ((> i 0) + (sleep 1) + (loop (- i 1))) + (else + 'failure)))) + marionette)) + + (test-assert "postgres service running" + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (start-service 'postgres)) + marionette)) + + (test-eq "postgres create zabbix user" + 0 + (marionette-eval '(begin (system #$%psql-user-create-zabbix)) + marionette)) + + (test-equal "postgres find zabbix user" + "List of roles +Role name|Attributes|Member of +postgres|Superuser, Create role, Create DB, Replication, Bypass RLS|{} +zabbix||{} +" + (marionette-eval + '(begin (let* ((port (open-pipe #$%psql-db-zabbix-create-script + OPEN_READ)) + (output (read-string port)) + (status (close-pipe port))) + output)) + marionette)) + + (test-eq "postgres create zabbix db" + 0 + (marionette-eval '(begin (system #$%psql-db-create-zabbix)) + marionette)) + + (test-eq "postgres import zabbix db" + 0 + (marionette-eval '(begin (system #$%psql-db-import-zabbix)) + marionette)) + + ;; Wait for zabbix-server to be up and running. + (test-assert "zabbix-server running" + (marionette-eval + '(begin + (use-modules (gnu services herd)) + (start-service 'zabbix-server)) + marionette)) + + ;; Make sure the PID file is created. + (test-assert "zabbix-server PID file" + (marionette-eval + '(file-exists? "/var/run/zabbix/zabbix_server.pid") + marionette)) + + (test-end) + + (exit (= (test-runner-fail-count (test-runner-current)) 0))))) + + (gexp->derivation (string-append name "-test") test)) + +(define %zabbix-os + ;; Return operating system under test. + (let ((base-os + (simple-operating-system + (service dhcp-client-service-type) + (postgresql-service) + (service zabbix-server-service-type + (zabbix-server-configuration + (db-password "zabbix") + (log-type "console")))))) + (operating-system + (inherit base-os) + (packages (cons* postgresql (operating-system-packages base-os)))))) + +(define %test-zabbix + (system-test + (name "zabbix") + (description "Connect to a running Zabbix") + (value (run-zabbix-server-test name %zabbix-os)))) -- 2.19.1 From unknown Tue Jun 24 17:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33549] [PATCH 3/6] services: monitoring: Add 'zabbix-agent'. Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 29 Nov 2018 18:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33549 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33549@debbugs.gnu.org Cc: Oleg Pykhalov Received: via spool by 33549-submit@debbugs.gnu.org id=B33549.15435174748175 (code B ref 33549); Thu, 29 Nov 2018 18:52:02 +0000 Received: (at 33549) by debbugs.gnu.org; 29 Nov 2018 18:51:14 +0000 Received: from localhost ([127.0.0.1]:55103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSRP6-00027h-Uv for submit@debbugs.gnu.org; Thu, 29 Nov 2018 13:51:13 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:42655) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSRP3-00026s-63 for 33549@debbugs.gnu.org; Thu, 29 Nov 2018 13:51:10 -0500 Received: by mail-lj1-f195.google.com with SMTP id l15-v6so2689595lja.9 for <33549@debbugs.gnu.org>; Thu, 29 Nov 2018 10:51:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VfPByrTRZDsJlsxKI9KiFpxG/IOTDGDe16Pvlpl3VBs=; b=k7uVXoOfltpdnv92osw/GhVDihBABQXhZj5e0Tvq6TW5Jnu6Qnjqieqcs+plkSGgDq SeNxn6qoEhbu8PLfXicLVKouM3Wo8GK4xQqWS3vpxWd/U7gPJWnEDLTY+4TSS+8dOnXW PYLtQJSXiDDCtnFQlJw3mug1SS/jNhfcEbK8KIZoGE0hPQqFQJRDEZi1kvccLDDdYSpJ Y0MgRJkup95ETikD/CyuxYvT3htqKBvxoYFUiwO7XGNYsoRYAODugtXUwuyPAzOnAf2i ZwMTolJu6EneU7CTUhtqNfFGysfMMz74dkeeiCOdzGA9pr/8zVHMjSepcXfgIOfLpOw1 uiPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VfPByrTRZDsJlsxKI9KiFpxG/IOTDGDe16Pvlpl3VBs=; b=pY7qZtWzzowIn33lF3ferHDhNuOQCdbOubGyDPmREQzGLVeLBaDHGw8War0JBA1bwl jF7Wopj6dWq77dCLpLB+yHE+m4z6lAUx9yAEgv+xYYGEZWmWDtZW1k352Uuzm9M3W+Tx WQwTSnp7gfM0oKITZNNMY+mI9cksgdvA9yaE5quwomwoYOQjxuVtCHutg+46kgHpym7A R2pAPaZuK5ui13rvYTZzMVg3VIkdURqEXakijEfbRPyT6N8lZcNAY+b5RBqlRx+mQ9Kv 6zuwypOcQGUGnYv4mzWhqo2Aaw4Vv5ed0ItIg1w1Zh8J3aw+KGAg7mT1poFJhUThRtIp QEwA== X-Gm-Message-State: AA+aEWaM8WQmD8LZ7boJq+0TAxFHJOWs+/fYoVsxSc6Ej65tpbyoyPcM BcLAgqMz6v4GDLlW0NNuxDMBkqxOSyw= X-Google-Smtp-Source: AFSGD/X9xtWNFbmbZ+hHmII9Itr/GOjsOOB8CpY3dFPFOwa+iikZIigAy1elzlt2beom6KdhGr0yJQ== X-Received: by 2002:a2e:681a:: with SMTP id c26-v6mr1819178lja.175.1543517462847; Thu, 29 Nov 2018 10:51:02 -0800 (PST) Received: from localhost.localdomain ([178.70.249.201]) by smtp.gmail.com with ESMTPSA id k21-v6sm406705ljc.15.2018.11.29.10.51.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 10:51:02 -0800 (PST) From: Oleg Pykhalov Date: Thu, 29 Nov 2018 21:50:39 +0300 Message-Id: <20181129185042.6050-3-go.wigust@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181129185042.6050-1-go.wigust@gmail.com> References: <20181129185042.6050-1-go.wigust@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * doc/guix.texi (Monitoring Services): Document '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 variable. * gnu/tests/monitoring.scm (run-zabbix-server-test): Test 'zabbix-agent'. (%zabbix-os): Add 'zabbix-agent' service. --- doc/guix.texi | 103 ++++++++++++++++++++++++++++ gnu/services/monitoring.scm | 133 +++++++++++++++++++++++++++++++++++- gnu/tests/monitoring.scm | 18 ++++- 3 files changed, 252 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 48f7798742..7b8f7acd29 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -16750,6 +16750,109 @@ Defaults to @samp{()}. @end deftypevr +@c %end of fragment + +@subsubheading Zabbix agent +@cindex zabbix zabbix-agent + +Zabbix agent gathers information for Zabbix server. + +@c %start of fragment + +Available @code{zabbix-agent-configuration} fields are: + +@deftypevr {@code{zabbix-agent-configuration} parameter} package zabbix-agent +The zabbix-agent package. + +@end deftypevr + +@deftypevr {@code{zabbix-agent-configuration} parameter} string user +User who will run the Zabbix agent. + +Defaults to @samp{"zabbix"}. + +@end deftypevr + +@deftypevr {@code{zabbix-agent-configuration} parameter} group group +Group who will run the Zabbix agent. + +Defaults to @samp{"zabbix"}. + +@end deftypevr + +@deftypevr {@code{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 @samp{"Zabbix server"}. + +@end deftypevr + +@deftypevr {@code{zabbix-agent-configuration} parameter} string log-type +Specifies where log messages are written to: + +@itemize @bullet +@item +@code{system} - syslog. + +@item +@code{file} - file specified with @code{log-file} parameter. + +@item +@code{console} - standard output. + +@end itemize + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{zabbix-agent-configuration} parameter} string log-file +Log file name for @code{log-type} @code{file} parameter. + +Defaults to @samp{"/var/log/zabbix/agent.log"}. + +@end deftypevr + +@deftypevr {@code{zabbix-agent-configuration} parameter} string pid-file +Name of PID file. + +Defaults to @samp{"/var/run/zabbix/zabbix_agent.pid"}. + +@end deftypevr + +@deftypevr {@code{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 @samp{("127.0.0.1")}. + +@end deftypevr + +@deftypevr {@code{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 @samp{("127.0.0.1")}. + +@end deftypevr + +@deftypevr {@code{zabbix-agent-configuration} parameter} string extra-options +Extra options will be appended to Zabbix server configuration file. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{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 @samp{()}. + +@end deftypevr @c %end of fragment diff --git a/gnu/services/monitoring.scm b/gnu/services/monitoring.scm index 9655fb95e9..274228af89 100644 --- a/gnu/services/monitoring.scm +++ b/gnu/services/monitoring.scm @@ -36,7 +36,9 @@ prometheus-node-exporter-service-type zabbix-server-configuration - zabbix-server-service-type)) + zabbix-server-service-type + zabbix-agent-configuration + zabbix-agent-service-type)) ;;; @@ -308,3 +310,132 @@ configuration file.")) `((zabbix-server-configuration ,zabbix-server-configuration-fields)) 'zabbix-server-configuration)) + +(define-configuration zabbix-agent-configuration + (zabbix-agent + (package zabbix-agentd) + "The zabbix-agent package.") + (user + (string "zabbix") + "User who will run the Zabbix agent.") + (group + (group "zabbix") + "Group who will run the Zabbix agent.") + (hostname + (string "Zabbix server") + "Unique, case sensitive hostname which is required for active checks and +must match hostname as configured on the server.") + (log-type + (string "") + "Specifies where log messages are written to: +@itemize +@item @code{system} - syslog. +@item @code{file} - file specified with @code{log-file} parameter. +@item @code{console} - standard output. +@end itemize\n") + (log-file + (string "/var/log/zabbix/agent.log") + "Log file name for @code{log-type} @code{file} parameter.") + (pid-file + (string "/var/run/zabbix/zabbix_agent.pid") + "Name of PID file.") + (server + (list '("127.0.0.1")) + "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.") + (server-active + (list '("127.0.0.1")) + "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.") + (extra-options + (string "") + "Extra options will be appended to Zabbix server configuration file.") + (include-files + (include-files '()) + "You may include individual files or all files in a directory in the +configuration file.")) + +(define (zabbix-agent-account config) + "Return the user accounts and user groups for CONFIG." + (let ((zabbix-user "zabbix") + (zabbix-group "zabbix")) + (list (user-group (name zabbix-group) (system? #t)) + (user-account + (name zabbix-user) + (system? #t) + (group zabbix-group) + (comment "zabbix privilege separation user") + (home-directory (string-append "/var/run/" zabbix-user)) + (shell #~(string-append #$shadow "/sbin/nologin")))))) + +(define (zabbix-agent-activation config) + "Return the activation gexp for CONFIG." + (with-imported-modules '((guix build utils) + (ice-9 rdelim)) + #~(begin + (use-modules (guix build utils) + (ice-9 rdelim)) + (let ((user + (getpw #$(zabbix-agent-configuration-user config)))) + (for-each (lambda (file) + (let ((directory (dirname file))) + (mkdir-p directory) + (chown directory (passwd:uid user) (passwd:gid user)) + (chmod directory #o755))) + (list #$(zabbix-agent-configuration-log-file config) + #$(zabbix-agent-configuration-pid-file config))))))) + +(define (zabbix-agent-config-file config) + "Return the zabbix-agent configuration file corresponding to CONFIG." + (computed-file + "zabbix_agent.conf" + #~(begin + (call-with-output-file #$output + (lambda (port) + (display "# Generated by 'zabbix-agent-service'.\n" port) + (display #$(with-output-to-string + (lambda () + (serialize-configuration + config zabbix-agent-configuration-fields))) + port) + #t))))) + +(define (zabbix-agent-shepherd-service config) + "Return a for Zabbix agent with CONFIG." + (list (shepherd-service + (provision '(zabbix-agent)) + (documentation "Run Zabbix agent daemon.") + (start #~(make-forkexec-constructor + (list #$(file-append (zabbix-agent-configuration-zabbix-agent config) + "/sbin/zabbix_agentd") + "--config" #$(zabbix-agent-config-file config) + "--foreground") + #:user #$(zabbix-agent-configuration-user config) + #:group #$(zabbix-agent-configuration-group config) + #:pid-file #$(zabbix-agent-configuration-pid-file config) + #:environment-variables + (list "SSL_CERT_DIR=/run/current-system/profile\ +/etc/ssl/certs" + "SSL_CERT_FILE=/run/current-system/profile\ +/etc/ssl/certs/ca-certificates.crt"))) + (stop #~(make-kill-destructor))))) + +(define zabbix-agent-service-type + (service-type + (name 'zabbix-agent) + (extensions + (list (service-extension shepherd-root-service-type + zabbix-agent-shepherd-service) + (service-extension account-service-type + zabbix-agent-account) + (service-extension activation-service-type + zabbix-agent-activation))) + (default-value (zabbix-agent-configuration)))) + +(define (generate-zabbix-agent-documentation) + (generate-documentation + `((zabbix-agent-configuration + ,zabbix-agent-configuration-fields)) + 'zabbix-agent-configuration)) diff --git a/gnu/tests/monitoring.scm b/gnu/tests/monitoring.scm index 7a704eb01d..ec9e086ff4 100644 --- a/gnu/tests/monitoring.scm +++ b/gnu/tests/monitoring.scm @@ -236,6 +236,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))))) @@ -251,7 +265,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)))))) -- 2.19.1 From unknown Tue Jun 24 17:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33549] [PATCH 4/6] services: php-fpm: Add 'timezone' configuration. Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 29 Nov 2018 18:52:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33549 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33549@debbugs.gnu.org Cc: Oleg Pykhalov Received: via spool by 33549-submit@debbugs.gnu.org id=B33549.15435174788193 (code B ref 33549); Thu, 29 Nov 2018 18:52:03 +0000 Received: (at 33549) by debbugs.gnu.org; 29 Nov 2018 18:51:18 +0000 Received: from localhost ([127.0.0.1]:55106 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSRPB-000284-Si for submit@debbugs.gnu.org; Thu, 29 Nov 2018 13:51:18 -0500 Received: from mail-lj1-f175.google.com ([209.85.208.175]:38487) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSRP4-00026u-Ss for 33549@debbugs.gnu.org; Thu, 29 Nov 2018 13:51:11 -0500 Received: by mail-lj1-f175.google.com with SMTP id c19-v6so2699303lja.5 for <33549@debbugs.gnu.org>; Thu, 29 Nov 2018 10:51:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AVicmrnRW/vEr2kjLc04RY8SMsMDX6Zql/nu87ak8wE=; b=eYnXzBFqWM4lPrfYJvIvihJW05MdXudVZc9QUgHaiShHryG/S1yzaNmKeFeI1XWaE+ f2QyAYKFbtT17sR0+fQb0ECCs6busvJxFg9Rv+KK4W0U0wJps+UE7vrCNzkkXauTgWRj r7BJ1EE5KuflecawH5fW7y1mHBRnv9u76IpJZO876tlPX+LpgxJAppm4UGQ+c1Zi9YsM RShMt3nyLoKKKl7sQqQttOipxle7CTyU6RF6mkI2liTBppUhGmz9tLECtmq3iZ2bp9SG IPr4SGuMSuz89wb1j6485ChpwMPUYtNrJjhvvi3/WKKhnZCCrnPyMjp73Q5DJChSe3uS FL8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AVicmrnRW/vEr2kjLc04RY8SMsMDX6Zql/nu87ak8wE=; b=HFci5mme7HFAGXJlNs6Atl1RLUdAQmqE0z8jK3RKNm1+xysXQXTh6DVnbsMPZRUeO2 ckMMe4ch5kGrU8sy90QH31TPYlrIh7/0Lu4EtaZ5zg9XNb3YdQDOlvGvbAfCbBgKVjBj uZ18m3iI2W7fuyyjdQ5Ail+b4cpUhimCjNF4Oj9EtDIunsdmH2bEwS9v21PRKgrST1lf i487OIQwZ+IUtJDW+0gfIp72K5cmYcXXz5Cwg/QfakOVChv/SoPvmWltGD9qbMq5GIJC YTyWZ5Bw5cMy27TxlnGg/kDgN79uRIJ4EQhtT1FY0dR5/CQKh6+sbJAVPc0Sldwm9ox1 cVJQ== X-Gm-Message-State: AA+aEWaCHIR3IkJpXTlrjId/UBculcVlv9MT0AoBeKvs8hNh/KVISTmR p7w6TKVk9GR5xlMXtnhKgsCsnXWdACM= X-Google-Smtp-Source: AFSGD/V5UPjQtKxMW+A5PelLMLhVeziPGi7lPSD1YMPqCdXAGdg5AGifabgWc7hAOlQJXPs7sSPo5Q== X-Received: by 2002:a2e:7f04:: with SMTP id a4-v6mr2042683ljd.156.1543517464419; Thu, 29 Nov 2018 10:51:04 -0800 (PST) Received: from localhost.localdomain ([178.70.249.201]) by smtp.gmail.com with ESMTPSA id k21-v6sm406705ljc.15.2018.11.29.10.51.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 10:51:03 -0800 (PST) From: Oleg Pykhalov Date: Thu, 29 Nov 2018 21:50:40 +0300 Message-Id: <20181129185042.6050-4-go.wigust@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181129185042.6050-1-go.wigust@gmail.com> References: <20181129185042.6050-1-go.wigust@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/web.scm: ()[timezone]: New record field. (default-php-fpm-config, php-fpm-shepherd-service, php-fpm-activation): Use this. * doc/guix.texi (Web Services): Document this. --- doc/guix.texi | 2 ++ gnu/services/web.scm | 48 ++++++++++++++++++++++++++------------------ 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 7b8f7acd29..d83071b432 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -17608,6 +17608,8 @@ Determines whether php errors and warning should be sent to clients and displayed in their browsers. This is useful for local php development, but a security risk for public sites, as error messages can reveal passwords and personal data. +@item @code{timezone} (default @code{#f}) +Specifies @code{php_admin_value[date.timezone]} parameter. @item @code{workers-logfile} (default @code{(string-append "/var/log/php" (version-major (package-version php)) "-fpm.www.log")}) This file will log the @code{stderr} outputs of php worker processes. Can be set to @code{#f} to disable logging. diff --git a/gnu/services/web.scm b/gnu/services/web.scm index fcf453c248..d71fed20ed 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -142,6 +142,7 @@ php-fpm-configuration-log-file php-fpm-configuration-process-manager php-fpm-configuration-display-errors + php-fpm-configuration-timezone php-fpm-configuration-workers-log-file php-fpm-configuration-file @@ -773,6 +774,8 @@ of index files." (default (php-fpm-dynamic-process-manager-configuration))) (display-errors php-fpm-configuration-display-errors (default #f)) + (timezone php-fpm-configuration-timezone + (default #f)) (workers-log-file php-fpm-configuration-workers-log-file (default (string-append "/var/log/php" (version-major (package-version php)) @@ -827,7 +830,7 @@ of index files." (shell (file-append shadow "/sbin/nologin"))))))) (define (default-php-fpm-config socket user group socket-user socket-group - pid-file log-file pm display-errors workers-log-file) + pid-file log-file pm display-errors timezone workers-log-file) (apply mixed-text-file "php-fpm.conf" (flatten "[global]\n" @@ -840,6 +843,10 @@ of index files." "listen.owner =" socket-user "\n" "listen.group =" socket-group "\n" + (if timezone + (string-append "php_admin_value[date.timezone] = \"" timezone "\"\n") + "") + (match pm (($ pm.max-children @@ -879,7 +886,8 @@ of index files." (define php-fpm-shepherd-service (match-lambda (($ php socket user group socket-user socket-group - pid-file log-file pm display-errors workers-log-file file) + pid-file log-file pm display-errors + timezone workers-log-file file) (list (shepherd-service (provision '(php-fpm)) (documentation "Run the php-fpm daemon.") @@ -890,27 +898,27 @@ of index files." #$(or file (default-php-fpm-config socket user group socket-user socket-group pid-file log-file - pm display-errors workers-log-file))) + pm display-errors timezone workers-log-file))) #:pid-file #$pid-file)) (stop #~(make-kill-destructor))))))) -(define php-fpm-activation - (match-lambda - (($ _ _ user _ _ _ _ log-file _ _ workers-log-file _) - #~(begin - (use-modules (guix build utils)) - (let* ((user (getpwnam #$user)) - (touch (lambda (file-name) - (call-with-output-file file-name (const #t)))) - (init-log-file - (lambda (file-name) - (when #$workers-log-file - (when (not (file-exists? file-name)) - (touch file-name)) - (chown file-name (passwd:uid user) (passwd:gid user)) - (chmod file-name #o660))))) - (init-log-file #$log-file) - (init-log-file #$workers-log-file)))))) +(define (php-fpm-activation config) + #~(begin + (use-modules (guix build utils)) + (let* ((user (getpwnam #$(php-fpm-configuration-user config))) + (touch (lambda (file-name) + (call-with-output-file file-name (const #t)))) + (workers-log-file + #$(php-fpm-configuration-workers-log-file config)) + (init-log-file + (lambda (file-name) + (when workers-log-file + (when (not (file-exists? file-name)) + (touch file-name)) + (chown file-name (passwd:uid user) (passwd:gid user)) + (chmod file-name #o660))))) + (init-log-file #$(php-fpm-configuration-log-file config)) + (init-log-file workers-log-file)))) (define php-fpm-service-type -- 2.19.1 From unknown Tue Jun 24 17:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33549] [PATCH 5/6] gnu: Add php-with-bcmath. Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 29 Nov 2018 18:52:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33549 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33549@debbugs.gnu.org Cc: Oleg Pykhalov Received: via spool by 33549-submit@debbugs.gnu.org id=B33549.15435174788200 (code B ref 33549); Thu, 29 Nov 2018 18:52:03 +0000 Received: (at 33549) by debbugs.gnu.org; 29 Nov 2018 18:51:18 +0000 Received: from localhost ([127.0.0.1]:55108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSRPC-000286-7C for submit@debbugs.gnu.org; Thu, 29 Nov 2018 13:51:18 -0500 Received: from mail-lj1-f170.google.com ([209.85.208.170]:41182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSRP5-00026w-Mh for 33549@debbugs.gnu.org; Thu, 29 Nov 2018 13:51:12 -0500 Received: by mail-lj1-f170.google.com with SMTP id z80-v6so2689089ljb.8 for <33549@debbugs.gnu.org>; Thu, 29 Nov 2018 10:51:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cG8qSZybPA+kRNtdYYx1GtSy7z77oKfVhxsky4iJqeI=; b=r9uYcKpIheTM7iC4uNmX0NVkTjcDgjvz+zxschJIgdPSHi9Rod3IV0peGt9RjKun6K joCI0riZ8xcrx/zZGtLY5H06vfLdJWmp93WPTrrwe9cD/XiqueDHH0a9Fv+IoU6A4CQW Qqb5Kv1ThFU6RwOx+JxXiFusdxBZJwa+/Z7E1H3LeZbjmfRMm9bbKbueXS0RMlU1Nflw 3Z5TjoHtCxW35Ll2jcgYw9OfLgnEQU1R9IqGx1asYhdqVkZ/tvfOPl4SoyDudWuPPfZt LOXODViKy/0tzn3hZ2ocaeBikg/f3ZYIdq2DEv5bhNaRgSeQIpc6X33vu6X433Y10PBy rHFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cG8qSZybPA+kRNtdYYx1GtSy7z77oKfVhxsky4iJqeI=; b=WWwqBG9sDnbtVpozB71vS3zTJ4dXXuGFTnBo6u5+8z/yYaV0voRQeUcIlQInGFUt/Z SEDkK35LHfV9tJYKbCLBsDoUYf/JzeoBjKNgPZQK6KMtCbOLDqoEYpp1SpLlDvy4fPxo NnyYZnhxYQFh/pzohAKxNVP+CMWDFKuuLxRi9PjCm8rSzm/0BzCBJ5RwjPHrbp+Epzbb JtZtOxusw7xokHUS/btiMRN3DgTOoKE6qi/3TtI2vue7tWyHH3V6zMRgViPF2gcDvh/C hYZ6lFmG1HCFL4B7w5J2aYQWm0baQfEQtzdTuOYV6aF9mGjplnb+Dqcxfbyu+/MgAyiS iOmQ== X-Gm-Message-State: AA+aEWb/V7PdjdfUqK3ZnBXN3lbmIsPkjIAlR4PV0Fu0uqcMYCPoti9Z t95AC9od/OyO+EkRVQr+qxE/CwM7nko= X-Google-Smtp-Source: AFSGD/U8u9muy2DcRhXX8hlglOC9bptoPn0FYrNNU7/Laxx3HAm6nFXnpLG2zEpTKzM5nbSHnlDsGA== X-Received: by 2002:a2e:197:: with SMTP id f23-v6mr1868677lji.144.1543517465283; Thu, 29 Nov 2018 10:51:05 -0800 (PST) Received: from localhost.localdomain ([178.70.249.201]) by smtp.gmail.com with ESMTPSA id k21-v6sm406705ljc.15.2018.11.29.10.51.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 10:51:04 -0800 (PST) From: Oleg Pykhalov Date: Thu, 29 Nov 2018 21:50:41 +0300 Message-Id: <20181129185042.6050-5-go.wigust@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181129185042.6050-1-go.wigust@gmail.com> References: <20181129185042.6050-1-go.wigust@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/php.scm (php-with-bcmath): New variable. --- gnu/packages/php.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gnu/packages/php.scm b/gnu/packages/php.scm index a22591d377..07246b0833 100644 --- a/gnu/packages/php.scm +++ b/gnu/packages/php.scm @@ -48,6 +48,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) + #:use-module (guix utils) #:use-module ((guix licenses) #:prefix license:)) (define gd-for-php @@ -360,3 +361,12 @@ systems, web content management systems and web frameworks." ) license:lgpl2.1+ ; ext/bcmath/libbcmath license:bsd-2 ; ext/fileinfo/libmagic license:expat)))) ; ext/date/lib + +(define-public php-with-bcmath + (package + (inherit php) + (name "php-with-bcmath") + (arguments + (substitute-keyword-arguments (package-arguments php) + ((#:configure-flags flags) + `(cons "--enable-bcmath" ,flags)))))) -- 2.19.1 From unknown Tue Jun 24 17:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33549] [PATCH 6/6] services: monitoring: Add 'zabbix-front-end'. Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 29 Nov 2018 18:52:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33549 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 33549@debbugs.gnu.org Cc: Oleg Pykhalov Received: via spool by 33549-submit@debbugs.gnu.org id=B33549.15435174798207 (code B ref 33549); Thu, 29 Nov 2018 18:52:04 +0000 Received: (at 33549) by debbugs.gnu.org; 29 Nov 2018 18:51:19 +0000 Received: from localhost ([127.0.0.1]:55110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSRPC-00028D-Go for submit@debbugs.gnu.org; Thu, 29 Nov 2018 13:51:19 -0500 Received: from mail-lj1-f173.google.com ([209.85.208.173]:42533) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSRP6-000270-PD for 33549@debbugs.gnu.org; Thu, 29 Nov 2018 13:51:13 -0500 Received: by mail-lj1-f173.google.com with SMTP id l15-v6so2689760lja.9 for <33549@debbugs.gnu.org>; Thu, 29 Nov 2018 10:51:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gXBVFtniVmxKfRj6VfxwMlrdOe3ll1rsXmbjNMs2fpo=; b=h+gGgc+tfocpNESS7tO2bNbWzwGd4EX1NKaHYb2NSUNF9AZ3Ch/fe8RP3TTQygaCS/ WbcQ8yVdwUoVrKXPREQ+V4mKsDAwDw+uz4IS6Z8XOwRk9fCBEpPh7DynzxziOF9b+Xz7 irnzlGpMY3Y7MsFBrjeDZkGfPX3cR+WHnKdY3ow3MQlc/1Wyul7jBKfpH7MObX09nH1y Ku5/gLPPfIHKhQiOfBF4VE1G3ZMUjnQG0j0clfxTRxycWFy/0XWXVMI5wM1DwC30UTVL tzkvXsdDeEZyGImeMWYBGpBLYOOEWkBTfX0E2Lj3KXV83aBXMkq+vXGp8BEN1CfVj4oR Lz+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gXBVFtniVmxKfRj6VfxwMlrdOe3ll1rsXmbjNMs2fpo=; b=VU15cXtfYZMHA4RKihvwtGUwecipJRAg/5SfpYECycsqtDGAvU2y79Bb8Mht88bYSv eR6+o0gjwgvD0lMnMC1BQ3juxPJuPSM07C2Bq0q0a6UxNnS+8M62/+RCy2O33qnNrmCF 4YctjIK/QeUWcW5F2Ay1NKtRPnID2mkd87OvfnW44Jhs+Xf/D5N4oT+HDMfiU5fRk/X0 tFqi/1SCc4JvONiDQPZ1Vlt0Ot4LS/A55cBQfH7s+k5Tt3xA7+hwuoiNT8wu0g/WxiRP 96LdeLg6PUI1zWl29h/WrbuwUQR8bBpYadZ2zNPHxQg0bLKwOwf+m72MYa6mYE90Wwm0 qntw== X-Gm-Message-State: AA+aEWYnQjCUITpyEJYlox3Y3t4z+TgZ2TBldz54fuo/tPY5oeW4SB/X BQj/AO3WyvlmgPkt14b//SWN+jZkqbA= X-Google-Smtp-Source: AFSGD/UZsteAgYhFt95e8VK0yKfscp+IAXJijgnpR7IVq+IjmY0qFaXVXAjUlr53gizNvQrQnv1pbA== X-Received: by 2002:a2e:95c6:: with SMTP id y6-v6mr1828281ljh.59.1543517466431; Thu, 29 Nov 2018 10:51:06 -0800 (PST) Received: from localhost.localdomain ([178.70.249.201]) by smtp.gmail.com with ESMTPSA id k21-v6sm406705ljc.15.2018.11.29.10.51.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 10:51:05 -0800 (PST) From: Oleg Pykhalov Date: Thu, 29 Nov 2018 21:50:42 +0300 Message-Id: <20181129185042.6050-6-go.wigust@gmail.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181129185042.6050-1-go.wigust@gmail.com> References: <20181129185042.6050-1-go.wigust@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/services/monitoring.scm (nginx-server-configuration-list?, serialize-nginx-server-configuration-list, zabbix-front-end-configuration, zabbix-front-end-config, zabbix-front-end-activation, generate-zabbix-front-end-documentation): New procedures. (%zabbix-front-end-configuration-nginx, %maintenance.inc.php, zabbix-front-end-service-type): New variables. * doc/guix.texi (Monitoring Services): Document this. --- doc/guix.texi | 75 ++++++++++++++++++ gnu/services/monitoring.scm | 146 +++++++++++++++++++++++++++++++++++- gnu/tests/monitoring.scm | 49 ++++++++++++ 3 files changed, 269 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index d83071b432..a1de8b0f15 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -16854,6 +16854,81 @@ Defaults to @samp{()}. @end deftypevr +@c %end of fragment + +@subsubheading Zabbix front-end +@cindex zabbix zabbix-front-end + +This service provides a WEB interface to Zabbix server. + +@c %start of fragment + +Available @code{zabbix-front-end-configuration} fields are: + +@deftypevr {@code{zabbix-front-end-configuration} parameter} nginx-server-configuration-list nginx +NGINX configuration. + +@end deftypevr + +@deftypevr {@code{zabbix-front-end-configuration} parameter} string db-host +Database host name. + +Defaults to @samp{"localhost"}. + +@end deftypevr + +@deftypevr {@code{zabbix-front-end-configuration} parameter} number db-port +Database port. + +Defaults to @samp{5432}. + +@end deftypevr + +@deftypevr {@code{zabbix-front-end-configuration} parameter} string db-name +Database name. + +Defaults to @samp{"zabbix"}. + +@end deftypevr + +@deftypevr {@code{zabbix-front-end-configuration} parameter} string db-user +Database user. + +Defaults to @samp{"zabbix"}. + +@end deftypevr + +@deftypevr {@code{zabbix-front-end-configuration} parameter} string db-password +Database password. Please, use @code{db-secret-file} instead. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{zabbix-front-end-configuration} parameter} string db-secret-file +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. + +Defaults to @samp{""}. + +@end deftypevr + +@deftypevr {@code{zabbix-front-end-configuration} parameter} string zabbix-host +Zabbix server hostname. + +Defaults to @samp{"localhost"}. + +@end deftypevr + +@deftypevr {@code{zabbix-front-end-configuration} parameter} number zabbix-port +Zabbix server port. + +Defaults to @samp{10051}. + +@end deftypevr + + @c %end of fragment @node Kerberos Services diff --git a/gnu/services/monitoring.scm b/gnu/services/monitoring.scm index 274228af89..452f26ef8a 100644 --- a/gnu/services/monitoring.scm +++ b/gnu/services/monitoring.scm @@ -22,6 +22,7 @@ #:use-module (gnu services) #:use-module (gnu services configuration) #:use-module (gnu services shepherd) + #:use-module (gnu services web) #:use-module (gnu packages admin) #:use-module (gnu packages monitoring) #:use-module (gnu system shadow) @@ -29,6 +30,7 @@ #:use-module (guix packages) #:use-module (guix records) #:use-module (ice-9 match) + #:use-module (ice-9 rdelim) #:use-module (srfi srfi-26) #:export (darkstat-configuration prometheus-node-exporter-configuration @@ -38,7 +40,10 @@ zabbix-server-configuration zabbix-server-service-type zabbix-agent-configuration - zabbix-agent-service-type)) + zabbix-agent-service-type + zabbix-front-end-configuration + zabbix-front-end-service-type + %zabbix-front-end-configuration-nginx)) ;;; @@ -174,6 +179,12 @@ prometheus.") (define (serialize-include-files field-name val) (if (null? val) "" (for-each (cut serialize-field 'include <>) val))) +(define (nginx-server-configuration-list? val) + (and (list? val) (and-map nginx-server-configuration? val))) + +(define (serialize-nginx-server-configuration-list field-name val) + "") + (define-configuration zabbix-server-configuration (zabbix-server (package zabbix-server) @@ -439,3 +450,136 @@ configuration file.")) `((zabbix-agent-configuration ,zabbix-agent-configuration-fields)) 'zabbix-agent-configuration)) + +(define %zabbix-front-end-configuration-nginx + (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\"; +"))))))))) + +(define-configuration zabbix-front-end-configuration + ;; TODO: Specify zabbix front-end package. + ;; (zabbix- + ;; (package zabbix-front-end) + ;; "The zabbix-front-end package.") + (nginx + (nginx-server-configuration-list + (list %zabbix-front-end-configuration-nginx)) + "NGINX configuration.") + (db-host + (string "localhost") + "Database host name.") + (db-port + (number 5432) + "Database port.") + (db-name + (string "zabbix") + "Database name.") + (db-user + (string "zabbix") + "Database user.") + (db-password + (string "") + "Database password. Please, use @code{db-secret-file} instead.") + (db-secret-file + (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.") + (zabbix-host + (string "localhost") + "Zabbix server hostname.") + (zabbix-port + (number 10051) + "Zabbix server port.")) + +(define zabbix-front-end-config + (match-lambda + (($ + _ db-host db-port db-name db-user db-password db-secret-file + zabbix-host zabbix-port) + (mixed-text-file "zabbix.conf.php" + "\ +string db-port) "'; +$DB['DATABASE'] = '" db-name "'; +$DB['USER'] = '" db-user "'; +$DB['PASSWORD'] = '" (if (string-null? db-password) + (if (string-null? db-secret-file) + (display "Provide a `db-secret-file' \ +or `db-password' field. +" + (current-error-port)) + (string-trim-both + (with-input-from-file db-secret-file + read-string))) + (begin + (display " +Hint: Consider use `db-secret-file' instead of `db-password' and unset +`db-password' in `zabbix-front-end-configuration' for security. +") + db-password)) "'; + +// Schema name. Used for IBM DB2 and PostgreSQL. +$DB['SCHEMA'] = ''; + +$ZBX_SERVER = '" zabbix-host "'; +$ZBX_SERVER_PORT = '" (number->string zabbix-port) "'; +$ZBX_SERVER_NAME = ''; + +$IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG; +")))) + +(define %maintenance.inc.php + ;; Empty php file to allow us move zabbix-frontend configs to ‘/etc/zabbix’ + ;; directory. See ‘install-front-end’ phase in + ;; (@ (gnu packages monitoring) zabbix-server) package. + "\ + Subject: bug#33549: closed (Re: Status: [PATCH 0/6] Add Zabbix services.) Message-ID: References: <87imzsot4g.fsf@gmail.com> <20181129184708.4818-1-go.wigust@gmail.com> X-Gnu-PR-Message: they-closed 33549 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 33549@debbugs.gnu.org Date: Mon, 17 Dec 2018 19:24:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1545074642-31657-1" This is a multi-part message in MIME format... ------------=_1545074642-31657-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #33549: [PATCH 0/6] Add Zabbix services. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 33549@debbugs.gnu.org. --=20 33549: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D33549 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1545074642-31657-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 33549-done) by debbugs.gnu.org; 17 Dec 2018 19:23:12 +0000 Received: from localhost ([127.0.0.1]:52159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gYyTw-0008DK-HN for submit@debbugs.gnu.org; Mon, 17 Dec 2018 14:23:12 -0500 Received: from mail-pl1-f178.google.com ([209.85.214.178]:38476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gYyTv-0008D8-9S for 33549-done@debbugs.gnu.org; Mon, 17 Dec 2018 14:23:11 -0500 Received: by mail-pl1-f178.google.com with SMTP id e5so6595793plb.5 for <33549-done@debbugs.gnu.org>; Mon, 17 Dec 2018 11:23:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:in-reply-to:message-id:user-agent:mime-version; bh=nEXPteBVCgeme8Sbd4mXeiKx1i22N9nAlQi/fiZi7wI=; b=pJn5WIa9IAitN+Y27QbBaUSQVCt2umYe1qrj8l1e02QIne+PswnZxXtMYzqKlJe51L imFH1efO+qvGLIQk01OIrRzH9l7CfEpsl8moKgJ4Renur9jeinzsOEmr4kuvqJrcWsO5 qQ7k3P+7rOOHgcq+QWDIBn1Gu4C69aI44r3oc/wgl53yVfhNNWYvsi35nU7RquoiAkhj p+iqG+qIRlFgem+i5iWF2qGegf3hUgQB2RxTDRKbLRHTth78bJQYePlAowZJVyTnHFjZ 3PO1l4Fp403HClQ8sX17BLJ4B60A6wpcBj23P9RSSwolUKLQT6D9jpvSrgNmidzP0M0M KX/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:in-reply-to:message-id :user-agent:mime-version; bh=nEXPteBVCgeme8Sbd4mXeiKx1i22N9nAlQi/fiZi7wI=; b=XUUdN710459foeU1bbEElq7sWv3Kgyn59od4RnP8scnHjKYqBG1ffS82SFcITqdOHI l4/d7Sq62HvbgWfY8oDtYgM1Zyb4K3n1+sLngmLdsAzoQfCZyod+2uXEYvwj2Sd4GkQf sCNdZR6oCrw4AO4rnTXoyR0x/ygvxO66dLjFmuFXny9pz4UVPVZxPezkVp56YSgIqAOm zh3gE2kN85ARmDcE2SSY0sS0KofGrlNYn09GpRJu4D5mEzUeOc5BRS9K5YmUFu8474vV X03jHJ/UES/SVMCH8HplJ0QEjzyWFlFtYKaqUIXEW/sOQkCzWlegy64+/M8e1wfIeR/1 dAAA== X-Gm-Message-State: AA+aEWYALPTOYuW7aI2oeBxiKVEEhJ2RdoVKtp4u4BTzgmffZYR7qlp5 uYyfjWahQGD/lEPwlEnrUXOEPDyb X-Google-Smtp-Source: AFSGD/UFayTtCMinAVlevzy6VvetxId1cxyKNHYwsVyOzkU0KfevnfC7/DXosLwsjPxwvyPq9OuhgA== X-Received: by 2002:a17:902:e002:: with SMTP id ca2mr13950128plb.103.1545074585059; Mon, 17 Dec 2018 11:23:05 -0800 (PST) Received: from magnolia (92-100-172-177.dynamic.avangarddsl.ru. [92.100.172.177]) by smtp.gmail.com with ESMTPSA id p77sm25972442pfi.85.2018.12.17.11.23.02 for <33549-done@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Dec 2018 11:23:04 -0800 (PST) From: Oleg Pykhalov To: bug#33549 <33549-done@debbugs.gnu.org> Subject: Re: Status: [PATCH 0/6] Add Zabbix services. Date: Mon, 17 Dec 2018 22:22:55 +0300 In-Reply-To: bug's message of "Mon\, 17 Dec 2018 19\:18\:53 +0000" Message-ID: <87imzsot4g.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 33549-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Hello Guix, I pushed current patch series to master with a minor fix for 'extra-options' fields and update to a new Zabbix release. f2f956010c64503daa18cf8138a3264212969c3d gnu: zabbix-agentd: Update to 4.0.2. 85c07cff9cd2197a16c2d3544e4930e278513cf7 services: monitoring: Add 'zabbix-front-end'. 1a3e7534d0a02fad1d19173985cf47e1aaa3b956 gnu: Add php-with-bcmath. e517161d6b0ee544dab94477c9ffbad59cc1834b services: php-fpm: Add 'timezone' configuration. 6106d7cae49fb6686a237b53d465c89211ecad8f services: monitoring: Add 'zabbix-agent'. 6b1c4179e2596d860b1c49dea8021bc39d28da67 services: monitoring: Add 'zabbix-server'. 2c9ac8392ad867f65b1313216dbe7179d6083df5 gnu: zabbix-server: Split output. Successfully tested with: make check-system TESTS="zabbix" make check-system TESTS="php-fpm" Oleg. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAlwX948ACgkQFn+OpQAa +pzdvg/9Eb/Otu6mpc6r/GUE3UiO4nZlLB4J7ps0FrjslVtRffY79AkFVjmSAwXx Hq0Jbg9FPanyb0vjyMusnXvQb4z6Jm+Wdlb8Rr0S74i4t7J8p83OrQ3xoeG81CwQ yhrniYxVI4aKI5QQg9TE3KPDiGkyaQSUobxnw1DpZ7k76jlFyv8dOfyVwoE1liJw a4hGlQdUt/s6yD1ffBtemWdCnORplnoW/T/eV17zhalP1XIDsAqK47Lfj8d4PEB2 kPhaBU1xtmx4n5igmJcpigw4EgEjE6S7xTJE/WXvSb8ux8gk/4DmHbPPGKW+Pf04 qmOg7x317vVAllH1v8ZiIPVsHD58u1XtKt6eMDy7NRrsEpxw7FgK1PCi3CgNWHUp G3Owee15rD1mbTG+tyvgCSdgxF5zDU6o1tNfpM5wC7K8synAm51tynXzmQCU4+KL 29rAR2hpAzWEHFoS3aUTQHCW8X6cRzAnFqi2fA+ldCrXON3zSr0fSnE1OTmgo5BY HRMrg5gcxym01XfzXV29SzbbSf0nRHQ6fNrX1lco3r8VD27wBCIqbc16NzpUR7gW jbrxKFCvxJYq8BtWFjy7NGxG1Q7grzURdpbQiIT8yc7pk3th1bllEZRbk4gOiSGh 3S8CKq834U5Bq7fi+RKXnv4YHYMoZ97uEF8Q21JHjdkvtPzFy8s= =Vsy9 -----END PGP SIGNATURE----- --=-=-=-- ------------=_1545074642-31657-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 29 Nov 2018 18:47:44 +0000 Received: from localhost ([127.0.0.1]:55090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSRLk-00021G-8N for submit@debbugs.gnu.org; Thu, 29 Nov 2018 13:47:44 -0500 Received: from eggs.gnu.org ([208.118.235.92]:35703) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gSRLj-000212-0B for submit@debbugs.gnu.org; Thu, 29 Nov 2018 13:47:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gSRLd-0008F6-04 for submit@debbugs.gnu.org; Thu, 29 Nov 2018 13:47:37 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48589) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gSRLc-0008F2-RO for submit@debbugs.gnu.org; Thu, 29 Nov 2018 13:47:36 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSRLb-0004zo-UO for guix-patches@gnu.org; Thu, 29 Nov 2018 13:47:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gSRLY-0008C0-Hy for guix-patches@gnu.org; Thu, 29 Nov 2018 13:47:35 -0500 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]:44622) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gSRLX-0008Ac-Ra for guix-patches@gnu.org; Thu, 29 Nov 2018 13:47:32 -0500 Received: by mail-lf1-x129.google.com with SMTP id z13so2228075lfe.11 for ; Thu, 29 Nov 2018 10:47:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vKeVnN98NpeOgyRsH+X+EjyKZnZ4GXZmV/nWQg6W/s0=; b=tKP+RHscSSf1eJEO9Y2mrlNHPZSycbi4+ZSfXIVoX2Y1cSYcfCCAgW4gm5v6ZMegYM rweL7TYFM3F3OOvPN5Kwu3ql1A6ve5NxXKiFEuyi9VmRojCMr/16X2UwFszj4KyI/i76 Asi0v6wVIjn33WsyaMB3lYHDtVDzimoSq980N3z9fEYLmRv/5qEZlSl3Qie86zBhsR9X sj9Atz1QbJRQzBJjAW78RV/7O9EyHJCopMwaH/cvG88UlnkAfAQIqvP590C8drV+dl+s JC9fTNMtpDQBV4c+++xg/zPHwx5gUXZ43raBcLAfA2TZtZLRFQRDAdWz9PPmOMWvYcnu cy2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=vKeVnN98NpeOgyRsH+X+EjyKZnZ4GXZmV/nWQg6W/s0=; b=D9x3BzX3nc+x7lqMTaskPwxq0+wUl3GeaEwH+tLWz9sm0tSpz4nHmookSYwscIPUJ+ ugOwfhEonSNrN3Yzij0mTolANa+43xgOqZpO4N12qDte2m1RHuZptZ03ngp4yGqg2DUg 8fvOMO90x7XNKk+niqUWRorbRqxKlXU5Q4RvH14HPwDz8tlZq2W7WOE1+ufZwQA7k6YO vewKemFUw7UfxPHYc+VKs18ntS7bzUoBXIZrHtdvLY/GajRVd11/woAxZNh/pVVkd9jv sDgKVuZNIg1pznt7QUG4PpC4STdaMjToq/bJgm+vS+8ySmJK4Z5U+0HBQQnLTRRNJoNt ppNQ== X-Gm-Message-State: AA+aEWYOGUVgTdY6USyOnxSpHitU7r1FrHk5KVqTLKdLkEdaADKF6ClR Nreb4QMRFaxJiHiww4CC4ap6s6QCpaY= X-Google-Smtp-Source: AFSGD/UhIDyvPFqhwCJM0NxubFJNhwfQ519/+/tAaZ/TacXGlo+60+dRzU2HzJnxuhLqFhfdMx/VCw== X-Received: by 2002:a19:1a14:: with SMTP id a20mr1683653lfa.1.1543517249965; Thu, 29 Nov 2018 10:47:29 -0800 (PST) Received: from localhost.localdomain ([178.70.249.201]) by smtp.gmail.com with ESMTPSA id g15sm432039lfb.1.2018.11.29.10.47.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 10:47:29 -0800 (PST) From: Oleg Pykhalov To: guix-patches@gnu.org Subject: [PATCH 0/6] Add Zabbix services. Date: Thu, 29 Nov 2018 21:47:08 +0300 Message-Id: <20181129184708.4818-1-go.wigust@gmail.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: Oleg Pykhalov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hello Guix. This patch series adds Zabbix server, agent and front-end services. I replaced ‘match-lambda’ with ‘php-fpm-configuration-*’ procedures in ‘php-fpm-activation’, because it was not obvious for me why build failed after adding ‘timezone’ field and I spend a plenty of time to figure it out. I'm not sure about ‘php-with-bcmath’ package. ‘php’ package has a comment: Some of the bundled libraries have no proper upstream. Ideally we'd extract these out as separate packages: "mbstring/libmbfl" "date/lib" "bcmath/libbcmath". Well, ‘php-with-bcmath’ could be replaced in future with ‘bcmath/libbcmath’. I'm not ready to do this and it will stop a ‘zabbix-front-end’ service from pushing to master for unknown time. Thanks, Oleg. Oleg Pykhalov (6): gnu: zabbix-server: Split output. services: monitoring: Add 'zabbix-server'. services: monitoring: Add 'zabbix-agent'. services: php-fpm: Add 'timezone' configuration. gnu: Add php-with-bcmath. services: monitoring: Add 'zabbix-front-end'. doc/guix.texi | 320 +++++++++++++++++++++++++ gnu/packages/monitoring.scm | 21 +- gnu/packages/php.scm | 10 + gnu/services/monitoring.scm | 460 +++++++++++++++++++++++++++++++++++- gnu/services/web.scm | 48 ++-- gnu/tests/monitoring.scm | 233 +++++++++++++++++- 6 files changed, 1066 insertions(+), 26 deletions(-) -- 2.19.1 ------------=_1545074642-31657-1-- From unknown Tue Jun 24 17:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33549] [PATCH 5/6] gnu: Add php-with-bcmath. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 19 Dec 2018 15:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33549 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Oleg Pykhalov Cc: 33549@debbugs.gnu.org, Julien Lepiller Received: via spool by 33549-submit@debbugs.gnu.org id=B33549.15452328614539 (code B ref 33549); Wed, 19 Dec 2018 15:21:01 +0000 Received: (at 33549) by debbugs.gnu.org; 19 Dec 2018 15:21:01 +0000 Received: from localhost ([127.0.0.1]:54965 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZded-0001B7-Au for submit@debbugs.gnu.org; Wed, 19 Dec 2018 10:21:01 -0500 Received: from eggs.gnu.org ([208.118.235.92]:46501) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZdec-0001Av-1u for 33549@debbugs.gnu.org; Wed, 19 Dec 2018 10:20:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZdeT-0004uR-5m for 33549@debbugs.gnu.org; Wed, 19 Dec 2018 10:20:51 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39502) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZdeN-0004rE-GG; Wed, 19 Dec 2018 10:20:43 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=46250 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gZdeN-0007O6-6l; Wed, 19 Dec 2018 10:20:43 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20181129185042.6050-1-go.wigust@gmail.com> <20181129185042.6050-5-go.wigust@gmail.com> Date: Wed, 19 Dec 2018 16:20:41 +0100 In-Reply-To: <20181129185042.6050-5-go.wigust@gmail.com> (Oleg Pykhalov's message of "Thu, 29 Nov 2018 21:50:41 +0300") Message-ID: <87k1k5v8za.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hi Oleg, Sorry for the late reply! Oleg Pykhalov skribis: > * gnu/packages/php.scm (php-with-bcmath): New variable. [...] > +(define-public php-with-bcmath > + (package > + (inherit php) > + (name "php-with-bcmath") > + (arguments > + (substitute-keyword-arguments (package-arguments php) > + ((#:configure-flags flags) > + `(cons "--enable-bcmath" ,flags)))))) Any reason not to make it the default =E2=80=98php=E2=80=99 package? Ludo=E2=80=99. From unknown Tue Jun 24 17:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33549] [PATCH 6/6] services: monitoring: Add 'zabbix-front-end'. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 19 Dec 2018 15:28:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33549 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Oleg Pykhalov Cc: 33549@debbugs.gnu.org Received: via spool by 33549-submit@debbugs.gnu.org id=B33549.15452332685224 (code B ref 33549); Wed, 19 Dec 2018 15:28:03 +0000 Received: (at 33549) by debbugs.gnu.org; 19 Dec 2018 15:27:48 +0000 Received: from localhost ([127.0.0.1]:54979 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZdlD-0001MC-JV for submit@debbugs.gnu.org; Wed, 19 Dec 2018 10:27:47 -0500 Received: from eggs.gnu.org ([208.118.235.92]:48919) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZdlB-0001Ly-MK for 33549@debbugs.gnu.org; Wed, 19 Dec 2018 10:27:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZdl5-0005Ai-Me for 33549@debbugs.gnu.org; Wed, 19 Dec 2018 10:27:40 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39716) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZdl5-0005AC-Gr; Wed, 19 Dec 2018 10:27:39 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=46824 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gZdl5-000897-4E; Wed, 19 Dec 2018 10:27:39 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20181129185042.6050-1-go.wigust@gmail.com> <20181129185042.6050-6-go.wigust@gmail.com> Date: Wed, 19 Dec 2018 16:27:37 +0100 In-Reply-To: <20181129185042.6050-6-go.wigust@gmail.com> (Oleg Pykhalov's message of "Thu, 29 Nov 2018 21:50:42 +0300") Message-ID: <87efadv8nq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hi Oleg, Oleg Pykhalov skribis: > +(define zabbix-front-end-config > + (match-lambda > + (($ > + _ db-host db-port db-name db-user db-password db-secret-file > + zabbix-host zabbix-port) > + (mixed-text-file "zabbix.conf.php" > + "\ > + +// Zabbix GUI configuration file. > +global $DB; > + > +$DB['TYPE'] =3D 'POSTGRESQL'; > +$DB['SERVER'] =3D '" db-host "'; > +$DB['PORT'] =3D '" (number->string db-port) "'; > +$DB['DATABASE'] =3D '" db-name "'; > +$DB['USER'] =3D '" db-user "'; > +$DB['PASSWORD'] =3D '" (if (string-null? db-password) > + (if (string-null? db-secret-file) > + (display "Provide a `db-secret-file' \ > +or `db-password' field. > +" > + (current-error-port)) > + (string-trim-both > + (with-input-from-file db-secret-file > + read-string))) > + (begin > + (display " > +Hint: Consider use `db-secret-file' instead of `db-password' and unset > +`db-password' in `zabbix-front-end-configuration' for security. > +") > + db-password)) "'; > + > +// Schema name. Used for IBM DB2 and PostgreSQL. > +$DB['SCHEMA'] =3D ''; > + > +$ZBX_SERVER =3D '" zabbix-host "'; > +$ZBX_SERVER_PORT =3D '" (number->string zabbix-port) "'; > +$ZBX_SERVER_NAME =3D ''; > + > +$IMAGE_FORMAT_DEFAULT =3D IMAGE_FORMAT_PNG; > +")))) I saw these =E2=80=9Chints=E2=80=9D in the build log of Cuirass and that go= t me curious. :-) A couple of comments=E2=80=A6 For consistency, hints should be reported us= ing the =E2=80=98display-hint=E2=80=99 procedure, which takes a Texinfo string = as input. Second, while the second =E2=80=98display=E2=80=99 call does look like a hi= nt, the first one looks like it should be an error, shouldn=E2=80=99t it? In that case, = I=E2=80=99d suggest something like: (raise (condition (&message (message "You must provide either 'db-secret-file' or 'db-passw= ord'.")))) Third, it would be nice to report source location info along with hints and errors. To do that, you could add an innate =E2=80=98location=E2=80=99= field to as done for . Then, along with the &message condition above, you could raise an &error-location as is done in a few places. Does that make sense? Anyway thanks for this patch series, we=E2=80=99ll probably put it to good = use on the build farm! Ludo=E2=80=99. From unknown Tue Jun 24 17:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33549] [PATCH 6/6] services: monitoring: Add 'zabbix-front-end'. Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 19 Dec 2018 18:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33549 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 33549-done@debbugs.gnu.org Received: via spool by 33549-done@debbugs.gnu.org id=D33549.154524406830980 (code D ref 33549); Wed, 19 Dec 2018 18:28:02 +0000 Received: (at 33549-done) by debbugs.gnu.org; 19 Dec 2018 18:27:48 +0000 Received: from localhost ([127.0.0.1]:55084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZgZQ-00083c-Gb for submit@debbugs.gnu.org; Wed, 19 Dec 2018 13:27:48 -0500 Received: from mail-pf1-f174.google.com ([209.85.210.174]:36347) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZgZN-00083L-Tg for 33549-done@debbugs.gnu.org; Wed, 19 Dec 2018 13:27:46 -0500 Received: by mail-pf1-f174.google.com with SMTP id b85so10214415pfc.3 for <33549-done@debbugs.gnu.org>; Wed, 19 Dec 2018 10:27:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=gWwc/gCAZjqxtiIHREDrLX2rqvX76Yr7uvMSYHOCzKc=; b=X5bPvr6j94Rlyl38Ob28P50tPz1HYBDEd0WDRaB5uLnxk+0vJd5iLot7Fs9xh9Oynl Jl3+gGjuMcfpoDDSHsUOlTshF2NrvUGmSpr1ya/EL2gFE7u/SyrfdX6DxPkND4mYWVhr cS/8zb3fg9u+GNxWDwC1f+zy/e+uJcb8X0tTmbAP8wuk7pCWJ6RKr8DMGfB+3VojZgiK 2el1zEmvIoPPUE+TLyd1C9oBJnCD2B41P6YV8bVbFdadZZxjm/75DtqKs4WKQZyZ9+8q UxzupeFges5jVyRpooTG/b1n3yPU6fVPkEPNNGDiaFomDj0x95Hoqv6vozY+sIQzQhre DsVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=gWwc/gCAZjqxtiIHREDrLX2rqvX76Yr7uvMSYHOCzKc=; b=plxk06tysnyGFmNlWRbL/gv0TQBEi2uBZktTFVks/KnyQOof3dRNhvvw7mmp3E1F32 mLU1hkTFBn3x5f9Qztn7Hmj70VSDxzjVF0Fhrg6a1OnrupkXmLn78LUR2AYrlhCd8YGi SzoJmoUsm31NeBT2xPzAa5gESJwIFMZ64RvpSlr0pK40RsOJjk7TbKPy1Jio+pcJaRv1 HPUa8v5bXVZHj/23I7Uw29KxVVk9s1EBwenWJB/UDQJ/VEqy1rIFxqXmIch9GmRO7FGX idutjwZnUqWQqu5NlXanHaHPNNGr2/GSoL31+50RnBAWPwxaxIWnzl2zOczpFJNsndzm BlCA== X-Gm-Message-State: AA+aEWazMd+FrMhLZWtZU9qBi3gJ2PCMIA7YqZkDfZiA7+HQDs/QSCbs DE0umOdP6vS4GVXWAbne0XAVJaFn X-Google-Smtp-Source: AFSGD/UM3ATgB2LJmmAdAndenML12oHofqhOIijTUnh5AAkeMGxroSEEoLR7iyjIN2+KKpt0TtEByQ== X-Received: by 2002:a63:1013:: with SMTP id f19mr20560616pgl.38.1545244059642; Wed, 19 Dec 2018 10:27:39 -0800 (PST) Received: from magnolia (pppoe.95-55-147-194.dynamic.avangarddsl.ru. [95.55.147.194]) by smtp.gmail.com with ESMTPSA id n68sm27396010pfb.62.2018.12.19.10.27.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Dec 2018 10:27:38 -0800 (PST) From: Oleg Pykhalov References: <20181129185042.6050-1-go.wigust@gmail.com> <20181129185042.6050-6-go.wigust@gmail.com> <87efadv8nq.fsf@gnu.org> Date: Wed, 19 Dec 2018 21:27:28 +0300 In-Reply-To: <87efadv8nq.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 19 Dec 2018 16:27:37 +0100") Message-ID: <878t0lpe27.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludovic, Thank you for review. Ludovic Court=C3=A8s writes: [=E2=80=A6] >> +$DB['PASSWORD'] =3D '" (if (string-null? db-password) >> + (if (string-null? db-secret-file) >> + (display "Provide a `db-secret-file' \ >> +or `db-password' field. >> +" >> + (current-error-port)) >> + (string-trim-both >> + (with-input-from-file db-secret-file >> + read-string))) >> + (begin >> + (display " >> +Hint: Consider use `db-secret-file' instead of `db-password' and unset >> +`db-password' in `zabbix-front-end-configuration' for security. >> +") >> + db-password)) "'; >> + >> +// Schema name. Used for IBM DB2 and PostgreSQL. >> +$DB['SCHEMA'] =3D ''; >> + >> +$ZBX_SERVER =3D '" zabbix-host "'; >> +$ZBX_SERVER_PORT =3D '" (number->string zabbix-port) "'; >> +$ZBX_SERVER_NAME =3D ''; >> + >> +$IMAGE_FORMAT_DEFAULT =3D IMAGE_FORMAT_PNG; >> +")))) > > I saw these =E2=80=9Chints=E2=80=9D in the build log of Cuirass and that = got me curious. > :-) Do you mean =E2=80=9Chints=E2=80=9D during =E2=80=98zabbix=E2=80=99 tests? > A couple of comments=E2=80=A6 For consistency, hints should be reported = using > the =E2=80=98display-hint=E2=80=99 procedure, which takes a Texinfo strin= g as input. > > Second, while the second =E2=80=98display=E2=80=99 call does look like a = hint, the first > one looks like it should be an error, shouldn=E2=80=99t it? In that case= , I=E2=80=99d > suggest something like: > > (raise (condition > (&message > (message "You must provide either 'db-secret-file' or 'db-pas= sword'.")))) Thanks, pushed as 0485717ee94e7f161d072f017edce5d35df49c81 to master. > Third, it would be nice to report source location info along with hints > and errors. To do that, you could add an innate =E2=80=98location=E2=80= =99 field to > as done for . Then, along > with the &message condition above, you could raise an &error-location as > is done in a few places. > > Does that make sense? Sure. I see innate location field in , but unfortunately I'm not sure how to implement it, because we use define-configuration for . So the implementation of that feature may take a time. ;-) > Anyway thanks for this patch series, we=E2=80=99ll probably put it to goo= d use > on the build farm! Feel free to ping me. Oleg. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAlwajZAACgkQFn+OpQAa +pxZ5w/7BGDv/ni1oZziA96kk8imzamuFsHAzWSR+vZ4aDUt/fCfghuB/wXa2JBr +Rol3oT6WjRxigKWyNthgb/6cTGTwkJul9RtzSwWb/Hk/LN++nAbdxzoXzt40pXh w6CVpGxnNTn7XB75rFhCQciC+uF5gLKsxWyO+dnw5fjDgHPPkeGvkYcQFbjWA+fz kkqmy7PNO4akBF5z4D2r8KVaa7rLpBvqXG7h6DXmKRE50qUSnM0fwMyjxQTx10OR ZCzOm4crD6x9DgT5v7HVT7crkrRlNHWfLFxEbFuBpxZ57h7vtlZdL5IrmBABqE7Q v6wwl7AiomgzQnxCtPhg4wE+k3Awv5ODgzh+ZLwIbLt8YQTJ1R2jqJdYyka/DH6D NKwiN5zcMYtvrMR8Apq+tBfKSUguVctOBFryneIeZ5rxZ83HCLCSe1glvtfm2IRp OP7kItM4p35oGVnWkeVcsd31noXnlvuI+zOy0wNzf13dPRc6zxWfo8iGU4ScL8x9 uBINl0kCtpMKKo7oZkPrG9a15WubBkUYUMrxMZROehN2PmEOVrVkdoCp8n3wrerT 5Q6JeaC4js4o2P4SQ2/Wk3FKHFW4eI3R8SmgMOykb3UO7tZslrO66jFbyO4JAQEW QqWzTbtWuGnTDpN4lZTVn/xB4QYsKrVA0skCfzrxzjV+pYufvRY= =BF3Z -----END PGP SIGNATURE----- --=-=-=-- From unknown Tue Jun 24 17:28:12 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#33549] [PATCH 6/6] services: monitoring: Add 'zabbix-front-end'. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 20 Dec 2018 11:07:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33549 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Oleg Pykhalov Cc: 33549-done@debbugs.gnu.org Received: via spool by 33549-done@debbugs.gnu.org id=D33549.154530398016557 (code D ref 33549); Thu, 20 Dec 2018 11:07:03 +0000 Received: (at 33549-done) by debbugs.gnu.org; 20 Dec 2018 11:06:20 +0000 Received: from localhost ([127.0.0.1]:55520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZw9j-0004Iy-Q8 for submit@debbugs.gnu.org; Thu, 20 Dec 2018 06:06:20 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51091) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gZw9g-0004Ii-EZ for 33549-done@debbugs.gnu.org; Thu, 20 Dec 2018 06:06:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gZw9a-0007Wx-L5 for 33549-done@debbugs.gnu.org; Thu, 20 Dec 2018 06:06:11 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gZw9a-0007Wn-El; Thu, 20 Dec 2018 06:06:10 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=60742 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gZw9Z-0004bo-PW; Thu, 20 Dec 2018 06:06:10 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20181129185042.6050-1-go.wigust@gmail.com> <20181129185042.6050-6-go.wigust@gmail.com> <87efadv8nq.fsf@gnu.org> <878t0lpe27.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 30 Frimaire an 227 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 20 Dec 2018 12:06:08 +0100 In-Reply-To: <878t0lpe27.fsf@gmail.com> (Oleg Pykhalov's message of "Wed, 19 Dec 2018 21:27:28 +0300") Message-ID: <87o99gqwyn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) Hi Oleg, Oleg Pykhalov skribis: > Ludovic Court=C3=A8s writes: > > [=E2=80=A6] > >>> +$DB['PASSWORD'] =3D '" (if (string-null? db-password) >>> + (if (string-null? db-secret-file) >>> + (display "Provide a `db-secret-file' \ >>> +or `db-password' field. >>> +" >>> + (current-error-port)) >>> + (string-trim-both >>> + (with-input-from-file db-secret-file >>> + read-string))) >>> + (begin >>> + (display " >>> +Hint: Consider use `db-secret-file' instead of `db-password' and unset >>> +`db-password' in `zabbix-front-end-configuration' for security. >>> +") >>> + db-password)) "'; >>> + >>> +// Schema name. Used for IBM DB2 and PostgreSQL. >>> +$DB['SCHEMA'] =3D ''; >>> + >>> +$ZBX_SERVER =3D '" zabbix-host "'; >>> +$ZBX_SERVER_PORT =3D '" (number->string zabbix-port) "'; >>> +$ZBX_SERVER_NAME =3D ''; >>> + >>> +$IMAGE_FORMAT_DEFAULT =3D IMAGE_FORMAT_PNG; >>> +")))) >> >> I saw these =E2=80=9Chints=E2=80=9D in the build log of Cuirass and that= got me curious. >> :-) > > Do you mean =E2=80=9Chints=E2=80=9D during =E2=80=98zabbix=E2=80=99 tests? Yes, in the output of the =E2=80=9Cevaluation=E2=80=9D of the =E2=80=98guix= -master=E2=80=99 jobset. >> Third, it would be nice to report source location info along with hints >> and errors. To do that, you could add an innate =E2=80=98location=E2=80= =99 field to >> as done for . Then, along >> with the &message condition above, you could raise an &error-location as >> is done in a few places. >> >> Does that make sense? > > Sure. I see innate location field in , but unfortunately I'm > not sure how to implement it, because we use define-configuration for > . So the implementation of that feature > may take a time. ;-) We could probably change =E2=80=98define-configuration=E2=80=99 to add a = =E2=80=98location=E2=80=99 field unconditionally. But yeah, we=E2=80=99ll see! Thanks, Ludo=E2=80=99.