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" <[email protected]> 
To: [email protected] 
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 [email protected]. 
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 [email protected].
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.

Reply via email to