Appanvil karma designer | ||||
---|---|---|---|---|
|
Anchor | ||||
---|---|---|---|---|
|
Appanvil karma designer | ||||
---|---|---|---|---|
|
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.
...
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.
...
Anchor | ||||
---|---|---|---|---|
|
Appanvil karma designer | ||||
---|---|---|---|---|
|
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.
...
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.
...
Anchor | ||||
---|---|---|---|---|
|
Appanvil karma designer | ||||
---|---|---|---|---|
|
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.
Anchor | ||||
---|---|---|---|---|
|
Appanvil karma designer | ||||
---|---|---|---|---|
|
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.
...
Anchor | ||||
---|---|---|---|---|
|
Appanvil karma designer | ||||
---|---|---|---|---|
|
One of the options where postprocessing can be used is a linkage between two different entities such as “nrf” requests.
...
You see that the list of approvers is stored inside of an XML string, and you need to parse DN to link it with a user from the same snapshot. In addition, it can be stored in the CSV format or inside a JSON string.
...
You can find how it works in the NetIQ Role Request Report.
...
Let's open the Report graph, and here it is to see what one main object “request” is linked to different entities.
...
If some entities contain attributes with strict DNs, there are also some attributes that contain DNs inside XMLs or JSONs. OK, the postprocessing was used from one side to parse DN from XML
...
And it also can be used to create regular expressions to be able to parse from different DN formats, from formats with DN, and from slash format. We go into detail about how to do it in the video about entities in reports.
...
So, postprocessing is a powerful tool in ACDI that allows you to create flexible reports. Thank you for your attention and take care.
Anchor | ||||
---|---|---|---|---|
|
Appanvil karma designer | ||||
---|---|---|---|---|
|
If according to report logic, some records should be removed from a final table and export documents' special function context.deleteRecord()
may be used. Once it is called the record where the postprocessing function is called from will be removed from a final report.
Please, create a postprocessing function, assign it to any attribute, enable postprocessing, and turn on “Pass full record object to the postprocess function”
...
function example:
Code Block |
---|
function(value, record, context){
if (record.sn && record.sn[0]==="Santos"){
context.deleteRecord();
}
return value;
} |
The current function will remove all objects that have “sn” equal to “Santos”
Should you have any questions or require any assistance, please do not hesitate to contact us at any time swsupport.skypro@skypro.ch