mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-16 16:27:27 +00:00
netdata: add new recipe
Netdata are a performance monitoring tools for Linux systems, applications. Netdata interface are available via http on port 19999: http://<ip address>:19999 Signed-off-by: Christophe Priouzeau <christophe.priouzeau@st.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
committed by
Martin Jansa
parent
831f710eca
commit
23a1c2ea7e
@@ -0,0 +1,19 @@
|
|||||||
|
diff --git a/plugins.d/charts.d.plugin b/plugins.d/charts.d.plugin
|
||||||
|
index 40c0356..bca57b3 100755
|
||||||
|
--- a/plugins.d/charts.d.plugin
|
||||||
|
+++ b/plugins.d/charts.d.plugin
|
||||||
|
@@ -184,10 +184,10 @@ fi
|
||||||
|
# timeout command we use, providing a function that
|
||||||
|
# can emulate the timeout command we need:
|
||||||
|
# > timeout SECONDS command ...
|
||||||
|
-if [ $check_for_timeout -eq 1 ]
|
||||||
|
- then
|
||||||
|
- require_cmd timeout || exit 1
|
||||||
|
-fi
|
||||||
|
+#if [ $check_for_timeout -eq 1 ]
|
||||||
|
+# then
|
||||||
|
+# require_cmd timeout || exit 1
|
||||||
|
+#fi
|
||||||
|
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# internal checks
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Netdata, Real-time performance monitoring
|
||||||
|
RequiresMountsFor=/var
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=root
|
||||||
|
ExecStartPre=/bin/mkdir -p /var/log/netdata
|
||||||
|
ExecStartPre=/bin/chown -R nobody.netdata @@datadir/netdata/web
|
||||||
|
ExecStartPre=/bin/chown -R nobody.netdata /var/cache/netdata
|
||||||
|
ExecStart=/usr/sbin/netdata -nd
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
HOMEPAGE = "https://github.com/firehol/netdata/"
|
||||||
|
SUMMARY = "Real-time performance monitoring"
|
||||||
|
LICENSE = "GPLv3"
|
||||||
|
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=747afe070ea9d6c2be0a31353609a35b"
|
||||||
|
|
||||||
|
SRC_URI = "git://github.com/firehol/netdata.git;protocol=https"
|
||||||
|
SRCREV = "36c1304e37094174ea51001903058e65053107ca"
|
||||||
|
|
||||||
|
# patch to disable timeout because timeout are not available with actual version
|
||||||
|
# of core-utils
|
||||||
|
SRC_URI += "file://0001-Correct-Timeout-issue.patch"
|
||||||
|
|
||||||
|
# default netdata.conf for netdata configuration
|
||||||
|
SRC_URI += "file://netdata.conf"
|
||||||
|
|
||||||
|
# file for providing systemd service support
|
||||||
|
SRC_URI += "file://netdata.service"
|
||||||
|
|
||||||
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
|
inherit pkgconfig autotools useradd systemd
|
||||||
|
|
||||||
|
#systemd
|
||||||
|
SYSTEMD_PACKAGES = "${PN}"
|
||||||
|
SYSTEMD_SERVICE_${PN} = "netdata.service"
|
||||||
|
SYSTEMD_AUTO_ENABLE_${PN} = "enable"
|
||||||
|
|
||||||
|
#User specific
|
||||||
|
USERADD_PACKAGES = "${PN}"
|
||||||
|
GROUPADD_PARAM_${PN} = "--system netdata"
|
||||||
|
|
||||||
|
do_install_append() {
|
||||||
|
#set S UID for plugins
|
||||||
|
chmod 4755 ${D}${libexecdir}/netdata/plugins.d/apps.plugin
|
||||||
|
|
||||||
|
if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
||||||
|
# Install systemd unit files
|
||||||
|
install -d ${D}${systemd_unitdir}/system
|
||||||
|
install -m 0644 ${WORKDIR}/netdata.service ${D}${systemd_unitdir}/system
|
||||||
|
sed -i -e 's,@@datadir,${datadir_native},g' ${D}${systemd_unitdir}/system/netdata.service
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Install default netdata.conf
|
||||||
|
install -d ${D}${sysconfdir}/netdata
|
||||||
|
install -m 0644 ${WORKDIR}/netdata.conf ${D}${sysconfdir}/netdata/
|
||||||
|
sed -i -e 's,@@sysconfdir,${sysconfdir},g' ${D}${sysconfdir}/netdata/netdata.conf
|
||||||
|
sed -i -e 's,@@libdir,${libexecdir},g' ${D}${sysconfdir}/netdata/netdata.conf
|
||||||
|
sed -i -e 's,@@datadir,${datadir},g' ${D}${sysconfdir}/netdata/netdata.conf
|
||||||
|
}
|
||||||
|
|
||||||
|
FILES_${PN}-dbg += "${libexecdir}/netdata/plugins.d/.debug"
|
||||||
|
RDEPENDS_${PN} = "bash zlib"
|
||||||
Reference in New Issue
Block a user