guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: Add zabbix-agentd and zabbix-server.


From: Oleg Pykhalov
Subject: 01/01: gnu: Add zabbix-agentd and zabbix-server.
Date: Sat, 1 Sep 2018 12:02:15 -0400 (EDT)

wigust pushed a commit to branch master
in repository guix.

commit ead46692ec8a17ed9cf668131343d7cf1b3725e5
Author: Oleg Pykhalov <address@hidden>
Date:   Fri Aug 31 05:50:33 2018 +0300

    gnu: Add zabbix-agentd and zabbix-server.
    
    * gnu/packages/monitoring.scm (zabbix-agentd, zabbix-server): New variables.
---
 gnu/packages/monitoring.scm | 85 +++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 83 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/monitoring.scm b/gnu/packages/monitoring.scm
index fae62d5..a59e51a 100644
--- a/gnu/packages/monitoring.scm
+++ b/gnu/packages/monitoring.scm
@@ -3,7 +3,8 @@
 ;;; Copyright © 2018 Sou Bunnbu <address@hidden>
 ;;; Copyright © 2017, 2018 Ricardo Wurmus <address@hidden>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <address@hidden>
-;;; Copyright © 2018 Gábor Boskovits <address@hidden>
+;;; Copyright © 2018 Gábor Boskovits <address@hidden>w
+;;; Copyright © 2018 Oleg Pykhalov <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -29,18 +30,25 @@
   #:use-module (guix build-system python)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system go)
+  #:use-module (guix utils)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages curl)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages databases)
   #:use-module (gnu packages django)
   #:use-module (gnu packages gd)
   #:use-module (gnu packages image)
   #:use-module (gnu packages mail)
+  #:use-module (gnu packages networking)
+  #:use-module (gnu packages libevent)
+  #:use-module (gnu packages pcre)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-web)
-  #:use-module (gnu packages time))
+  #:use-module (gnu packages time)
+  #:use-module (gnu packages tls))
 
 (define-public nagios
   (package
@@ -138,6 +146,79 @@ etc. via a Web interface.  Features include:
 @end itemize\n")
     (license license:gpl2)))
 
+(define-public zabbix-agentd
+  (package
+    (name "zabbix-agentd")
+    (version "3.4.11")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "mirror://sourceforge/zabbix/ZABBIX%20Latest%20Stable/" version
+             "/zabbix-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0qxgf6hx7ibhjmxd2sxizkjc8df4c9d31wz5hhql409ws98qf173"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (list "--enable-agent"
+             (string-append "--with-iconv="
+                            (assoc-ref %build-inputs "libiconv"))
+             (string-append "--with-libpcre="
+                            (assoc-ref %build-inputs "pcre")))))
+    (inputs
+     `(("libiconv" ,libiconv)
+       ("pcre" ,pcre)))
+    (home-page "https://www.zabbix.com/";)
+    (synopsis "Distributed monitoring solution (client-side agent)")
+    (description "This package provides a distributed monitoring
+solution (client-side agent)")
+    (license license:gpl2)))
+
+(define-public zabbix-server
+  (package
+    (inherit zabbix-agentd)
+    (name "zabbix-server")
+    (arguments
+     (substitute-keyword-arguments
+         `(#:phases
+           (modify-phases %standard-phases
+             (add-after 'install 'install-frontend
+               (lambda* (#:key outputs #:allow-other-keys)
+                 (let* ((php (string-append (assoc-ref outputs "out")
+                                            "/share/zabbix/php"))
+                        (front-end-conf (string-append php "/conf"))
+                        (etc (string-append php "/etc")))
+                   (mkdir-p php)
+                   (copy-recursively "./frontends/php" php)
+                   (rename-file front-end-conf
+                                (string-append front-end-conf "-example"))
+                   (symlink "/etc/zabbix" front-end-conf)))))
+           ,@(package-arguments zabbix-agentd))
+       ((#:configure-flags flags)
+        `(cons* "--enable-server"
+                "--with-postgresql"
+                (string-append "--with-libevent="
+                               (assoc-ref %build-inputs "libevent"))
+                "--with-net-snmp"
+                (string-append "--with-gnutls="
+                               (assoc-ref %build-inputs "gnutls"))
+                "--with-libcurl"
+                ,flags))))
+    (inputs
+     `(("curl" ,curl)
+       ("libevent" ,libevent)
+       ("gnutls" ,gnutls)
+       ("postgresql" ,postgresql)
+       ("zlib" ,zlib)
+       ("net-snmp" ,net-snmp)
+       ("curl" ,curl)
+       ,@(package-inputs zabbix-agentd)))
+    (synopsis "Distributed monitoring solution (server-side)")
+    (description "This package provides a distributed monitoring
+solution (server-side)")))
+
 (define-public darkstat
   (package
     (name "darkstat")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]