I am new to Kiwi syslog and don't know much about using Jscript. I'm reading that I need to create a script if I want a custom field added to my custom file format. I wanted to do a simple task of appending a specific ID number at the end of each event that is written to the syslog file. There is a repository that I send my syslog files to but the parser for that system needs the specific ID for my system to be at the end of each event message within the file. This is not the correct syntax but I want to do something like the following for example:
original message would look like = 2018-Jan-4 19:37:17 host IP 10.1.1.1 event message
modified message would look like = 2018-Jan-4 19:37:17 host IP 10.1.1.1 event message SystemID:12345678987654321
Function Main()
'Text to append to raw message
appendID = "SystemID:12345678987654321"
'get the raw message
modifiedRawMessage = Fields.VarRawMessageText
'Append text to message
modifiedRawMessage = Append(modifiedRawMessage, appendID)
'Overload message text with modified one.
Fields.VarRawMessageText = modifiedRawMessage
'Return success
Main = "OK"
End Function
Can someone help me with getting the syntax correct?
Thank you in advance.