Properly running parent/child nodes

Hey there,

I’m currently running 2 independant instances of netdata.

  1. Running on a QNAP Nas in a docker environment
  2. Running on Ubuntu 18 using the installer script

Both are running perfectly. However, I’m trying to use the QNAP instance as a registry (parent) including alert management for the Ubuntu instance (child).

Following the guides I wasn’t able to connect the child node to the parent node. As far as I understand I need to:

a) set up the parent via netdata.conf (registry enabled as well as the announcer)
b) set up the child as well
c) set up both stream.conf’s to get everything working

I assume I’ve done everything as it should be - according to the guides. While I’ve nginx running on both instances I’m able to use those domains. Yet, it seems like I’m not able to use the domain as destination for the childs stream.conf (if I didn’t get the comments wrong). However I’m not able to enter an IP since my QNAP is running in my home environment and eventually receiving a new IP every day which simply makes that setup pretty much useless.

So there goes my question. Is it really impossible to use http over tcp as stream destination? Or is there eventually another way of handling that issue? To be clear, I didn’t want to use the cloud solution (even though I guess this would be the easiest one). I’d be really happy to get some help here since I couldn’t find anything related in here as well as at the GitHub repo.

Hi aer0 ! Welcome to the Netdata community!

So, if I got it right, you’re trying to use a hostname instead of a specific IP when specifying the parent to stream to in the child’s stream.conf destination part ? Are the parent and child on different networks?

That’s absolutely correct. I’ve seen examples online where people mentioned they’re using hostnames. But every example also used a port (like the default 19999). My parent is behind an nginx and the stream.conf mentions using web proxies isn’t allowed/working. So I’m curious about how to get that working. My parent host is behind an nginx which is proxying all requests through http(s) ports (80, 433) to my parents netdata instance (19999).

Hey,

So, for the streaming setup, please make sure you follow the documentation. Streaming is done over tcp, not HTTP, so the proxy should support that.

Just for reference, here is the documentation:

You can use a domain name

    # HOST      = an IPv4, IPv6 IP, or a hostname, or a unix domain socket path.
    #             IPv6 IPs should be given with brackets [ip:address]

You can’t use an HTTP proxy

    # This communication is not HTTP (it cannot be proxied by web proxies).

I see that NGINX supports proxying/load balancing TCP/UDP streams. So it looks like your setup is possible @aer0, but I’m not 100% sure :man_shrugging:

Interesting. Thanks everyone! Since I’m just a Developer and not a DevOps guy it’s pretty new for me, so I’m still learning. Will give it a try later on hopefully and let you know.

2 Likes

Yeah, please share your experience. If you managed to do it we can update our docs :+1: