[Support] Data-Monkey - netdata


Recommended Posts

Lots has changed in the last few years, here a new start.

 

Overview: Template for the official netdata docker 

 

Real-time performance monitoring, done right!

 

Application:netdata https://github.com/netdata/netdata/ & https://docs.netdata.cloud/

Docker Hub: https://hub.docker.com/r/netdata/netdata

GitHub: https://github.com/netdata/netdata/tree/master/packaging/docker

 

Repository: https://github.com/Data-Monkey/docker-templates

Template: https://raw.githubusercontent.com/Data-Monkey/docker-templates/master/Data-Monkey/netdata.xml

 

Credit: to titpetric who created the original docker and spants who's initial docker command kicked of the build for this template.

and to lots of the forum users that keep answering questions here when I am busy otherwise.

 

All of the issues listed below are now fixed in the new docker or the new version of unRAID.

 

Hope this makes it all a bit easier now.

 

Adding your own config files:

The official docker does not support the override folder that the previous version had. So if we need config files, we need to mount them one-by-one.

To start with the master config file, get the template from your netdata docker:

wget [your_netdata_ip]:19999/netdata.conf

then edit that file and mount it into the docker:

-v '/mnt/cache/appdata/netdata/netdata.conf':'/etc/netdata/netdata.conf':'rw'

'ro' might be good enough. Rinse & repeat for all other files that you need.

https://github.com/netdata/netdata/issues/5782#issuecomment-479572521

 

 

================== Original First Post ==================

Overview: Template for the netdata docker maintained by titpetric

 

Real-time performance monitoring, done right!

 

Application:netdata https://github.com/firehol/netdata/wiki

Docker Hub: https://hub.docker.com/r/titpetric/netdata/

GitHub: https://github.com/titpetric/netdata

 

Repository: https://github.com/Data-Monkey/docker-templates

Template: https://raw.githubusercontent.com/Data-Monkey/docker-templates/master/Data-Monkey/netdata.xml

 

Credit: to titpetric who created the docker and spants who's initial docker command kicked of the build for this template.

 

HOW TO

install this container:

This template is now available in CA, just install the Community Applications plugin , search for netdata and add it.

 

show container details in the graphs:

Netdata does not support docker details prior to 6.2 due to the different docker api.

If you are using unRAID6.2 the docker containers show up, but only by ID, not names.

To make the names work /var/run/docker.sock needs to be mapped as well and the user running netdata needs rw access on the host.

Not exactly a good thing to do, but it works. So if you want to go down that path do this at your own risk!

 

AT YOUR OWN RISK!!

-v "/var/run/docker.sock":"/var/run/docker.sock":rw 
 

and on the CLI as root run

chmod 666 /var/run/docker.sock 
 

(this will need to be repeated at reboot)

 

a better solution would be to run the docker under a specific user that is in the docker group.  Still working on this!

 

change the configuration:

netdata by default does not need a config file. It works things out on the fly.

If you want to have more control

- go to <your host>:19999/netdata.conf

- save the config file that shows up under (default) /mnt/cache/appdata/netdata/netdata.conf  ( 2018/05 this now maps to /etc/netdata/override in the container!)

- make the changes

- restart container

 

keep the logfile size under control:

if you are on 6.2.x docker can do that for you.

The extra parameters: --log-opt max-size=50m --log-opt max-file=1 restrict the log to 1 file of 50MB

 

if you are on 6.1 the above won't work and you have to delete the logs manually every now and then.

You can check the log size with this:

du -ah /var/lib/docker/containers/ | grep  "log$" | grep `docker ps -a | grep titpetric/netdata | cut -d" "  -f1`
 

 

 

Reverse Proxy:

I have a ngnix example working here: https://lime-technology.com/forum/index.php?topic=49534.msg488617#msg488617

 

 

 

still to do:

 

- run docker as special user in the docker group

- reverse proxy config

- resolve docker names in netdata - https://lime-technology.com/forum/index.php?topic=49534.msg475480#msg475480

- expose config dir to unRaid - https://lime-technology.com/forum/index.php?topic=49534.msg475483#msg475483

- fix log file growth - https://lime-technology.com/forum/index.php?topic=49534.msg475245#msg475245

 

Edited by roland
typo
  • Like 1
  • Upvote 2
Link to comment

 

 

This template is not (yet) available in the CA plugin so you need to install it the old fashioned way.

Add the Repository URL to the list of repositories in the docker tab, then ADD docker.

 

Because nobody has told me to add it

 

Sent from my LG-D852 using Tapatalk

 

 

Link to comment

Hi Squid,

It was very late here in Sydney by the time I had this finished.

Could you please add this template to CA?

Is there anything else i need to watch out for?

 

Thanks

Will be there within 2 hours.  Minor issue with the template which I issued a PR, but that won't affect it adding correctly
Link to comment

Nifty little utility

 

But,

 

The log for this app grows by about 100K / half hour.

 

If you're on 6.2 then you're going to want to add this to the extra parameters:

--log-opt max-size=50m --log-opt max-file=1

 

On 6.1.x since those options will return an error, you're going to have to manually delete the log files every once in a while

 

Link to comment

Is there anyway we could have the docker numbers actually show the docker name?

 

According to netdata this should fix it: Map

/var/run/docker.sock to /var/run/docker.sock

This comes with some risks and it did not work for me. See here: https://github.com/titpetric/netdata#monitoring-docker-container-metrics

Please let me know if this works for you. I only have a 6.1 version to test on, maybe it works on 6.2?

Link to comment

Nice! this is great :D

 

I'm wondering where's the docker settings? There's no map to /config or something. I wanted to tweak some units like show MB/s for write/read disk, etc. I found some suggestion on the Netdata's github but as I said, I'm not sure where are the settings!

 

Also... how do you update the docker? It says there's a new version inside the netdata web ui, but no "easy" way to perform it.

 

Thanks!

Link to comment

I'm wondering where's the docker settings? There's no map to /config or something. I wanted to tweak some units like show MB/s for write/read disk, etc. I found some suggestion on the Netdata's github but as I said, I'm not sure where are the settings!

The config directory is not exposed by the container. You might be able to map

/etc/netdata to /mnt/cache/appdata/netdata/

to make this work. I am at work right now and can't try.

 

Also... how do you update the docker? It says there's a new version inside the netdata web ui, but no "easy" way to perform it.

Just hit edit on the container configuration, change nothing and hit ok. It will download all the changes if titpetric's docker was updated.

Link to comment

I'm wondering where's the docker settings? There's no map to /config or something. I wanted to tweak some units like show MB/s for write/read disk, etc. I found some suggestion on the Netdata's github but as I said, I'm not sure where are the settings!

The config directory is not exposed by the container. You might be able to map

/etc/netdata to /mnt/cache/appdata/netdata/

to make this work. I am at work right now and can't try.

 

Also... how do you update the docker? It says there's a new version inside the netdata web ui, but no "easy" way to perform it.

Just hit edit on the container configuration, change nothing and hit ok. It will download all the changes if titpetric's docker was updated.

 

Thanks! update method worked fine, but mapping /etc/netdata doesn't seem to show anything :(

Link to comment

Thanks! update method worked fine, but mapping /etc/netdata doesn't seem to show anything :(

 

netdata does not need a config file to run. One of the principles of the developer is that it works things out on the fly.

But if you want to do stuff yourself:

- go to http://tower:19999/netdata.conf : This will show your current config file (default is everything commented out)

- Copy paste / save it into your new config directory (/mnt/cache/appdata/netdata/netdata.conf)

- make the changes you want

- Restart the container

 

worked for me

 

 

Link to comment

Thanks! update method worked fine, but mapping /etc/netdata doesn't seem to show anything :(

 

netdata does not need a config file to run. One of the principles of the developer is that it works things out on the fly.

But if you want to do stuff yourself:

- go to http://tower:19999/netdata.conf : This will show your current config file (default is everything commented out)

- Copy paste / save it into your new config directory (/mnt/cache/appdata/netdata/netdata.conf)

- make the changes you want

- Restart the container

 

worked for me

 

Ah ok, thanks a lot!. I assumed there will be a .conf file there that I could tweak. Sorry for the confusion!

Link to comment

Is there anyway we could have the docker numbers actually show the docker name?

 

According to netdata this should fix it: Map

/var/run/docker.sock to /var/run/docker.sock

This comes with some risks and it did not work for me. See here: https://github.com/titpetric/netdata#monitoring-docker-container-metrics

Please let me know if this works for you. I only have a 6.1 version to test on, maybe it works on 6.2?

 

@dertbv, did that work for you?

 

I don't even see any dockers in the stats. Might need to upgrade to 6.2beta....

 

Link to comment

Is there anyway we could have the docker numbers actually show the docker name?

 

According to netdata this should fix it: Map

/var/run/docker.sock to /var/run/docker.sock

This comes with some risks and it did not work for me. See here: https://github.com/titpetric/netdata#monitoring-docker-container-metrics

Please let me know if this works for you. I only have a 6.1 version to test on, maybe it works on 6.2?

 

@dertbv, did that work for you?

 

I don't even see any dockers in the stats. Might need to upgrade to 6.2beta....

 

No i gave it a try and it till shows the container numbers..

Link to comment

I am getting the following error when trying to install the docker container.

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name="Netdata" --net="host" -e TZ="America/Los_Angeles" -v "/mnt/disks/samsung/.docker/netdata":"/etc/netdata":rw -v "/proc":"/host/proc":ro -v "/sys":"/host/sys":ro --cap-add SYS_PTRACE --log-opt max-size=50m --log-opt max-file=1 titpetric/netdata

 

Unable to find image 'titpetric/netdata:latest' locally

Pulling repository titpetric/netdata

Get https://index.docker.io/v1/repositories/titpetric/netdata/images: dial tcp: lookup index.docker.io: connection refused

 

The command finished successfully!

 

 

I am running unRAID 6.1.9

 

Thanks

Link to comment

OK, so I upgraded to 6.2-b23 today.

 

Netdata does not support docker details prior to 6.2 due to the different docker api.

Once on 6.2 the docker containers show up, but no names.

To make the names work the /va/run/docker.sock needs to be mapped as well and the user running netdata needs rw access on the host.

Not exactly a good thing to do, but it works. So if you want to go down that path do this at your own risk!

 

AT YOUR OWN RISK!!

-v "/var/run/docker.sock":"/var/run/docker.sock":rw 

and on the CLI as root run

chmod 666 /var/run/docker.sock

(this will need to be repeated at reboot)

 

the better solution is to run the docker under a specific user that is in the docker group.

Still working on this!

Link to comment

Getting this when i try to update..

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name="Netdata" --net="host" -e TZ="America/New_York" -e HOST_OS="unRAID" -v "/proc":"/host/proc":ro -v "/sys":"/host/sys":ro --cap-add SYS_PTRACE titpetric/netdata

Unable to find image 'titpetric/netdata:latest' locally

latest: Pulling from titpetric/netdata

5c90d4a2d1a8: Pulling fs layer

8162e534c0fb: Pulling fs layer

63ea55ebe3fe: Pulling fs layer

8162e534c0fb: Download complete

8162e534c0fb: Download complete

docker: Get https://dseasb33srnrn.cloudfront.net/registry-v2/docker/registry/v2/blobs/sha256/79/79a09fa49cd7e917630b5b76ff58210a38f8b6639c13d851ae5222a13992a3f2/data?Expires=1466559208&Signature=acFLwCFAzGhBSsJXsd6PK~jUIdUfC90JJzDjWXGT-YRJZQM6dpyMdKrdjFU9Ydo8Qs4y65D-esySfwtUavrQZW7hl43o53oHbG7FspoZ-mu88k4~7a5FBDDIdeuGTlDDUJwlmkHs50777MOanlvHBlTV5D5eMz-~8QT-8WvCYtY_&Key-Pair-Id=APKAJECH5M7VWIS5YZ6Q: read tcp 192.168.1.17:54464->54.230.205.140:443: read: connection reset by peer.

See '/usr/bin/docker run --help'.

 

Running 6.23

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.