Question on monitoring new calculations when an adapter runs.
search cancel

Question on monitoring new calculations when an adapter runs.

book

Article ID: 137208

calendar_today

Updated On:

Products

CA Business Service Insight

Issue/Introduction

Whenever an adapter runs and brings in raw data for a metric, the service level calculation for that metric starts. Is there a way in the UI for BSI where I can see when a calculation started and when it is finished. I know, I can check reports to see if new data shows there. However, I am asking if there is a UI or some place where I can see when calculation is started and finished?

Environment

Release : 8.35

Component : CA Business Service Insight

Resolution

When an adapter loads in new data, this creates new events, but does not itself trigger any calculation. 


So, let us say you have a metric which is calculated up to Sept 18th, 2019. Now you run an adapter which either loads in new events or updates existing events. Let us say the oldest event that is loaded in or modified is for Sept 1st 2019.


When that metric is next calculated is will pull ALL events starting at Sept 1st 2019 and everything more recent. (This is because updating an old event might affect calculations later that rely on that event).


As for when this calculation will occur; each time a pslWriter starts a cycle it checks for new events for any metrics it has been configured to calculate. How often it runs a cycle is determined in the advanced engine settings in the UI. Often people have this set to continuously cycle so when it finishes one cycle it just starts another. But it could also be scheduled for once a day or something else.


So if this metric in question was being calculated by pslWriter instance 0 (the default), and it was in the middle of a calculation cycle, it would need to finish it's cycle and then start a new cycle (based on your engine settings) to pick up these new events. Then it would have to finish that cycle if you want to be sure it finished it's calculation for that metric.


Obviously this would also include calculating all other metrics assigned to that instance as well. 


So the best way I can think of to monitor this (aside from the admin freeform reports which show if a metric is fully calculated of not) would be to check the T_LOG for the cycle start and cycle end message for that particular pslWriter instance. They would look like:

PSLWriter cycle starts.

Ended PslWriter cycle. <and then some addiitonal info>

So for example, if you loaded in new events from an adapter which are used in a metric being calculated by PslWriter5 (keep in mind events might be consumed in multiple metrics) then if you ran:

select * from t_log where report_object='PslWriter5' and info like 'PSLWriter cycle starts.';

and:

select * from t_log where report_object='PslWriter5' and info like 'Ended PslWriter cycle.%';

Once additional messages come in for this it would definitely have calculated that metric. Again, this is just one possibility besides looking at the admin logs but could easily be automated if this is what you're looking for.


As for how to determine if the messages are AFTER the load, you could either keep track of a count or compare the date with the last runtime date of the adapter (which will be in the T_READERS table.