How to trigger Windows Events from Snap Creator

by Extraordinary Contributor on ‎2011-01-14 09:45 AM

The idea here is to integrate Snap Creator error messages with the windows event system so that Snap Creator logs to event viewer. Snap Creator does not have direct integration with windows event management however it is easy enough to integrate the two. In the Snap Creator config file there are two parameters which need to be configured.

SUCCESS_TRAP - This parameter tells Snap Creator how to handle success messages

SENDTRAP - This parameter tells Snap Creator how to handle error messages and in the event that the SUCCESS_TRAP parameter is empty how to deal with success messages

In order to create windows events the eventcreate cli command can be used. Below is an example of how to get Snap Creator to create both success and error messages in Windows event viewer.

SUCCESS_TRAP=eventcreate  /ID 800 /L APPLICATION /SO SnapCreator /T INFORMATION /D %MSG

SENDTRAP=eventcreate  /ID 801 /L APPLICATION /SO SnapCreator /T ERROR /D %MSG

Thanks to Sebastian Hegmanns for figuring this out!

Warning!

This NetApp Community is public and open website that is indexed by search engines such as Google. Participation in the NetApp Community is voluntary. All content posted on the NetApp Community is publicly viewable and available. This includes the rich text editor which is not encrypted for https.

In accordance to our Code of Conduct and Community Terms of Use DO NOT post or attach the following:

  • Software files (compressed or uncompressed)
  • Files that require an End User License Agreement (EULA)
  • Confidential information
  • Personal data you do not want publicly available
  • Another’s personally identifiable information
  • Copyrighted materials without the permission of the copyright owner

Files and content that do not abide by the Community Terms of Use or Code of Conduct will be removed. Continued non-compliance may result in NetApp Community account restrictions or termination.