aboutsummaryrefslogtreecommitdiffstats
path: root/puppet/services
diff options
context:
space:
mode:
authorMichele Baldessari <michele@acksyn.org>2017-05-15 11:03:53 +0200
committerMichele Baldessari <michele@acksyn.org>2017-05-15 15:00:06 +0200
commitc634f4eb1858b0292b89596e5a0b0f811009dd52 (patch)
treedda32a603a8e01a154a1d345bd925b3e970db786 /puppet/services
parent16cae1759fe5606d15a33d31f962ca757f499e1e (diff)
Default snmp to less verbose logging
Currently we just use what puppet-snmp provides in terms of defaults. This means that currently every single snmp query gets logged with the following: May 15 10:51:30 centos.localdomain snmpd[5159]: Connection from UDP: [127.0.0.1]:57799->[127.0.0.1]:161 May 15 10:51:30 centos.localdomain snmpd[5159]: Connection from UDP: [127.0.0.1]:57799->[127.0.0.1]:161 May 15 10:51:32 centos.localdomain snmpd[5159]: Connection from UDP: [127.0.0.1]:50566->[127.0.0.1]:161 The reason is that we use '-LS0-6d' as the default content for /etc/sysconfig/snmpd: https://github.com/razorsedge/puppet-snmp/blob/master/manifests/params.pp#L322 This default means that we are logging from 0 (LOG_EMERG) to 6 (LOG_INFO). The above messages bring nothing in a default installation and only spam the log files, so let's lower the upper log level to 5 (LOG_NOTICE) by default, so we properly do not see every single query in the logs. We add an option so the operator can still configure the desired log level via a Heat parameter. Change-Id: I8d3dfdb4d549cd27131346fc477755ad72313449
Diffstat (limited to 'puppet/services')
-rw-r--r--puppet/services/snmp.yaml5
1 files changed, 5 insertions, 0 deletions
diff --git a/puppet/services/snmp.yaml b/puppet/services/snmp.yaml
index 325656eb..b51242aa 100644
--- a/puppet/services/snmp.yaml
+++ b/puppet/services/snmp.yaml
@@ -40,6 +40,10 @@ parameters:
description: An array of bind host addresses on which SNMP daemon will listen.
type: comma_delimited_list
default: ['udp:161','udp6:[::1]:161']
+ SnmpdOptions:
+ description: A string containing the commandline options passed to snmpd
+ type: string
+ default: '-LS0-5d'
outputs:
role_data:
@@ -50,6 +54,7 @@ outputs:
tripleo::profile::base::snmp::snmpd_user: {get_param: SnmpdReadonlyUserName}
tripleo::profile::base::snmp::snmpd_password: {get_param: SnmpdReadonlyUserPassword}
snmp::agentaddress: {get_param: SnmpdBindHost}
+ snmp::snmpd_options: {get_param: SnmpdOptions}
tripleo.snmp.firewall_rules:
'127 snmp':
dport: 161