Get audit messages and param values in non XML format.

Document ID : KB000012622
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

The audit sink policy can be written to obtain the desired information from gateway audits. We can write this policy to get the param values in the audit detail and iterate through these param values. 

Question:

In audit sink policy, the default way is using assertion "Convert audit record to XML" assertion to get audit message.

Can you please provide a logic where we get either the original row audit message or plain text message and also a logic which would iterate through the param values?

Answer:

The policy attached to the article audit_sink_policy_parameter.xml iterates through the parameters generated during auditing. Few audit detail assertions are also added to show what the context variables contain. The audit messages under "Associated Logs"  in "Gateway Audit Events" in policy manager  can be obtained using context variable ${i.current.fullText} show in assertion number 10

The main logic to obtain each parameter value is between assertion number 11-20 where the final value of the parameter is in ${target.current} and all parameter present can be seen in variable ${i.current.properties}.

 

Additional Information:

Attachment: audit_sink_policy_parameter.xml

Further information on audit sink policy can be found here Working with the Audit Sink Policy

File Attachments:
TEC1825452.zip