From 17aaeb0cea02362f61f317bd04dcd115fc427db1 Mon Sep 17 00:00:00 2001 From: Antoine Meillet Date: Thu, 12 Jul 2018 13:07:52 +0200 Subject: [PATCH] Add a variable to enable syslog support --- attributes/default.rb | 3 +++ recipes/default.rb | 1 + templates/default/config.php.erb | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/attributes/default.rb b/attributes/default.rb index 943120a..977d1e3 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -125,3 +125,6 @@ default['librenms']['auth_radius']['timeout'] = 3 default['librenms']['auth_radius']['users_purge'] = 14 default['librenms']['auth_radius']['default_level'] = 1 + +# Syslog +default['librenms']['syslog']['enabled'] = false diff --git a/recipes/default.rb b/recipes/default.rb index df442e2..c54509f 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -320,6 +320,7 @@ user: librenms_username, path: librenms_homedir, rrdc_enabled: node['librenms']['rrdcached']['enabled'], + syslog_enabled: node['librenms']['syslog']['enabled'], auto_up: node['librenms']['auto_update_enabled'], xdp: node['librenms']['autodiscover']['xdp'], ospf: node['librenms']['autodiscover']['ospf'], diff --git a/templates/default/config.php.erb b/templates/default/config.php.erb index ab3e401..bbce356 100644 --- a/templates/default/config.php.erb +++ b/templates/default/config.php.erb @@ -26,6 +26,10 @@ $config['rrd_dir'] = "<%= @rrddir %>"; $config['rrdcached'] = "unix:/var/run/rrdcached/rrdcached.sock"; <% end %> +<% if @syslog_enabled %> +$config['enable_syslog'] = 1; +<% end %> + $config['snmp']['community'] = array("public"); $config['update'] = <%= @auto_up %>;