diff --git a/CHANGELOG.md b/CHANGELOG.md index cbaaed3..aa72f9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,4 +6,5 @@ * Can choose to install recommends packages. * Manage Netdata configuration (/etc). * Ensure Netdata service is enabled and started. -* Allow to change IP address and port used. +* Manage IP address and port used. +* Manage memory mode. diff --git a/README.md b/README.md index ffed8d3..bd94cd9 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ A role to manage Netdata installation and configuration. * **netdata__service_manage** : If the Netdata services should be managed [default : `True`]. * **netdata__conf_bind_ip** : IP address used by Netdata to listen [default : `127.0.0.1`]. * **netdata__conf_bind_port** : Port used by Netdata to listen [default : `19999`]. +* **netdata__conf_memory_mode** : The memory mode of the database [default : `ram`]. ## Example Playbook diff --git a/defaults/main.yml b/defaults/main.yml index 4de6693..4937446 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -84,5 +84,15 @@ netdata__conf_bind_ip: '127.0.0.1' netdata__conf_bind_port: '19999' # ]]] +# .. envvar:: netdata__conf_memory_mode [[[. +# +# The memory mode of the database. +# +# Check the possible options on Netdata wiki : +# https://github.com/firehol/netdata/wiki/Memory-Requirements#memory-modes +# +netdata__conf_memory_mode: 'ram' + + # ]]] # ]]] diff --git a/templates/etc/netdata/netdata.conf.j2 b/templates/etc/netdata/netdata.conf.j2 index 2957a9c..b31642a 100644 --- a/templates/etc/netdata/netdata.conf.j2 +++ b/templates/etc/netdata/netdata.conf.j2 @@ -16,8 +16,9 @@ run as user = netdata web files owner = root web files group = root - # Netdata is not designed to be exposed to potentially hostile - # networks.See https://github.com/firehol/netdata/issues/164 + memory mode = '{{ netdata__conf_memory_mode }}' [web] + # Netdata is not designed to be exposed to potentially hostile + # networks.See https://github.com/firehol/netdata/issues/164 bind to = {{ netdata__conf_bind_ip }}:{{ netdata__conf_bind_port }}