Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Custom output handler for wrapping Gogen with the Splunk Command Modular Input. Just add this class to command_ta/bin/
class GoGenHandler:
def __init__(self,**args):
self.index = args['index']
self.source = args['source']
self.sourcetype = args['sourcetype'] = args['host']
def __call__(self,raw_cmd_output):
print "<stream><event><data>%s</data><source>%s</source><sourcetype>%s</sourcetype><index>%s</index><host>%s</host></event></stream>" % (encodeXMLText(raw_cmd_output),self.source,self.sourcetype,self.index,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.