Dear all, I have Puppet 3.3.1 and rsyslog and RedHat 6. My problem is that I want to see the message "Finished catalog" only in the file /var/log/puppet/agent.log, but rsyslog sends it to the syslog server and than to netcool. It is also shown in /var/log/messages. I only want to see error message like Nov 26 13:20:36 vm7239 puppet-agent[19732]: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class syslog::conf for vm7239.muc.baag on node vm7239.muc.baag Nov 26 13:20:36 vm7239 puppet-agent[19732]: Not using cache on failed catalog Nov 26 13:20:36 vm7239 puppet-agent[19732]: Could not retrieve catalog; skipping run I have created a rsyslog file in rsyslog.d/ if $programname == ''puppet-agent'' and $syslogseverity <= ''6'' then /var/log/puppet/agent.log if $programname == ''puppet-agent'' and $syslogseverity >= ''6'' then ~ I think the severity of "Finished catalog" should be low. Can somebody please help me? Best regards Andreas -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/aefe6f79-e9bc-4bef-8bf6-68620cfdf657%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Here''s a brute-force method that came to mind: if $programname == ''puppet-agent'' and $syslogseverity == ''0'' then /var/log/puppet/agent-0.log if $programname == ''puppet-agent'' and $syslogseverity == ''1'' then /var/log/puppet/agent-1.log if $programname == ''puppet-agent'' and $syslogseverity == ''2'' then /var/log/puppet/agent-2.log if $programname == ''puppet-agent'' and $syslogseverity == ''3'' then /var/log/puppet/agent-3.log if $programname == ''puppet-agent'' and $syslogseverity == ''4'' then /var/log/puppet/agent-4.log if $programname == ''puppet-agent'' and $syslogseverity == ''5'' then /var/log/puppet/agent-5.log if $programname == ''puppet-agent'' and $syslogseverity == ''6'' then /var/log/puppet/agent-6.log if $programname == ''puppet-agent'' and $syslogseverity == ''7'' then /var/log/puppet/agent-7.log Do this a few times so that you will be certain . Hope this helps. “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) ----- Original Message ----- From: "Andreas Dvorak" <andreas.dvorak@gmail.com> To: puppet-users@googlegroups.com Sent: Tuesday, November 26, 2013 7:32:33 AM Subject: [Puppet Users] Puppet agent messages with rsyslog Dear all, I have Puppet 3.3.1 and rsyslog and RedHat 6. My problem is that I want to see the message "Finished catalog" only in the file /var/log/puppet/agent.log, but rsyslog sends it to the syslog server and than to netcool. It is also shown in /var/log/messages. I only want to see error message like Nov 26 13:20:36 vm7239 puppet-agent[19732]: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find class syslog::conf for vm7239.muc.baag on node vm7239.muc.baag Nov 26 13:20:36 vm7239 puppet-agent[19732]: Not using cache on failed catalog Nov 26 13:20:36 vm7239 puppet-agent[19732]: Could not retrieve catalog; skipping run I have created a rsyslog file in rsyslog.d/ if $programname == ''puppet-agent'' and $syslogseverity <= ''6'' then /var/log/puppet/agent.log if $programname == ''puppet-agent'' and $syslogseverity >= ''6'' then ~ I think the severity of "Finished catalog" should be low. Can somebody please help me? Best regards Andreas -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/aefe6f79-e9bc-4bef-8bf6-68620cfdf657%40googlegroups.com . For more options, visit https://groups.google.com/groups/opt_out . -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/1253526686.4742518.1385470307339.JavaMail.root%40sz0126a.westchester.pa.mail.comcast.net. For more options, visit https://groups.google.com/groups/opt_out.
Andreas Dvorak
2013-Nov-26 14:22 UTC
Re: [Puppet Users] Puppet agent messages with rsyslog
Hi, that info was nice to find out what syslogseverity the message "Finished catalog". It is 5. But I still do not understand why this message is send to the syslog server. According to the line if $programname == ''puppet-agent'' and $syslogseverity <= ''6'' then /var/log/puppet/agent.log it should only be writen in the agent.log file. Regards, Andreas -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/95b11a2e-cd4b-490e-991f-292bda83e5f5%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Andreas Dvorak
2013-Nov-27 12:00 UTC
Re: [Puppet Users] Puppet agent messages with rsyslog
Hi, I solved it with this: if $programname == ''puppet-agent'' and $syslogseverity <= ''6'' then /var/log/puppet/agent.log if $programname == ''puppet-agent'' and $syslogseverity > ''3'' then ~ Regards, Andreas -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/0542244c-633b-4ad5-a7e9-40bdf2298d9d%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.