Netdata addon by ummeegge

yet again, a new update

netdata-1.37.1-1.ipfire

1 Like

Hi @siosios

Thanks a lot for your work on this Netdata addon, I gave a try few weeks ago and it works perfectly! I could even configure the streaming feature and send all the IPFire metrics to my main Netdata node!

If I may suggest few things about the add-on, it would be the following:

  • Having a more user friendly install documentation would help to make the deployment much easier
  • Making it an official add-on would also help :sweat_smile:
  • Add a way to manage the Netdata service from the services section in the WUI

Btw, what is missing to have it listed in Pakfire?

Thanks again for your great work on this add-on :bowing_man:

Iā€™ve played with the idea overnight and threw together something that works but needs tested and tweaked a bit more.

Netdata with proxy and menu built in: netdata-1.37.1-1.proxy.menu.ipfire

For some reason when i unzipped the menu files on my ipfire system, random lines would be added and what not so i created the dos2unix package to correct that until i can get time to do more testing.

dos2unix needs installed first before the netdata pak above: dos2unix-7.4.3-1.ipfire

Upload one at a time to /opt/pakfire/tmp for install. Do dos2unix first and use tar xvf dos2unix-7.4.3-1.ipfire, once unpacked just do ./install.sh. After this install is done delete everything in the tmp folder in preparation for the next pak.

Now upload netdata-1.37.1-1.proxy.menu.ipfire to /opt/pakfire/tmp and unpack the file like you did on the previous file but this time choosing upgrade.sh if you already have the netdata package installed. After going through the install you will have to change one of the menu files to reflect the port you chose for netdata.

edit /srv/web/ipfire/cgi-bin/external.cgi where you see the port number as 19999

<script type="text/javascript">window.open('https://$ENV{'SERVER_ADDR'}:19999');</script>

like i said this is for testing only! i need more time to make it cleaner and fix a few issues, let me know what you find if you test it please.

3 Likes

Netdata can be forced to be a service by manually modifying files to get it to work but i donā€™t think i want to add those changes to the package since its only added as a service when downloaded from the ipfire repository with the correct pgp keys.

Picture of services.cgi after modification:

2 Likes

Ok I see, thanks a lot for letting me know and sharing your thoughts!

I might try to do same or maybe just a little patch that would add it automatically with probably just a little enhancement compared to what is shown on your screenshot like making the ā€œnetdataā€ string clickable and so directly open a new tab to the Netdata dashboard.

Just like what is done for ā€œguardianā€ on your screenshot basically :stuck_out_tongue_winking_eye:

Hi,

You saved external.cgi and EX-external.menu in Windows/DOS format, see screenshot from ā€˜mceditā€™:

Saving these files as ā€˜Unix format (LF)ā€™ should avoid the random linesā€¦

HTH,
Matthias

4 Likes

tiny hint
open the file in Notepad++
then go to Editā€“>EOL Conversionā€“> Unix (LF)
then Save

Regards

3 Likes

honestly never even considered that since i built the package on linux lol

1 Like

ok so I was able to keep netdata as a service after pakfire updates with a bash script in fcron hourly, also created netdata.cgi with the info from external.cgi to open the netdata page when you click on the link in the services section. Thanks to @jiab77 for the idea

2 Likes

Woow thatā€™s awesome! Iā€™m glad to see that you liked my idea and made it live! Huge thanks for that! :bowing_man:

Netdata is awesome. Iā€™ll see if i can get it running following above infoā€¦

1 Like

On second thought I may wait a bit until this is a full fledged plugin. Not sure I want to build stuff on my firewall machineā€¦ never done it anyways soā€¦

1 Like

The the combo package is not recommended but the normal net data package above that is fine to install.

netdata-1.37.1-1.ipfire

1 Like

Hell yeah! Netdata is just awesome, I love it so much :grin: but wait for the service section, Iā€™ve planned to make something based on the work done by @siosios :wink:

1 Like

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

So these GitHub - siosios/Netdata-on-Ipfire: Build scripts for netdata to create an ipfire package are still the installation instructions - with build?

the regular build install is

cd /opt/pakfire/tmp
wget https://github.com/siosios/Netdata-on-Ipfire/raw/main/core%20173/netdata-1.38.0-1.ipfire
or
wget https://github.com/siosios/Netdata-on-Ipfire/raw/main/core%20172/netdata-1.38.0-1.ipfire
tar xvf netdata-1.38.0-1.ipfire
./install.sh or ./update.sh
3 Likes

Hmmā€¦ so tried the command lines as posted above. I am not savvy in this, I am a Windows UI guy, but I have been told I am able to read and follow instructionsā€¦ :stuck_out_tongue:

Obviously I forgot about them elfutilities, got an error about libelf, and went to got them via PakFire.

Then I restarted the Netdata setup via the same ssh session I had going but it threw an error. I did not record that error, but quit the session and logged on to a new session via ssh and tried the installation again. Error comes back, most likely the same one.

Error:

/opt/netdata/usr/sbin/netdata: error while loading shared libraries: libjson-c.so.5: cannot open shared object file: No such file or direc tory [ FAIL ]

So I think I am missing libjson , I find nothing about libjson on the wiki, not do I find it in Pakfire. Json is part of a few other addons I can find in the Wiki, but I am reluctant to mess around so I figure I just ask what is needed, since this question may come up again. Perhaps that should be included in the Netdata release or documented as needed with instructionsā€¦?

1 Like

It is part of the core package of programs/libraries so it is available as standard.

This library version is available with a new version of json-c which is installed in Core Update 173 but that is still at testing stage so you will have to change to Core Update 173 Testing or wait for Core Update 173 to be released.

4 Likes

Thanks Adolf, so if that version 5 is needed I figure I wait for the Core Update 173.

Unless the dependency can be changed in the netdata packageā€¦