I'm currently busy creating a automated netdata ephemeral cluster, which means I have a master netdata node which the slaves connect to. I've found a similar question + answer, but instead of using a grain I use pillars.
I'm trying to get the Netdata master ip, and distribute it to the minions running Netdata via a Template. But this can be applied to other master-slave configs as well (e.g. postgres, elasticsearch etc)
I'm assigning roles via pillars. So my pillar file looks like:
server:
roles:
- netdata-master
- grafana
And my jinja template:
{% set netdatamaster = ..... %}
[stream]
# stream metrics to another netdata
enabled = yes
# the IP and PORT of the master
destination = {% netdatamaster %}:19999
Now I want the var netdatamaster
to contain the ipv4 adres of the Netdata master. I just can't figure out a way to do this.