Skip to end of banner
Go to start of banner

2.5.4 Indexes & Post-Processing Data

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Hello. In this video, you will learn about ACDI Reporting Postprocessing, what it is, and how you can use it. Let's try an example of a simple report based on data received from eDirectory snapshots.

This report will show data about users, and it will show if you need to do some actions due to a login expiration date coming close.

So, here you have one entity for users, some filters, and a list of result table attributes.

Let's check one of the user entities.

You can see that some attributes are in a human-readable format and some aren’t.

And if you want to change it, for example, transform the date string into a readable format, define or change the order of days, months, etc., or change values from numeric codes to descriptions and words, you need to use postprocessing.

For example, attribute loginExpirationTime stores the date in a date string informat—"yyyyMMddhhmmssZ”.

But what if you need to create a report that you will run, for example, on a weekly or monthly basis and which will show users whose login will expire in a preset time period, in the next week or next month? For this, postprocessing is at your disposal. Let's see how it works.

In Report Editor there is a tab called “Postprocessing” where you can add all your JavaScript functions which will be implemented to filter values or to values in the resulting report.

You are able to paste in the function “value,” which is a value of an attribute excel itself; “record” which is a full record in the JSON format, and “context,” the main context of an operation.

A field with the custom name “record” has been prepared beforehand for this video.

You can use any other name for additional attributes. Let's see what the record will look like. For this purpose, a function that will return a string with the record was created and added here.

Okay. To enable postprocessing, you need to select the function, enable postprocessing,

and if you want to put a full record as a function argument, the feature “Pass full record object to the postprocess function” must be enabled. Let's look at the report.

Here you have only seven objects matching the criteria from the query. Let’s run the report.

You see now what JSON with the entity objects looks like. It can help you in further creating postprocessing functions. You can also see that the login expiration time is in a raw format.

In order to add a separator between years, months, days, hours, and minutes, you need to create a custom postprocessing function. Right now, in this video, the one prepared beforehand will be used. The function requires only one argument “value” and works by transforming a string into a new format.

Let's implement this function. Save and run the report.

Here are the results. Now the date string is much more readable and nice-looking compared to what was previously.

Okay, but how can you add a custom attribute, a custom field, or a custom column that will show you if you need or don’t need to do some actions? Again, let’s use the postprocessing!

There is one small nuance: postprocessing transforms properties of a record object one by one in the order of a list you have in result table attributes. This means that if you apply data transformation (data postprocessing) to your record in one attribute, the next attribute will contain a modified record. Let's see what it looks like after the record object in the login expiration time attribute has been updated.

Here you see that there is already a value for the appropriate key—login expiration time—in the postprocessed format, so the data has already been transformed. But it is also to see that the object was extended with a JSON string that contains a basic, unchanged record. And in the new postprocessing function, you can use either the already modified data or the raw.

The JavaScript function, which will add a note with a conclusion for the current user, has been prepared. It will show you if next month there will be users whose login will expire. Thanks to this function, you will get data about the number of days before the login expiration or a message that a login has already expired.

Let's implement this postprocessing function to a custom field named “conclusion.” The postprocessing and the “Pass full record object to the postprocessing function” feature are enabled. This is because you need another attribute for this functionality. Let's save and run the report.

Today’s date is the 18th of December and a login for this user will expire in 29 days.

This one will expire in about a month or later, and some logins have already expired.

For the expired logins, you need to decide either to extend or archive them. Maybe you need to do some other actions. This is one of the clear and simple ways you can use postprocessing.

The other ones are for attributes that contain numeric values like the XML state of drivers. Let's check driver state changes in the dashboard.

As you can see here, there were some state changes for drivers during the last week. And changes appear with changes in numeric values of statuses.

Of course, you can memorize and decode what each number means, but much easier will be to transform these numbers into a readable format using postprocessing. You can check it in the default NetIQ Audit Driver status report.

It is transformed into a readable format, and we can check what the postprocessing function looks like.

Should you have any questions or require any assistance, please do not hesitate to contact us at any time swsupport.skypro@skypro.ch

  • No labels