Jump to content
roland

[Support] Data-Monkey - netdata

137 posts in this topic Last Reply

Recommended Posts

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
  • Upvote 2

Share this post


Link to post

 

 

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

 

 

Share this post


Link to post

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

 

Share this post


Link to post

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

Share this post


Link to post

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

 

Share this post


Link to post

 

Well done!. I will download and try it out

Share this post


Link to post

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

Share this post


Link to post

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?

Share this post


Link to post

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!

Share this post


Link to post

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.

Share this post


Link to post

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 :(

Share this post


Link to post

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

 

 

Share this post


Link to post

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!

Share this post


Link to post

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....

 

Share this post


Link to post

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..

Share this post


Link to post

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

Share this post


Link to post

Looks like that was it.  tried for about 2  hours to get it install and I was getting that error.

 

I'm good to go now.

 

Thanks for the help

Share this post


Link to post

awesome utility. Any news on the updates for this image as i'm seeing complaints from the UI for an update.

Share this post


Link to post

Hey,

 

My instance isn't showing anything docker related - I've mapped the docker directory as describe in the post in this thread but I don't see anything docker related in the UI.

 

Tom

Share this post


Link to post

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!

Share this post


Link to post

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

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now