Jira (PUP-5068) Windows - Allow logging to a different event log

2 views
Skip to first unread message

Rob Reynolds (JIRA)

unread,
Aug 24, 2015, 11:06:03 AM8/24/15
to puppe...@googlegroups.com
Rob Reynolds created an issue
 
Puppet / Improvement PUP-5068
Windows - Allow logging to a different event log
Issue Type: Improvement Improvement
Assignee: Unassigned
Created: 2015/08/24 8:05 AM
Fix Versions: PUP 4.x
Priority: Normal Normal
Reporter: Rob Reynolds

Logging to the Application Event Log is fine, but in some cases folks may want to log to a custom event log they set up. We should provide an option to pass the event log through the call.

https://github.com/puppetlabs/puppet/blob/e0b0d2009af0fc803066368c42a96966dd764f46/ext/windows/service/daemon.rb#L140-L157

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c)
Atlassian logo

Rob Reynolds (JIRA)

unread,
Aug 24, 2015, 11:09:06 AM8/24/15
to puppe...@googlegroups.com
Rob Reynolds updated an issue
Change By: Rob Reynolds
Logging to the Application Event Log is fine, but in some cases folks may want to log to a custom event log they set up. We should provide an option to pass the event log through the  call  registry .  


The relevant code for setting event log is here.
https://github.com/puppetlabs/puppet/blob/e0b0d2009af0fc803066368c42a96966dd764f46/ext/windows/service/daemon.rb#L140-L157


Notes for scoping: 
* This will not create the event log, that must be handled separately.
* The way to set this is a rudimentary change to the registry service startup call in {{ImagePath}} of the registry value at {{HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\puppet}}.

Rob Reynolds (JIRA)

unread,
Aug 24, 2015, 11:12:04 AM8/24/15
to puppe...@googlegroups.com
Rob Reynolds updated an issue
Change By: Rob Reynolds
Component/s: Windows
Component/s: PE

Rob Reynolds (JIRA)

unread,
Aug 24, 2015, 11:12:05 AM8/24/15
to puppe...@googlegroups.com

Rob Reynolds (JIRA)

unread,
Aug 24, 2015, 11:22:18 AM8/24/15
to puppe...@googlegroups.com
Rob Reynolds updated an issue
Logging to the Application Event Log is fine, but in some cases folks may want to log to a custom event log they set up. We should provide an option to pass the event log through the registry.


The relevant code for setting event log is here.
https://github.com/puppetlabs/puppet/blob/e0b0d2009af0fc803066368c42a96966dd764f46/ext/windows/service/daemon.rb#L140-L157


Notes for scoping: 
* This will not create the event log, that must be handled separately.
* The way to set this is a rudimentary change to the registry service startup call in {{ImagePath}} of the registry value at {{HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\puppet}}.


Eventually this could be an option passed during install/upgrade that will set the property automatically. That would scope a bit higher.

Rob Reynolds (JIRA)

unread,
Sep 9, 2015, 1:40:05 PM9/9/15
to puppe...@googlegroups.com
Rob Reynolds updated an issue
Change By: Rob Reynolds
Sprint: Windows 2015-10-07
This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4)
Atlassian logo

Steve Barlow (JIRA)

unread,
Sep 23, 2015, 1:28:08 PM9/23/15
to puppe...@googlegroups.com
Steve Barlow updated an issue
Change By: Steve Barlow
Sprint: Windows 2015-10- 07 21

Steve Barlow (JIRA)

unread,
Oct 6, 2015, 5:36:04 PM10/6/15
to puppe...@googlegroups.com
Steve Barlow updated an issue
Change By: Steve Barlow
Sprint: Windows 2015- 10 11 - 21 18

Steve Barlow (JIRA)

unread,
Nov 2, 2015, 1:08:03 PM11/2/15
to puppe...@googlegroups.com
Steve Barlow updated an issue
Change By: Steve Barlow
Sprint: Windows 2015- 11 12 - 18 02
This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc)
Atlassian logo

Steve Barlow (JIRA)

unread,
Nov 16, 2015, 1:13:09 PM11/16/15
to puppe...@googlegroups.com
Steve Barlow updated an issue
Change By: Steve Barlow
Sprint: Windows 2015-12-02

Rob Reynolds (JIRA)

unread,
Nov 16, 2015, 1:14:06 PM11/16/15
to puppe...@googlegroups.com
Rob Reynolds updated an issue
Change By: Rob Reynolds
CS Priority: Needs Priority

Kenaz Kwa (JIRA)

unread,
Aug 29, 2016, 7:28:04 PM8/29/16
to puppe...@googlegroups.com
Kenaz Kwa updated an issue
Change By: Kenaz Kwa
Team: Agent & Platform Support
This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9)
Atlassian logo

Ethan Brown (JIRA)

unread,
Mar 8, 2017, 6:17:02 PM3/8/17
to puppe...@googlegroups.com
Ethan Brown updated an issue
Change By: Ethan Brown
Sprint: Agent Grooming
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Ethan Brown (JIRA)

unread,
Mar 8, 2017, 6:17:02 PM3/8/17
to puppe...@googlegroups.com
Ethan Brown updated an issue
Change By: Ethan Brown
Fix Version/s: PUP 4.y
Fix Version/s: PUP 5.0.0

Geoff Nichols (JIRA)

unread,
Mar 14, 2017, 11:54:02 PM3/14/17
to puppe...@googlegroups.com

Geoff Nichols (JIRA)

unread,
Mar 15, 2017, 12:38:08 PM3/15/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Sprint: Agent Grooming  On-Deck

Geoff Nichols (JIRA)

unread,
Mar 29, 2017, 8:48:05 AM3/29/17
to puppe...@googlegroups.com

Geoff Nichols (JIRA)

unread,
Mar 29, 2017, 1:59:03 PM3/29/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Fix Version/s: PUP 5.y
Fix Version/s: PUP 5.0.0

Geoff Nichols (JIRA)

unread,
Mar 29, 2017, 1:59:03 PM3/29/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Fix Version/s: PUP 5.0.0
Fix Version/s: PUP 5.y

Geoff Nichols (JIRA)

unread,
Mar 29, 2017, 2:06:02 PM3/29/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Sprint: Agent  Grooming  Needs Information

Geoff Nichols (JIRA)

unread,
Mar 30, 2017, 11:22:02 PM3/30/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Fix Version/s: PUP 5.0.0
Fix Version/s: PUP 5.y

Geoff Nichols (JIRA)

unread,
Apr 13, 2017, 1:48:08 AM4/13/17
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Sprint: Agent Needs Information

Branan Riley (JIRA)

unread,
May 15, 2017, 2:29:06 PM5/15/17
to puppe...@googlegroups.com
Branan Riley updated an issue
Change By: Branan Riley
Labels: triaged windows

Ethan Brown (JIRA)

unread,
May 19, 2017, 1:02:03 PM5/19/17
to puppe...@googlegroups.com
Ethan Brown updated an issue
Change By: Ethan Brown
Sprint: Agent N+2

Geoff Nichols (JIRA)

unread,
Jun 21, 2017, 3:59:02 PM6/21/17
to puppe...@googlegroups.com

Craig Gomes (JIRA)

unread,
Jul 13, 2017, 2:21:02 PM7/13/17
to puppe...@googlegroups.com
Craig Gomes updated an issue
Change By: Craig Gomes
Team: Agent Windows

Rob Reynolds (JIRA)

unread,
Aug 14, 2017, 5:13:02 PM8/14/17
to puppe...@googlegroups.com
Rob Reynolds commented on Improvement PUP-5068
 
Re: Windows - Allow logging to a different event log

I think this could be handled by a switch in the puppet.conf. If it is missing, it goes to the default location. If it is there, it creates an event log based on the name that is in the conf and then it configures to use it.

Ethan Brown (JIRA)

unread,
Aug 18, 2017, 4:35:06 PM8/18/17
to puppe...@googlegroups.com
Ethan Brown commented on Improvement PUP-5068

Yeah, we've tossed that idea around Rob Reynolds. That incurs a bit of work with reading the INI during upgrade, etc if we intend to also allow it be specified at the command line as an MSI property. The other snag there is that if the configured user doesn't have access to create the event log, then that's a problem - but maybe that's rare and worthy of just a warning because the typical configuration should work.

Craig Gomes (JIRA)

unread,
Aug 23, 2017, 5:12:03 PM8/23/17
to puppe...@googlegroups.com
Craig Gomes updated an issue
Change By: Craig Gomes
Scrum Team: Windows
Team: Windows
Team/s: Windows
Epic Status: In Progress
Epic Name:
Windows - Allow logging to a different event log
Status: Accepted Open
Workflow: Scrum Team Engineering Epic  Workflow
Issue Type: Improvement Epic

Ethan Brown (JIRA)

unread,
Sep 6, 2017, 5:44:54 PM9/6/17
to puppe...@googlegroups.com
Ethan Brown commented on Epic PUP-5068
 
Re: Windows - Allow logging to a different event log

So for the time being, we've decided to not pursue this particular effort as written, by adding a configurable event log destination.

Instead, as part of

PUP-5756 , Puppet was changed so that should a Puppet event log destination exist, Puppet will automatically log there. There are some more details in the PR at https://github.com/puppetlabs/puppet/pull/5509/files#r135102712 about the technical details of how that works, but the important thing is that users of Puppet 5.0.0 and above may opt-in to this change in behavior by simply registering the event log destination.

There are a few ways this can be done:

  • By directly creating the registry keys like:

    reg add HKLM\System\CurrentControlSet\Services\EventLog\Puppet\Puppet /v EventMessageFile /t REG_EXPAND_SZ /d "C:\Program Files\Puppet Labs\Puppet\bin\puppetres.dll"
    

  • By using the PowerShell helper:

    New-EventLog -Source Puppet -LogName Puppet -MessageResource "C:\Program Files\Puppet Labs\Puppet\bin\puppetres.dll"
    

  • By pushing out the reg keys via GPO (can be done prior to bootstrapping the agent install or after the agent has installed)
  • By using Puppet resources - a cmd based exec that runs reg.exe OR a PowerShell exec that runs New-EventLog OR registry resources (from the registry module)

This allows us to enable the feature without making any additional code changes to Puppet which is the ideal solution for now.

Note that PUP-7914 was added for the Puppet 5.2.0 release to make sure a release note appears, so users know to look at updated documentation.

Erick Banks (JIRA)

unread,
Feb 7, 2019, 2:43:05 PM2/7/19
to puppe...@googlegroups.com
Erick Banks updated an issue
 
Change By: Erick Banks
Epic Status: In Progress Done
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Josh Cooper (JIRA)

unread,
Jul 15, 2019, 7:45:05 PM7/15/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Fix Version/s: PUP 5.y
Reply all
Reply to author
Forward
0 new messages