From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Christophe PRIOUZEAU <christophe.priouzeau@st.com>
Subject: Re: [meta-webserver][PATCH v2] netdata: add new recipe
Date: Tue, 19 Apr 2016 17:13:54 +0200 [thread overview]
Message-ID: <20160419151354.GE2562@jama> (raw)
In-Reply-To: <1461077564-25584-1-git-send-email-christophe.priouzeau@st.com>
[-- Attachment #1: Type: text/plain, Size: 4123 bytes --]
On Tue, Apr 19, 2016 at 04:52:44PM +0200, Christophe PRIOUZEAU wrote:
> 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>
> ---
> .../netdata/0001-Correct-Timeout-issue.patch | 35 +
> .../recipes-webadmin/netdata/netdata/netdata.conf | 5083 ++++++++++++++++++++
> .../netdata/netdata/netdata.service | 13 +
> .../recipes-webadmin/netdata/netdata_git.bb | 46 +
> 4 files changed, 5177 insertions(+)
> create mode 100644 meta-webserver/recipes-webadmin/netdata/netdata/0001-Correct-Timeout-issue.patch
> create mode 100644 meta-webserver/recipes-webadmin/netdata/netdata/netdata.conf
> create mode 100644 meta-webserver/recipes-webadmin/netdata/netdata/netdata.service
> create mode 100644 meta-webserver/recipes-webadmin/netdata/netdata_git.bb
...
> diff --git a/meta-webserver/recipes-webadmin/netdata/netdata/netdata.service b/meta-webserver/recipes-webadmin/netdata/netdata/netdata.service
> new file mode 100644
> index 0000000..bd696b6
> --- /dev/null
> +++ b/meta-webserver/recipes-webadmin/netdata/netdata/netdata.service
> @@ -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 /usr/share/netdata/web
> +ExecStartPre=/bin/chown -R nobody.netdata /var/cache/netdata
> +ExecStart=/usr/sbin/netdata -nd
> +
> +[Install]
> +WantedBy=multi-user.target
> diff --git a/meta-webserver/recipes-webadmin/netdata/netdata_git.bb b/meta-webserver/recipes-webadmin/netdata/netdata_git.bb
> new file mode 100644
> index 0000000..b4161af
> --- /dev/null
> +++ b/meta-webserver/recipes-webadmin/netdata/netdata_git.bb
> @@ -0,0 +1,46 @@
> +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}/usr/lib/netdata/netdata/plugins.d/apps.plugin
> +
> + # Install systemd unit files
> + install -d ${D}${systemd_unitdir}/system
> + install -m 0644 ${WORKDIR}/netdata.service ${D}${systemd_unitdir}/system
You should respect systemd in DISTRO_FEATURES when installing the
service file (you can use:
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
)
Also use the variables for paths in .service file (if netdata build
respects them) as suggested in previous reply.
> +
> + # Install default netdata.conf
> + install -d ${D}/etc/netdata
> + install -m 0644 ${WORKDIR}/netdata.conf ${D}/etc/netdata/
> +}
> +
> +FILES_${PN}-dbg += "/usr/lib/netdata/netdata/plugins.d/.debug"
> +RDEPENDS_${PN} = "bash"
> --
> 1.9.1
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
--
Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]
prev parent reply other threads:[~2016-04-19 15:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-19 14:52 [meta-webserver][PATCH v2] netdata: add new recipe Christophe PRIOUZEAU
2016-04-19 15:13 ` Martin Jansa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160419151354.GE2562@jama \
--to=martin.jansa@gmail.com \
--cc=christophe.priouzeau@st.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox