-
Notifications
You must be signed in to change notification settings - Fork 6.4k
How to properly set up netdata registry with docker #9483
Description
Question summary
I am trying to create a registry where I can browse through my netdata nodes through the menu on the left.
I have tried to follow up the guide here: https://learn.netdata.cloud/docs/agent/registry and I have created a small example of what I am trying to run. I am using docker compose with a primary and secondary (primary is the one holding hte registry).
This is my compose file:
version: '3'
services:
netdata-primary:
image: netdata/netdata
hostname: netdata-primary
ports:
- 19999:19999
cap_add:
- SYS_PTRACE
security_opt:
- apparmor:unconfined
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- "/Users/ngh/projects/netdata-primary.conf:/etc/netdata/netdata.conf"
netdata-secondary:
image: netdata/netdata
hostname: netdata-secondary
ports:
- 19998:19999
cap_add:
- SYS_PTRACE
security_opt:
- apparmor:unconfined
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- "/Users/ngh/projects/netdata-secondary.conf:/etc/netdata/netdata.conf"
netdata-primary.conf:
[registry]
enabled = yes
registry to announce = http://netdata-primary:19999
netdata-secondary.conf:
[registry]
enabled = no
registry to announce = http://netdata-primary:19999
In the logs I can see nothing regarding failed registry or so. Here are all the logs which have "registry":
netdata-primary_1 | 2020-07-05 16:22:11: netdata ERROR : MAIN : Registry: cannot open registry file: '/var/lib/netdata/registry/registry.db' (errno 2, No such file or directory)
netdata-secondary_1 | 2020-07-05 16:22:12: netdata INFO : MAIN : Host 'netdata-secondary' (at registry as 'netdata-secondary') with guid 'ae747810-bedb-11ea-a5d6-0242ac120002' initialized, os 'linux', timezone 'UTC', tags '', program_name 'netdata', program_version 'v1.23.1-33-ge5e24687', update every 1, memory mode dbengine, history entries 3996, streaming disabled (to '' with api key ''), health enabled, cache_dir '/var/cache/netdata', varlib_dir '/var/lib/netdata', health_log '/var/lib/netdata/health/health-log.db', alarms default handler '/usr/libexec/netdata/plugins.d/alarm-notify.sh', alarms default recipient 'root'
netdata-primary_1 | 2020-07-05 16:22:12: netdata INFO : MAIN : Host 'netdata-primary' (at registry as 'netdata-primary') with guid 'ae742cc0-bedb-11ea-a91f-0242ac120003' initialized, os 'linux', timezone 'UTC', tags '', program_name 'netdata', program_version 'v1.23.1-33-ge5e24687', update every 1, memory mode dbengine, history entries 3996, streaming disabled (to '' with api key ''), health enabled, cache_dir '/var/cache/netdata', varlib_dir '/var/lib/netdata', health_log '/var/lib/netdata/health/health-log.db', alarms default handler '/usr/libexec/netdata/plugins.d/alarm-notify.sh', alarms default recipient 'root'
netdata-primary_1 | 2020-07-05 16:22:38: 6: 288 '[172.18.0.1]:42008' 'DATA' (sent/all = 188/253 bytes -26%, prep/sent/total = 0.07/3.21/3.28 ms) 200 '/api/v1/registry'
netdata-primary_1 | 2020-07-05 16:22:38: 4: 275 '[172.18.0.1]:42002' 'FILECOPY' (sent/all = 44276/182792 bytes -76%, prep/sent/total = 0.59/38.82/39.41 ms) 200 '/dashboard_info.js'
netdata-primary_1 | 2020-07-05 16:22:38: 5: 279 '[172.18.0.1]:42004' 'DATA' (sent/all = 18337/200429 bytes -91%, prep/sent/total = 29.52/9.26/38.77 ms) 200 '/api/v1/charts'
netdata-primary_1 | 2020-07-05 16:22:38: 5: 279 '[172.18.0.1]:42004' 'DATA' (sent/all = 188/253 bytes -26%, prep/sent/total = 0.10/1.37/1.47 ms) 200 '/api/v1/registry'
netdata-primary_1 | 2020-07-05 16:22:38: 5: 279 '[172.18.0.1]:42004' 'DATA' (sent/all = 188/253 bytes -26%, prep/sent/total = 0.15/0.32/0.47 ms) 200 '/api/v1/registry'
This is how my primary looks and it's also how the secondary looks:
OS / Environment
Docker - latest netdata image
OS: macOS, but the same result on linux (Ubuntu)
Component Name
Expected results
I expect to be able to see a list of my nodes. But perhaps I am wrong?
From the registry docs page I expect I should be able to do that:
To solve this, Netdata utilizes a central registry. This registry, together with certain browser features, allow Netdata to provide unified cross-server dashboards. For example, when you jump from server to server using the node menu
