Monitoring Omnia with NetData

Is there an option to store the data from netdata on mounted disk/usb as in RRDTool?

So I have installed on lxc container on the ssd. Works great!

Hi!

Have the same problem… This will get it to work, but I guess it needs to be fixed inte the package =)

uname -a
Turris 4.4.131-a2dbf3bef3d0c1f725e0a5f0801935a1-2 #1 SMP Fri May 4 08:55:10 CEST 2018 armv7l n

cat /etc/turris-version
3.10

opkg update
opkg install netdata

netdata -v
netdata 3.6-1092-gac0717d

netdata -D
2018-05-23 14:06:10: netdata FATAL: Cannot cd to directory ‘/var/cache/netdata’ # : Invalid argument
2018-05-23 14:06:10: netdata INFO : Cleaning up database [0 hosts(s)]…
2018-05-23 14:06:10: netdata INFO : netdata exiting. Bye bye…

mkdir /var/cache/netdata

netdata -D
2018-05-23 14:06:30: netdata FATAL: Cannot cd to directory ‘/var/lib/netdata’ # : Invalid argument
2018-05-23 14:06:30: netdata INFO : Cleaning up database [0 hosts(s)]…
2018-05-23 14:06:30: netdata INFO : netdata exiting. Bye bye…

mkdir /var/lib/netdata

netdata -D
2018-05-23 14:11:51: netdata FATAL: Cannot cd to directory ‘/var/log/netdata’ # : Invalid argument
2018-05-23 14:11:51: netdata INFO : Cleaning up database [0 hosts(s)]…
2018-05-23 14:11:51: netdata INFO : netdata exiting. Bye bye…

mkdir /var/log/netdata

netdata -D
— NOTHING —

tail -f /var/log/messages | grep -i netdata
2018-05-23 16:17:13 info netdata[30802]: Adjusted my Out-Of-Memory (OOM) score from 0 to 1000.
2018-05-23 16:17:13 err netdata[30802]: Cannot adjust netdata scheduling policy to idle (5), with priority 0. Falling back to nice
2018-05-23 16:17:13 info netdata[30802]: netdata started on pid 30802.
2018-05-23 16:17:13 crit netdata[30802]: Cannot create directory ‘/var/lib/netdata/registry’.
2018-05-23 16:17:13 info netdata[30802]: Cleaning up database [0 hosts(s)]…
2018-05-23 16:17:13 info netdata[30802]: netdata exiting. Bye bye…

mkdir /var/lib/netdata/registry

netdata -D
— NOTHING — BUT it doesn’t quit anymore… just hangs…

tail -f /var/log/messages | grep -i netdata
2018-05-23 16:18:40 info netdata[31085]: Adjusted my Out-Of-Memory (OOM) score from 0 to 1000.
2018-05-23 16:18:40 err netdata[31085]: Cannot adjust netdata scheduling policy to idle (5), with priority 0. Falling back to nice
2018-05-23 16:18:40 info netdata[31085]: netdata started on pid 31085.
2018-05-23 16:18:40 crit netdata[31085]: Cannot create unique machine id file ‘/var/lib/netdata/registry/netdata.public.unique.id’. Please fix this.
2018-05-23 16:18:40 info netdata[31085]: Cleaning up database [0 hosts(s)]…

touch /var/lib/netdata/registry/netdata.public.unique.id
chmod 777 /var/lib/netdata/registry/netdata.public.unique.id. (Yes, I know… )

WORKS !!!

2 Likes

Has this been fixed in the netdata package?

Currently, we have two different versions of netdata for our two routers.
For Turris 1.x, there is an older version, because the newest one doesn’t work. See it here: https://gitlab.labs.nic.cz/turris/openwrt/issues/166
For Turris Omnia, we have version 1.9.0 and I’d like to update netdata to the latest version, which is currently 1.10.0, but that requires that I need to edit a little patch, so we can have two different versions.

Recently I tried netdata on Turris Omnia and Turris 1.x and they’re working perfectly.

Would you please tell me, if you’re replying to htilly’s post?

If yes, I need to tell you what’s wrong with that approach.
He creates folders, which are located in /var (which is a symlink for tmpfs).
So they’re created in RAM.

The recommended way as I was asking OpenWRT is run netdata via this command:

/etc/init.d/netdata start

It will create these three folders and set them chmod to 0755 and group nobody. Never set anything to 777!
/var/cache/netdata
/var/lib/netdata
/var/log/netdata

Once you start netdata it will be available on http://192.168.1.1:19999

I know this is not what would you like, because I don’t think that you don’t expect when you install and start something for the first time that it doesn’t run, but currently, there is no other way. I had an idea that these folders will be created also when you install netdata then it will work, but once you restart router they’ll be gone and you’d need to start netdata via init script.

1 Like

Manually creating the directories worked for me as well. Thanks for the suggestion, @htilly! I was just curious if this had been fixed in the package.

netdata is now (5.1) included in reforis installer but it doesn’t start:

Aug 27 15:53:08 turris foris-controller[23956]: ERROR:foris_controller_backends.files:Failed to parse content of the file '/proc/cmdline'
Aug 27 15:53:11 turris : Does not have a configuration file inside `/etc/netdata/ebpf.conf. It will try to load stock file.
Aug 27 15:53:11 turris : PROCFILE: Cannot open file '/etc/netdata/apps_groups.conf'
Aug 27 15:53:11 turris : Cannot read process groups configuration file '/etc/netdata/apps_groups.conf'. Will try '/usr/lib/netdata/conf.d/apps_groups.conf'
Aug 27 15:53:31 turris : Does not have a configuration file inside `/etc/netdata/ebpf.conf. It will try to load stock file.
Aug 27 15:53:31 turris : PROCFILE: Cannot open file '/etc/netdata/apps_groups.conf'
Aug 27 15:53:31 turris : Cannot read process groups configuration file '/etc/netdata/apps_groups.conf'. Will try '/usr/lib/netdata/conf.d/apps_groups.conf'
Aug 27 15:53:51 turris : Does not have a configuration file inside `/etc/netdata/ebpf.conf. It will try to load stock file.
Aug 27 15:53:51 turris : PROCFILE: Cannot open file '/etc/netdata/apps_groups.conf'
Aug 27 15:53:51 turris : Cannot read process groups configuration file '/etc/netdata/apps_groups.conf'. Will try '/usr/lib/netdata/conf.d/apps_groups.conf'
Aug 27 15:54:01 turris crond[28119]: (root) CMD (/usr/bin/rainbow_button_sync.sh)
Aug 27 15:54:11 turris : Does not have a configuration file inside `/etc/netdata/ebpf.conf. It will try to load stock file.
Aug 27 15:54:11 turris : PROCFILE: Cannot open file '/etc/netdata/apps_groups.conf'

In your log, there is no crash and why it does not start. I’ve tried it once again in reForis and it works.
You need to visit this URL http://yourrouterIP/netdata/ (available from webapps) and use login for root.

Thanks, the wiki says to go to http://192.168.1.1:19999 but that port is rejecting connections.

I can access netdata but it doesnt load

Wiki is made by the community to help each other and you should keep it updated. Anyway, there were security enhancement related to Netdata and that’s why you can see it on http://192.168.1.1/netdata. If you would like to access it on that port, you should look at netdata.conf at /etc/netdata.

I understand the change and the approach from webaps is nice. But it damaged my configuration in homeassistant. Port setting isn ´t in config file at /etc/netdata. I have to see to documentation, but I don’t want to waste time with that now, maybe later :slight_smile: .

When I install netdata on a fresh turris omina 2020 I get Error 404 on http://192.168.1.1/netdata/
Same thing on my own turris omnia, old one on 5.1.2 (HBT)

(did only except check the box in reforis, no manual config)

Update: It runs normally (as far as I can tell) after enabeling the default way of acessing it (Enable all ips and the port) which obviously goes against the turris team’s security consideration:

[web]
allow connections from = localhost *
allow dashboard from = localhost *
default port = 19999

If I use http://192.168.1.1/netdata/I get a 502 Bad Gateway.

But I had it set up before my upgrade to 5.x. If I go directly to the port http://192.168.1.1:19999 it works. I’ve even got an webapp entry for that on my landing page. You can find a discussion on that at Netdata Webapp configuration files.

If I go directly, I don’t get a login either, so there’s that.

After installing netdata using reForis (TOS 5.1.1) I see the following error on adress 192.168.88.1/netdata “503 Service Not Available”. Don’t know where the problem is?

2 Likes

I’m getting the same 502 error on 5.x. I botched the upgrade from 3.x to 5.x so reinstalled fresh from USB. Noticed new monitoring tools in reForris, installed via reForris & am now debugging. I was assuming it was not using the right credentials, but that seems to not be the case. Connecting to port 19999 i just get a connection refused.

Try this https://192.168.1.1/netdata/netdata.conf

Same 503 error browsing to the netdata.conf file. Or did you mean SSH in & dig through the file system & find it.

I just updated the router with the latest & greatest packages that were waiting to be installed that showed up this morning & that seems to have gotten it working. No additional fiddling required on my part, just updating.

thanx, this worked for me.

Hi, I’ve installed netdata on my Turris 1.0 and it won’t start due to missing configuration:

21-01-22 09:56:05: ERROR: netdata: Cannot open file '/etc/netdata/netdata.conf' (errno 2, No such file or directory)
21-01-22 08:56:05: ERROR: netdata: Group nobody is not present. Ignoring option.
21-01-22 08:56:05: INFO: netdata: Listening on all IPs (IPv6 and IPv4)
21-01-22 08:56:05: ERROR: netdata: Cannot open output log file '/var/log/netdata/debug.log' (errno 2, No such file or directory)
21-01-22 08:56:05: FATAL: netdata: Cannot demonize myself. # : Success

All I had to do to make it work was just a simple copy of the sample file:
cp /etc/netdata/netdata.conf_turris /etc/netdata/netdata.conf

Might be good to put it into the docs. On contrary, on my MOX it worked after installation without any manual tweaks.

One more question is there a plugin for netdata to show graphs (and store history if possible) like if one use iptraf interactively? My ISP performs well on downloads, but uplink is an issue (for all others than the already established uploading socket) so I’d like to have the ability to diagnose what client was causing the “high” upload (if I can’t watch iptraf at the moment). Thanks for any hints.
ales

Thank you for reporting. I was able to reproduce it on Turris 1.x routers in Turris OS 3.x, and this is going to be fixed in Turris OS 3.11.23. Regarding Netdata in Turris OS 5.x, the fix is not necessary there as it works out of the box.