The CreatorCon Call for Content is officially open! Get started here.

Metric Duration Reporting

Rick Mann
Tera Expert

Does anyone know why there are two duration fields calculated when the metrics definition is setup on a certain table? For example, we are collecting metrics on our problem table and we have two duration fields, mi_duration and prb_calendar_duration. Each field has a different value. The mi_duration field seems to have the correct metric for status duration of a particular problem, but I'm not sure what prb_calendar_duration is collecting or how we would use it.

Thanks for any help.

Rick

1 REPLY 1

MB26
ServiceNow Employee
ServiceNow Employee

I am assuming that you are looking at the "Problem Metric" (problem_metric) table. This is a database view based on the problem, metric definition, and metric instance table. In essence it is one large table of all those tables put together. What happens is that if a column on one table has the same label name as another table, the Database View has to distinguish them somehow. In this case the problem table actually has a column called "calendar_duration" with it's label being "duration". Likewise the MEtric Definition table has a field called "duration" with its label being " Duration". In order to distinguish these in the larger Database view, the view prefaces these names with whatever the variable_prefix contains in the Database view. See System Definition --> Database Views and look at problem_metrics view. Each View Table has a variable prefix. In the end the view calls the Duration field from the problem table prb_calendar_duration, and the duration field from the Metric Instance mi_duration.
The reason why the mi_duration "looks right" to you, is because it is the one that gets populated by the metric instance.