diff options
author | Bian Naimeng <biannm@cn.fujitsu.com> | 2015-06-25 13:12:56 +0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-07-16 21:09:11 +0200 |
commit | 7169f1631af6b9b3302e5f3906688cec63bae93d (patch) | |
tree | d03947308a0082c826739e7b70d0fe724b9a1683 /meta-oe | |
parent | b9a8410d15eb55aebe9be9ae2e89ded4d3771b51 (diff) | |
download | meta-openembedded-7169f1631af6b9b3302e5f3906688cec63bae93d.tar.gz |
zabbix: add new recipe
zabbix is an open-source monitoring solution for your IT infrastructure.
Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe')
3 files changed, 105 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/zabbix/zabbix/0001-Fix-configure.ac.patch b/meta-oe/recipes-connectivity/zabbix/zabbix/0001-Fix-configure.ac.patch new file mode 100644 index 000000000..af14a1a56 --- /dev/null +++ b/meta-oe/recipes-connectivity/zabbix/zabbix/0001-Fix-configure.ac.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | uname can not get version of kernel correctly while cross compile | ||
2 | |||
3 | Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> | ||
4 | --- | ||
5 | configure.ac | 2 +- | ||
6 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
7 | |||
8 | diff --git a/configure.ac b/configure.ac | ||
9 | index 523899b..4e6ae0d 100644 | ||
10 | --- a/configure.ac | ||
11 | +++ b/configure.ac | ||
12 | @@ -924,7 +924,7 @@ AC_MSG_RESULT([$ARCH ($host_os)]) | ||
13 | if test "x$ARCH" = "xlinux"; then | ||
14 | AC_MSG_CHECKING([for the linux kernel version]) | ||
15 | |||
16 | - kernel=`uname -r` | ||
17 | + kernel="${KERNEL_VERSION}" | ||
18 | |||
19 | case "${kernel}" in | ||
20 | 2.6.*) | ||
21 | -- | ||
22 | 1.8.3.1 | ||
23 | |||
diff --git a/meta-oe/recipes-connectivity/zabbix/zabbix/zabbix-agent.service b/meta-oe/recipes-connectivity/zabbix/zabbix/zabbix-agent.service new file mode 100644 index 000000000..b18a96f8b --- /dev/null +++ b/meta-oe/recipes-connectivity/zabbix/zabbix/zabbix-agent.service | |||
@@ -0,0 +1,12 @@ | |||
1 | [Unit] | ||
2 | Description=Zabbix Monitor Agent | ||
3 | After=syslog.target network.target | ||
4 | |||
5 | [Service] | ||
6 | Type=oneshot | ||
7 | ExecStart=@SBINDIR@/zabbix_agentd | ||
8 | RemainAfterExit=yes | ||
9 | User=zabbix | ||
10 | |||
11 | [Install] | ||
12 | WantedBy=multi-user.target | ||
diff --git a/meta-oe/recipes-connectivity/zabbix/zabbix_2.4.5.bb b/meta-oe/recipes-connectivity/zabbix/zabbix_2.4.5.bb new file mode 100644 index 000000000..35c7d64a0 --- /dev/null +++ b/meta-oe/recipes-connectivity/zabbix/zabbix_2.4.5.bb | |||
@@ -0,0 +1,70 @@ | |||
1 | SUMMARY = "Open-source monitoring solution for your IT infrastructure" | ||
2 | DESCRIPTION = "\ | ||
3 | ZABBIX is software that monitors numerous parameters of a network and the \ | ||
4 | health and integrity of servers. ZABBIX uses a flexible notification \ | ||
5 | mechanism that allows users to configure e-mail based alerts for virtually \ | ||
6 | any event. This allows a fast reaction to server problems. ZABBIX offers \ | ||
7 | excellent reporting and data visualisation features based on the stored \ | ||
8 | data. This makes ZABBIX ideal for capacity planning. \ | ||
9 | \ | ||
10 | ZABBIX supports both polling and trapping. All ZABBIX reports and \ | ||
11 | statistics, as well as configuration parameters are accessed through a \ | ||
12 | web-based front end. A web-based front end ensures that the status of \ | ||
13 | your network and the health of your servers can be assessed from any \ | ||
14 | location. Properly configured, ZABBIX can play an important role in \ | ||
15 | monitoring IT infrastructure. This is equally true for small \ | ||
16 | organisations with a few servers and for large companies with a \ | ||
17 | multitude of servers." | ||
18 | HOMEPAGE = "http://www.zabbix.com/" | ||
19 | SECTION = "Applications/Internet" | ||
20 | LICENSE = "GPLv2+" | ||
21 | LIC_FILES_CHKSUM = "file://COPYING;md5=300e938ad303147fede2294ed78fe02e" | ||
22 | DEPENDS = "openldap virtual/libiconv" | ||
23 | |||
24 | SRC_URI = "http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/${PV}/${BPN}-${PV}.tar.gz \ | ||
25 | file://0001-Fix-configure.ac.patch \ | ||
26 | file://zabbix-agent.service" | ||
27 | |||
28 | SRC_URI[md5sum] = "a82eb0d55d3ca947e10a4a55238f4388" | ||
29 | SRC_URI[sha256sum] = "4e2cf1e4893a45d83379a05e2debabddf16beab324c93e84adc0bb57716fb957" | ||
30 | |||
31 | inherit autotools-brokensep linux-kernel-base pkgconfig systemd useradd | ||
32 | |||
33 | SYSTEMD_PACKAGES = "${PN}" | ||
34 | SYSTEMD_SERVICE_${PN} = "zabbix-agent.service" | ||
35 | SYSTEMD_AUTO_ENABLE = "enable" | ||
36 | |||
37 | USERADD_PACKAGES = "${PN}" | ||
38 | GROUPADD_PARAM_${PN} = "-r zabbix" | ||
39 | USERADD_PARAM_${PN} = "-r -g zabbix -d /var/lib/zabbix \ | ||
40 | -s /sbin/nologin -c \"Zabbix Monitoring System\" zabbix" | ||
41 | |||
42 | KERNEL_VERSION = "${@get_kernelversion_headers('${STAGING_KERNEL_DIR}')}" | ||
43 | |||
44 | EXTRA_OECONF = '--enable-dependency-tracking \ | ||
45 | --enable-agent \ | ||
46 | --enable-ipv6 \ | ||
47 | --with-net-snmp \ | ||
48 | --with-ldap=${STAGING_EXECPREFIXDIR} \ | ||
49 | --with-jabber \ | ||
50 | --with-unixodbc \ | ||
51 | --with-ssh2 \ | ||
52 | --with-sqlite3 \ | ||
53 | ' | ||
54 | CFLAGS_append += "-lldap -llber" | ||
55 | |||
56 | do_configure_prepend() { | ||
57 | export KERNEL_VERSION="${KERNEL_VERSION}" | ||
58 | } | ||
59 | |||
60 | do_install_append() { | ||
61 | if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
62 | install -d ${D}${systemd_unitdir}/system | ||
63 | install -m 0644 ${WORKDIR}/zabbix-agent.service ${D}${systemd_unitdir}/system/ | ||
64 | sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/zabbix-agent.service | ||
65 | fi | ||
66 | } | ||
67 | |||
68 | FILES_${PN} += "${libdir}" | ||
69 | |||
70 | RDEPENDS_${PN} = "logrotate" | ||