Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion collectd/files/collectd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
# Modify the config that generates this file instead
#

{% if collectd_settings.Hostname is defined and collectd_settings.Hostname -%}
Hostname "{{ collectd_settings.Hostname }}"
FQDNLookup {{ collectd_settings.FQDNLookup }}
{% else -%}
FQDNLookup "{{ collectd_settings.FQDNLookup|lower }}"
{% endif -%}
#BaseDir "/var/lib/collectd"
#PluginDir "/usr/lib/collectd"

Expand Down
3 changes: 1 addition & 2 deletions collectd/map.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,13 @@
{# Settings dictionary with default values #}
{% set default_settings = {
'collectd': {
'Hostname': salt['grains.get']('fqdn'),
'Interval': 10,
'Timeout': 2,
'ReadThreads': 5,
'WriteQueueLimitHigh': 2000000,
'WriteQueueLimitLow': 1800000,
'CollectInternalStats': 'false',
'FQDNLookup': 'false',
'FQDNLookup': 'true',
'plugins': {
'default': [
'battery',
Expand Down
5 changes: 4 additions & 1 deletion pillar.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
collectd:
FQDNLookup: true
# This line restores the old behaviour, comment it out to use the system's hostname
Hostname: {{ salt['grains.get']('fqdn') }}
# If Hostname is not defined, whether collectd will try to figure it out as a FQDN (default: true)
FQDNLookup: false
TypesDB: ['/usr/share/collectd/types.db']
plugins:
default: [battery, cpu, entropy, load, memory, swap, users]
Expand Down