When it comes to extracting logs from cloud rules, our usual route involves reaching out to support or ES. However, if these logs lack proper formatting, sifting through them for a specific user run can be quite challenging.

Here’s a method I employ to streamline the tracking of logs for individual runs, making it easier for you to obtain them via the support team.

Log Prefixing for Enhanced Clarity

To facilitate the process, each rule type has access to some identity data, which we utilize as a logPrefix in every log line within the rule.

While there may be alternative approaches for various rule types, I’ve outlined my preferred methods below.

IdentityAttribute / AttributeGenerator / AttributeGeneratorFromTemplate / Generic Rule

For rules with access to the identity object, you can create a logPrefix attribute to append to each log line as follows:

Now, you can use this logPrefix to append to every log statement, like so:

BeforeProvisioning Rule

For rules with access to the plan object, use the following approach:

Now, you can incorporate the logPrefix in the log lines as mentioned earlier.

Correlation Rule

When dealing with the Correlation Rule and access to the account object, fetch a primary identifier (e.g., STAFF_NUMBER) for enhanced identification:

ManagerCorrelation Rule

For the ManagerCorrelation Rule and access to the link object, retrieve a primary key (e.g., Userid) for better association:

BuildMap Rule

Finally, for the BuildMap Rule and access to cols and record of the accounts, fetch an attribute (e.g., EMP_NO) via a map for logging:

Streamlined Output Request

When requesting logs, provide the formatted logPrefix, the organization name, and the timeframe. For example:

 Generate sAMAccountName - [EMP001]

The logs, once fetched, will be neatly formatted and easily identifiable, even in scenarios where the rule runs for thousands of users but you need information about just one user for troubleshooting:

I hope this aids you on your rule journey! If you have any questions, feel free to reach out.


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.