This role configures an existing Netdata base installation as a server which can collect data from multiple streaming nodes.
Its companion role is the Netdata node.
An empty Netdata installation, see dependencies.
The setup is highly opinionated.
- Caddy as a reverse proxy will be installed.
- All routes to the dashboard are protected with basic authentication.
- The stream port is exposed to port 19999 and requires certificate-based authentication.
- We differ between two types of streaming nodes:
silence
will deactivate all alarms but still collect data.default
will activate all alarms. - Historic data will be stored within Netdatas own database mechanism.
- We deactivated several TCP/UDP-related metrics
- Links to Netdata cloud are disabled
This setup is reflected within the variables:
netdata_collector_basic_auth_user
: Name for the basic authentication user name.netdata_collector_basic_auth_password
: Password for the basic authentication of the reverse proxy. The password needs to be in Caddys hashed base64 format (more about that here).netdata_collector_registry_domain
: Will be used for the registry cookie, so you can request different registries but all nodes will be available to browse from the dashboard.netdata_registry_to_announce
: The central registry where this client should be registered. More information is available here.netdata_collector_default_stream_key
: API key to identify incoming stream traffic. Can be generated viauuidgen
.netdata_collector_silent_stream_key
: Same thing asnetdata_collector_default_stream_key
, but alarms for traffic with this UUID won't be sent to any notification system.
Optional variables:
netdata_collector_page_cache_size
: The page cache size option determines the amount of RAM in MiB dedicated to caching Netdata metric values. The actual page cache size will be slightly larger than this figure — see the memory requirements section for details.netdata_collector_domain
: Domain where the reverse proxy should listen to. If no value provided, it'll be set to the value ofnetdata_registry_to_announce
.netdata_collector_db_tiering
: Netdata allows to define different tiers for storing data. When metrics drop one tier, records will be averaged out so it allows to save data for a longer period. You can find more in their documentation including a sample calculation. We expect an array of integers here, which define the amount of tiers including the space they should take up in megabytes, in descending order (means the first entry will be used for Tier 0, second for Tier 1 etc.). For each tier, you need providesize
andupdate_every
.netdata_hostname
: Allows you to overwrite the hostname of this Netdata host. Default value is "auto-detected". Note that a change of this variable could result in a drop of historic data.
Additionally, we expect that a certificate is placed at /etc/netdata/ssl/cert.pem
. It'll be used to encrypt the traffic between node and collector. More information can be found in the netdata installation role.
The role currently supports Microsoft Teams and Slack as "recipients" for notifications.
For Slack, you need the following values:
netdata_collector_custom_slack_sender
: If set to "yes", this will activate a custom slack notifier which makes smaller messages.netdata_collector_slack_alarm_channel
: The channel where netdata should sent its messages.netdata_collector_slack_webhook
: Webhook to send slack messages.
For Teams, set the following ones:
netdata_collector_teams_recipients
: The channel where netdata should sent its messages.netdata_collector_teams_webhook
: Webhook URL where Netdata can send its notifications.
---
- name: Converge
hosts: all
become: true
roles:
- role: simplificator.netdata_collector
vars:
netdata_collector_basic_auth_user: admin
netdata_collector_basic_auth_password: JDJhJDE0JE9FYmltMG9LbVJGNVRld3hWRHMvek9Mb3FhNno5T05hYjFDYllPcjVPOFJrTEtScFBmN1Fl # admin123$
netdata_collector_default_stream_key: 267E1130-EDDA-4574-82FA-EF17286B0816
netdata_collector_registry_domain: example.com
netdata_collector_silent_stream_key: 6840CAB7-AE62-49C3-B5D9-C4323BBAAF94
netdata_installation_certificate: certificate
netdata_installation_certificate_key: key
netdata_registry_to_announce: "https://registry.example.com"
To ensure that our Netdata roles remain compatible with each other, follow this variable naming convention:
- Role-specific variables are prefixed with the role name (
netdata_node_
in this case). - General variables that are used in multiple roles will be prefixed with just
netdata_
.
MIT / BSD