Performance Analytics - Get Incidents created from alerts in under 25 min
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2024 10:21 AM
Let me preface this by saying that I understand and recognize that Scripting Incidators is not the ideal way to handle PA in ServiceNow. But I'm a bit at wit's end and I would love to be able to integrate this fuctionality within ServiceNow with minimal exterior calculations.
So I have built a new indicator source that looks at alert executions table to identify all alert executions that occurred via a Create Incident button press. I would love to create an indicator that calculates the percentage of alerts that were turned into incidents in this manner with 25 min. I'm trying to script something along these lines, using Count Distinct as my aggregator.
var diff = function(x,y) {
return y.dateNumericValue() - x.dateNumericValue();
};
var minutes = function(x,y) {
return diff(x,y)/(60);
};
(minutes(current.alert.sys_created_on,current.sys_created_on) < 25);
I've also tried leaving off the "< 25" in the script and putting my time comparison element into a formula indicator (i.e. [Indicator] <25 / Indicator *100.
I get varying results or no results or errors from scripts depending on how I tweak things but never get the expected outcome based on my data and it would be cool if someone had an understanding of PA and scripting that would either help me fix it or help me debug it.
0 REPLIES 0