The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Feature #12392

Support Windows Event Logging and log to it by default

Added by Dan Hogland over 2 years ago. Updated over 2 years ago.

Status:ClosedStart date:02/02/2012
Priority:NormalDue date:
Assignee:Josh Cooper% Done:

0%

Category:windows
Target version:2.7.14
Affected Puppet version:2.7.6 Branch:https://github.com/puppetlabs/puppet/pull/643
Keywords:windows eventlog

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This issue is currently not available for export. If you are experiencing the issue described below, please file a new ticket in JIRA. Once a new ticket has been created, please add a link to it that points back to this Redmine ticket.


Description

Puppet on Windows should default the log output from puppet agent executions are sent to Windows Event Logs. Most Windows syslog implementations look here for logs to send out to the central syslog server.


Related issues

Related to Puppet - Bug #12403: Windows agents should log to a file by default Closed 02/02/2012

History

#1 Updated by Daniel Pittman over 2 years ago

  • Category set to windows
  • Status changed from Unreviewed to Needs Decision
  • Assignee set to Josh Cooper

Dan Hogland wrote:

Puppet on Windows should default the log output from puppet agent executions are sent to Windows Event Logs. Most Windows syslog implementations look here for logs to send out to the central syslog server.

This is actually more complex than it sounds, because the event log service requires specific, C-level DLL definitions of event sources. To do this right we would have to install our own, which is surprisingly complex and painful on Windows; you need to build a custom DLL, and install it appropriately for the system, so that you can get your structured events represented appropriately.

Doing this “right” would also mean documenting and committing to an external structured event format, not just plain text; we could do a half-baked integration where we just emit text strings, but they are not actually that nice compared to real event data.

https://github.com/djberg96/win32-eventlog has details of the integration side of this, and the tooling required to build out an event source definition DLL.

#2 Updated by Josh Cooper over 2 years ago

  • Subject changed from Windows agent default to logging agent run output to Windows Event Logs to Support Windows Event Logging and log to it by default
  • Description updated (diff)
  • Status changed from Needs Decision to Accepted

Dan, as we talked about, NT event logging is something that was explicitly out of scope during our initial windows work, but obviously it’s something that windows admins care about. With that said, we’ll need to put this on the roadmap and prioritize against other features, e.g. registry.

#3 Updated by Josh Cooper over 2 years ago

  • Target version set to 2.7.x
  • Affected Puppet version set to 2.7.6
  • Keywords set to windows eventlog

#4 Updated by Josh Cooper over 2 years ago

Eventlog support has been implemented (adding an eventlog destination, and writing to it by default) here https://github.com/joshcooper/puppet/tree/ticket/2.7.x/12392-eventlog. It also updates the install.rb to register the message resource dll for FOSS.

Changes to the MSI (to register the message resource dll) are here https://github.com/joshcooper/puppet_for_the_win/tree/ticket/master/12392-eventlog but I am waiting until meeting with Haus to figure out branching for PE 2.5.x and also updating the ruby.zip that gets bundled into the MSI (it needs the win32-eventlog gem). Once these issues are resolved I’ll submit pull requests and update this ticket.

Also there is a pull request to the acceptance test framework, as the ‘git’ windows vm snapshot does not include the win32-eventlog gem. This will need to be merged https://github.com/puppetlabs/puppet-acceptance/pull/188 before the puppet changes are merged.

#5 Updated by Josh Cooper over 2 years ago

  • Status changed from Accepted to In Topic Branch Pending Review
  • Branch set to https://github.com/puppetlabs/puppet/pull/643

#6 Updated by Josh Cooper over 2 years ago

The puppet_for_the_win pull request is here: https://github.com/puppetlabs/puppet_for_the_win/pull/35

#7 Updated by Jeff McCune over 2 years ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release
  • Target version changed from 2.7.x to 2.7.13

Merged

ruby.zip has been updated, repacked and uploaded. It now contains the win32-eventlog gem for Windows.

The merge in Puppet 2.7.x is:

commit dce623c007e08b894cfec2188c9ecef5b99bf3bc
Merge: c210584 8d2ff89
Author: Jeff McCune 
Date:   Tue Apr 10 11:27:07 2012 -0700

    Merge branch 'ticket/2.7.x/12392-eventlog' into 2.7.x
    
    * ticket/2.7.x/12392-eventlog:
      (#12392) Add eventlog destination and log to it by default on Windows
      (#12392) Created Windows eventlog message resource dll

The merge in FTW 2.5.x is:

commit 666b4d9b4a7d1524d9c7513e0cb1d306f196968b
Merge: a666950 32c4edc
Author: Jeff McCune 
Date:   Tue Apr 10 11:08:28 2012 -0700

    Merge remote-tracking branch 'joshcooper/ticket/2.5.x/12392-eventlog' into 2.5.x
    
    * joshcooper/ticket/2.5.x/12392-eventlog:
      (#12392) Register puppet eventlog message dll

#8 Updated by Matthaus Owens over 2 years ago

  • Target version changed from 2.7.13 to 2.7.14

#9 Updated by Matthaus Owens over 2 years ago

  • Status changed from Merged - Pending Release to Closed

Released in Puppet 2.7.14rc1

Also available in: Atom PDF