Netdata addon by ummeegge

Anything preventing me from going this way?

https://pkgs.org/download/libjson-c.so.5

Nothing, as long as you trust the source that you will be downloading it from and the source they copied it from if they didnā€™t compile the library themselves.

Have no way of determining whether that source is trustworthy so Iā€™ll wait for Siosios to perhaps post some about it.

Updated NetData to the latest for Ipfire core 173 and 172ā€¦ this is the standard package (nothing added) that installs to /opt

netdata-1.38.0-1.ipfire for core 173

netdata-1.38.0-1.ipfire for core 172

EDIT: Sorry the mistake was on my end, i built this package on core 173. I am going to restructure the GitHub repository and create core folders to reflect what core Netdata was built on, But I cannot edit the links on my previous posts to reflect the changes to the file structure on github.

3 Likes

I figured as much, no problem. As long as we know for what version it will work. :upside_down_face:

How does that handle spaces in links?

wget https://github.com/siosios/Netdata-on-Ipfire/raw/main/core 172/netdata-1.38.0-1.ipfire

--2023-02-12 09:59:38--  (try: 2)  http://172/netdata-1.38.0-1.ipfire
Connecting to 172|0.0.0.172|:80... ^[failed: Connection timed out.
Retrying.
Does not work


wget https://github.com/siosios/Netdata-on-Ipfire/raw/main/core%20172/netdata-1.38.0-1.ipfire
Works

Perhaps something to avoidā€¦

And also some cleaning recommended

image

but, after restarting with wget and all that:

image

Now to read up and make some conf

Thank you @siosios :muscle: :100:


Btw, will the internal update work with this approach or is it not recommended?

1 Like

LoL, Iā€™m just full of mistakes this monthā€¦ corrected. Not sure what cleaning your recommending from the screenshot. The internal update wonā€™t work since you canā€™t compile it, Ipfire does not have the tools installed to do it.

2 Likes

I can be a bit picky about cleaning out irrelevant files.

Thanks, I suggest you make a note of the NetData update not being functional, if you did not alreadyā€¦

1 Like

@siosios thanks and respect for your work, but what is the difference between using your package and installing netdata via kickstart script?
Iā€™ve been using netdata for a long time, installed and regularly updated via kickstart without any problems.

Kind regards, Nicky

1 Like

you were able to use kickstart on an ipfire system? ipfire doesnā€™t come with the tools to build netdata on the actual machine its installed on which is why i keep up with this package.

2 Likes

i used the official netdata installer:

Install Netdata with kickstart.sh | Learn Netdata

1 Like

interesting, ill load up a test system and test it.

Ok, the installer does actually install now on ipfire as it did not in the past. This is now a dead package thread

@nicky_s thanks for pointing that out, i havent tested the installer for quite some time.

3 Likes

Iā€™m sorry for that
Nevertheless, thank you very much for your commitment

2 Likes

Kinda sorry to hear that, considering the work you put in, but on the other hand I am pleased with a solution that so far seems to be available from the original developer, thus, perhaps, you or Ipfire Team do not need to put much efforts in maintaining it.

Find something else? :wink:

2 Likes

Iā€™ve just tried out the kickstart installer. It doesnā€™t give a full installation. ā€˜auto-updateā€™ for example doesnā€™t work.

For automatic updates iā€™ve put the install command into cron for daily checks
the script checks for an existing install and necessary update

1 Like

@bbitsch @nicky_s

why not use the updater script in cron

ln -sf /opt/netdata/usr/libexec/netdata/netdata-updater.sh /etc/fcron.daily/netdata-updater

if you test it youā€™ll see it tries to update

[root@ipfire-test etc]# ln -sf /opt/netdata/usr/libexec/netdata/netdata-updater.sh /etc/fcron.daily/netdata-updater
[root@ipfire-test etc]# cd fcron.daily
[root@ipfire-test fcron.daily]# ls
info.txt  netdata-updater  openvpn-crl-updater  trim
[root@ipfire-test fcron.daily]# 

youā€™ll also need to build the startup script for /etc/rc.d/init.d

#!/bin/sh
# SPDX-License-Identifier: GPL-3.0-or-later
#
# netdata	Real-time performance monitoring, done right
# chkconfig: 345 99 01
# description:  Netdata is a daemon that collects data in real-time (per second)
#               and presents a web site to view and analyze them. The presentation
#               is also real-time and full of interactive charts that precisely
#               render all collected values.
# processname:	netdata

# Source functions
. /etc/sysconfig/rc
. $rc_functions

DAEMON="netdata"
DAEMON_PATH=/opt/netdata/bin
PIDFILE_PATH=/opt/netdata/var/run/netdata
PIDFILE=$PIDFILE_PATH/$DAEMON.pid
DAEMONOPTS="-P $PIDFILE"
STOP_TIMEOUT="60"

[ -e /etc/sysconfig/$DAEMON ] && . /etc/sysconfig/$DAEMON

LOCKFILE=/var/lock/subsys/$DAEMON

service_start()
{
	[ -x $DAEMON_PATH ] || exit 5
	[ ! -d $PIDFILE_PATH ] && mkdir -p $PIDFILE_PATH
	chown netdata:netdata $PIDFILE_PATH
	echo -n "Starting $DAEMON..."
	loadproc $DAEMON_PATH/$DAEMON $DAEMONOPTS
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch $LOCKFILE
	return $RETVAL
}

service_stop()
{
	printf "%-50s" "Stopping $DAEMON..."
	killproc -p ${PIDFILE} $DAEMON
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f ${PIDFILE} ${LOCKFILE}
	return $RETVAL
}

condrestart()
{
	if ! service_status > /dev/null; then
		RETVAL=$1
		return $RETVAL
	fi

	/etc/rc.d/init.d/netdata stop
	/etc/rc.d/init.d/netdata start
}

service_status()
{
	statusproc $DAEMON
}

service_status_quiet()
{
	statusproc $DAEMON >/dev/null 2>&1
}

case "$1" in
start)
	
	service_start
;;
stop)
	service_status_quiet || exit 0
	service_stop
;;
restart)
	service_stop
	service_start
;;
try-restart)
	condrestart 0
	;;
force-reload)
	condrestart 7
;;
status)
	service_status
;;
*)
	echo "Usage: $0 {start|stop|restart|try-restart|force-reload|status}"
	exit 3
esac

this code works but not if you modified where the install put all the files

1 Like

ah cron that mystery thing I never grasped.

Will give it a shot. How do you see if it ran?

I was wondering, how does this work with the standard backup.cgi ? It can generate an ISO, but will that include extra stuff like Netdata?

1 Like

Be aware there is a bug with the ISO based backup where the dhcp server configuration restore and the installation input result in a dhcpd.conf file with an faulty routers line that prevents dhcpd from being started.

https://bugzilla.ipfire.org/show_bug.cgi?id=12757

If the routers line is manually edited from the console then dhcpd will properly re-start.

Any extra stuff is only backed up if you add it into the /var/ipfire/backup/include.user file.

5 Likes