Ask Your Question
1

How to log puppet agent output to a custom file?

asked 2017-06-21 10:38:03 -0500

rajeevsharma gravatar image

Hi, My puppet agent (4.10.1) is installed on AIX box and reporting to PE 2017.2. I have a requirement to collect the log of puppet agent run in some separate other than /var/log/syslog_all.logwhere puppet logs the output by default. I see there is a setting in my puppet.conf puppetdlog = /var/log/puppetlabs/puppet/puppetd.log but it's not working.

The only way to get output to any separate file is --logdestbut I want this feature to be enabled not on command line rather in puppet.conf so that this setting will be applicable for all puppet agent run by default. Any idea?

edit retag flag offensive close merge delete

Comments

It seems there is no solution for this?: https://tickets.puppetlabs.com/browse/PUP-2997

rajeevsharma gravatar imagerajeevsharma ( 2017-06-22 02:53:09 -0500 )edit

Worst case you can parse our the output from syslog into it's own separate file using rsyslog. An example is here https://askubuntu.com/questions/186592/how-do-i-configure-rsyslog-to-send-logs-from-a-specific-program-to-a-remote-sysl

DarylW gravatar imageDarylW ( 2017-06-22 09:05:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-06-28 00:24:09 -0500

joshc gravatar image

Can you modify the AIX service script that executes puppet to include --logdest /path/to/file.log?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-06-21 10:38:03 -0500

Seen: 46 times

Last updated: Jun 28