Good morning.
Scenario: install SNMP (agent and daemon), change config file and restart
of service.
What's wrong? The logs showed that AFTER the new config file is applied,
the service (snmpd) is restarted, but looks like this is not true.
I arrived to this conclusion because if just after puppet finishes to load
the catalog I run a snmpwalk command against localhost I get no response.
After a restart of snmpd service, the new configuration applies.
Any error in below config?
Best regards
Client: test-3.dev.jj.com
Server: puppet-1.dev.jj.com
test-3.dev.jj.com:/var/log/daemon.log
Jun 15 17:07:27 test-3 puppet-agent[1219]: Reopening log files
Jun 15 17:07:27 test-3 puppet-agent[1219]: Starting Puppet client version
2.6.2
Jun 15 17:07:48 test-3 puppet-agent[1219]: Caching catalog for
test-3.dev.jj.com
Jun 15 17:07:48 test-3 puppet-agent[1219]: Applying configuration version
'1339772181'
Jun 15 17:08:21 test-3 puppet-agent[1219]:
(/Stage[main]/Apt::Service/Exec[/usr/bin/apt-get update]/returns) executed
successfully
Jun 15 17:08:44 test-3 puppet-agent[1219]:
(/Stage[main]/Snmp::Install/Package[snmp]/ensure) ensure changed 'purged'
to 'present'
Jun 15 17:09:01 test-3 snmpd[1877]: payload OID: prNames
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: Unknown payload OID: prNames
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
Unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: payload OID: prErrMessage
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: Unknown payload OID: prErrMessage
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
Unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: trigger OID: prErrorFlag
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
unknown monitor OID
Jun 15 17:09:01 test-3 snmpd[1877]: payload OID: memErrorName
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: Unknown payload OID: memErrorName
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
Unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: payload OID: memSwapErrorMsg
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: Unknown payload OID: memSwapErrorMsg
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
Unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: trigger OID: memSwapError
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
unknown monitor OID
Jun 15 17:09:01 test-3 snmpd[1877]: payload OID: extNames
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: Unknown payload OID: extNames
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
Unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: payload OID: extOutput
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: Unknown payload OID: extOutput
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
Unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: trigger OID: extResult
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
unknown monitor OID
Jun 15 17:09:01 test-3 snmpd[1877]: payload OID: dskPath
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: Unknown payload OID: dskPath
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
Unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: payload OID: dskErrorMsg
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: Unknown payload OID: dskErrorMsg
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
Unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: trigger OID: dskErrorFlag
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
unknown monitor OID
Jun 15 17:09:01 test-3 snmpd[1877]: payload OID: laNames
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: Unknown payload OID: laNames
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
Unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: payload OID: laErrMessage
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: Unknown payload OID: laErrMessage
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
Unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: trigger OID: laErrorFlag
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
unknown monitor OID
Jun 15 17:09:01 test-3 snmpd[1877]: payload OID: fileName
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: Unknown payload OID: fileName
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
Unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: payload OID: fileErrorMsg
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: Unknown payload OID: fileErrorMsg
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
Unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: trigger OID: fileErrorFlag
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
unknown monitor OID
Jun 15 17:09:01 test-3 snmpd[1877]: payload OID: snmperrErrMessage
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: Unknown payload OID: snmperrErrMessage
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
Unknown payload OID
Jun 15 17:09:01 test-3 snmpd[1877]: trigger OID: snmperrErrorFlag
Jun 15 17:09:01 test-3 snmpd[1877]: /etc/snmp/snmpd.conf: line 143: Error:
unknown monitor OID
Jun 15 17:09:01 test-3 snmpd[1877]: Turning on AgentX master support.
Jun 15 17:09:01 test-3 snmpd[1877]: net-snmp: 33 error(s) in config file(s)
Jun 15 17:09:01 test-3 snmpd[1877]: NET-SNMP version 5.4.3
Jun 15 17:09:01 test-3 puppet-agent[1219]:
(/Stage[main]/Snmp::Install/Package[snmpd]/ensure) ensure changed 'purged'
to 'present'
Jun 15 17:09:01 test-3 puppet-agent[1219]: FileBucket adding
/etc/snmp/snmpd.conf as {md5}a5007383dd9c4ef73500e3df8c080665
Jun 15 17:09:01 test-3 puppet-agent[1219]:
(/Stage[main]/Snmp::Config/File[/etc/snmp/snmpd.conf]) Filebucketed
/etc/snmp/snmpd.conf to puppet with sum a5007383dd9c4ef73500e3df8c080665
Jun 15 17:09:02 test-3 puppet-agent[1219]:
(/Stage[main]/Snmp::Config/File[/etc/snmp/snmpd.conf]/content) content
changed '{md5}a5007383dd9c4ef73500e3df8c080665' to
'{md5}6a797811e82b5f411af1093ea6336a04'
Jun 15 17:09:02 test-3 puppet-agent[1219]:
(/Stage[main]/Snmp::Config/File[/etc/snmp/snmpd.conf]) Scheduling refresh
of Service[snmpd]
Jun 15 17:09:02 test-3 puppet-agent[1219]:
(/Stage[main]/Snmp::Service/Service[snmpd]/ensure) ensure changed 'stopped'
to 'running'
Jun 15 17:09:02 test-3 puppet-agent[1219]:
(/Stage[main]/Snmp::Service/Service[snmpd]) Triggered 'refresh' from 1
events
Jun 15 17:09:02 test-3 puppet-agent[1219]: Finished catalog run in 73.61
seconds
puppet-1.dev.jj.com:/etc/puppet/modules/snmp/manifests/config.pp
class snmp::config {
file { $snmp::params::snmp_service_config:
ensure => present,
owner => 'root',
group => 'root',
mode => 0600,
source => "puppet:///modules/snmp/snmpd.conf",
require => Class["snmp::install"],
notify => Class["snmp::service"],
}
}
puppet-1.dev.jj.com:/etc/puppet/modules/snmp/manifests/init.pp
class snmp {
include snmp::params, snmp::install, snmp::config, snmp::service
}
puppet-1.dev.jj.com:/etc/puppet/modules/snmp/manifests/install.pp
class snmp::install {
package { $snmp::params::snmp_package_name:
ensure => installed,
require => Class["apt::service"],
}
}
puppet-1.dev.jj.com:/etc/puppet/modules/snmp/manifests/params.pp
class snmp::params {
case $operatingsystem {
/(Ubuntu|Debian)/: {
$snmp_package_name = ['snmp','snmpd']
$snmp_service_config = '/etc/snmp/snmpd.conf'
$snmp_service_name = 'snmpd'
}
}
}
puppet-1.dev.jj.com:/etc/puppet/modules/snmp/manifests/service.pp
class snmp::service {
service { $snmp::params::snmp_service_name:
ensure => running,
hasstatus => true,
hasrestart => true,
# Boot time
enable => true,
require => Class["snmp::config"],
}
}
puppet-1.dev.jj.com:/etc/puppet/modules/apt/manifests/service.pp
class apt::service {
exec{"/usr/bin/apt-get update":
}
}
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/zROmrCpCI10J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.