Skip to content

Commit 2253f26

Browse files
selvarun-umassadminniamccash
authored
Instance scan check to identify slow jobs in transaction logs. (#128)
* Add instance scan check to identify slow jobs in transaction logs. * Instance scan check to identify slow jobs in transaction logs. * Delete ca8467c41b9abc10ce0f62c3b24bcbaa/README.md * Update README.md As suggested, I have added the below to the root.README.md folder: ### Instance scan check to identify slow jobs in transaction logs. ### Purpose The Instance Scan Check is a table check scan that allows administrators to investigate transaction logs in ServiceNow to diagnose performance issues reported by users. This check specifically identifies transactions with a **Response Time** greater than **120 seconds**, helping to uncover performance bottlenecks, understand user behavior, and track down issues within a specific time frame. * Instance scan check to identify slow jobs in transaction logs --------- Co-authored-by: admin <[email protected]> Co-authored-by: niamccash <[email protected]>
1 parent f16a8d2 commit 2253f26

File tree

4 files changed

+71
-20
lines changed

4 files changed

+71
-20
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
![instance-scan-check-banner](https://github.com/Lacah/example-instancescan-checks/assets/47461634/2dc8c308-a249-41ca-89f6-26bc68749f7c)
22

33
# example-instancescan-checks
4-
4+
55
Open-Sourced community contributed and owned repository for Instance Scan Definitions. [ServiceNow Instance Scan](https://docs.servicenow.com/csh?topicname=hs-landing-page&version=latest) The checks contained in this repository are therefore considered "use at your own risk" and will rely on the open-source community to help drive fixes and feature enhancements via Issues and community members issuing and reviewing PRs. ServiceNow is not providing or authenticating these definitions. Occasionally, ServiceNow employees may choose to contribute to the open-source project as members of the community as they see fit, this does not constitute a service or product from ServiceNow.
66

77
🔔🔔🔔<br>
@@ -234,6 +234,9 @@ Restrict the number of row counts ma x to 10,20,50 instead of higher limits such
234234
Navigate to the user preference <sys_user_preference> table and search by 'rowcount'. Set the value to 50 max.
235235
Also, can set the property 'glide.ui.per_page' sys property value to 10, 20, 50 only
236236

237+
### Instance scan check to identify slow jobs in transaction logs.
238+
The Instance Scan Check is a table check scan that allows administrators to investigate transaction logs in ServiceNow to diagnose performance issues reported by users. This check specifically identifies transactions with a **Response Time** greater than **120 seconds**, helping to uncover performance bottlenecks, understand user behavior, and track down issues within a specific time frame.
239+
237240
### Check System Property with 'Ignore cache' = False
238241
Ignore Cache is a Glide Properties (records in the sys_properties table) field that impacts system performance.When it’s not handled carefully it can cause a system-wide cache flush leading to potentially severe performance degradation for anywhere from 5 to 30 minutes.
239242

ca8467c41b9abc10ce0f62c3b24bcbaa/README.md

-18
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
UBvFrDYpp6F473PapuKpJKvmmOUFgHEiVD5h695pnIT46m0IVAx59x1ktpNoZWBTXgM7AdJP1coxhN00Shmw9bNXm_HzYL92UD4dYmuICsujNrQr31qwCPeozLHR3BkzlPvWytL5BfPWcqGU-XSsarhtGPDjxgC2FP4hthcVI3uLDUY6HVQ8NAuLvOL3sEcCUuAMpVy6ZZjVZMVULf47a0Q8uS3aVM-Nn2UB4i5ifDA10sVReTr6N9HxC3A54aCwdMBDEY8krcVl7O_2q2QNS2UPoXc2Os0PxlJCzfBZYgvdq2Wa07TUEPv9hM_Gd-MYKC_9tJpmGuiIwkdUKo1Sdg0zrfTBq5bK03aonAUQ3YohDTcbHXyDJ0vXycn1eb4wgzzgZwlY5yILELwfm3t4_A1KYANrO3IC_ImJNe3nj8GGhuKVhdAVxfbrfjmcredgTeCIY5AyzzhR815b2zX0PPxvYYJOIVTajm6GWIH8yvUwV5q1lSrMYHw4nDIRsDUjH30qpg7EIV4ivBtO-lrCmwbXCsv6wpXJWqbtReK82OCZEWN3ovn1RYThAD55WAJkMt40_D0X7t1afak0eKUDTDK_V8lSQSeZ9d_D6cMtr2QlgZgHxX7jdmkn8KK0f9TCa07z4J5s4TJUFUxkriPZDimd3NcG3gpIJzV3AJOgqeE
1+
WWQm_IdWsTxg4URwBle2eXw7sIYuz7QcfROoa5TolyTIo-4kY4yJv9mdj4AV6pxGDqmcce-OqWYk2SRfmXXkpFqgbPUkM2EpKlebMDOKFW2seNgYWN4bkeJ9_Q6L0iEK6I6CR2QT3cGXnUdGOTJcKtOLprLFRIuuxIyn5oIOPoM6Kt1ok5D6usEHVLLSIVKw_2ipwP0u2uEaw_Gik4mla7e-vqKVXeArvB3AyUf6w1x-mRUIYg2ovffLI4ZvhIhdXuo8RFxkzAc5KvSWwMydfQ7Bqnvxc_ZPwwISUEJUshlpVExoEXU4N4ht15P5IrELTHQUYN6qlonJWzWP_kmjEZKO9zpr6yav5-Swp7Rtati5ByQx8sfdfX-MNa1Fg8eAPZUXTQiCiVMIonfzrgDZdUfRWi8kZfN0DnVxS0Drb31u3uroGnsrg4aa5QDU6upUoaX_sUGAdZfoRDxQwU42PA0qu8WKDAwaxdNgsSOy6hFn0rF3BCQkU1aI4aBsx_9P2o58Tp44Xe6IDNO_PuVGIfivJs7DVZzKbHdk4fdc8zRmv2Wl9nwbPpTEKHBDHalqO27RbZGOsB-vUswKKjlEYfgWT5aXoppZaaMI5zvdOvzyE1NsBDSahgAgQBuLSMrK8ZtGILILJn-6gGmh5dZHKbVEzDwrq_H41tkVvlfcJc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<?xml version="1.0" encoding="UTF-8"?><record_update table="scan_table_check">
2+
<scan_table_check action="INSERT_OR_UPDATE">
3+
<active>true</active>
4+
<advanced>false</advanced>
5+
<category>performance</category>
6+
<conditions table="syslog_transaction">response_time&gt;120000^sys_created_onONYesterday@javascript:gs.beginningOfYesterday()@javascript:gs.endOfYesterday()^EQ<item endquery="false" field="response_time" goto="false" newquery="false" operator="&gt;" or="false" value="120000"/>
7+
<item endquery="false" field="sys_created_on" goto="false" newquery="false" operator="ON" or="false" value="Yesterday@javascript:gs.beginningOfYesterday()@javascript:gs.endOfYesterday()"/>
8+
<item endquery="true" field="" goto="false" newquery="false" operator="=" or="false" value=""/>
9+
</conditions>
10+
<description>This check monitors and analyzes transaction logs to identify jobs and transactions that are taking longer than expected to complete. By tracking slow or stuck jobs, this check aims to uncover performance bottlenecks that may hinder the overall efficiency of the ServiceNow instance. It provides insights into long-running transactions, helping administrators diagnose and resolve performance issues affecting user experience.</description>
11+
<documentation_url/>
12+
<finding_type>scan_finding</finding_type>
13+
<name>Transaction Log Performance Check</name>
14+
<priority>2</priority>
15+
<resolution_details>If slow jobs are detected, the following steps should be taken to address the issues:&#13;
16+
&#13;
17+
Identify Long-Running Transactions:&#13;
18+
&#13;
19+
Review the transaction logs for entries with a response time exceeding predefined thresholds (e.g., 120 seconds).&#13;
20+
Analyze the Context:&#13;
21+
&#13;
22+
Examine the affected job's details, including:&#13;
23+
User ID&#13;
24+
Session ID&#13;
25+
System ID&#13;
26+
Transaction start and end times&#13;
27+
Associated business rules and background jobs&#13;
28+
Evaluate Dependencies:&#13;
29+
&#13;
30+
Investigate any dependencies or blocking issues that may be causing delays, such as resource contention, database locks, or network issues.&#13;
31+
Optimize Performance:&#13;
32+
&#13;
33+
Consider optimizing any identified business rules, scripts, or scheduled jobs that are causing delays. This may involve code optimization, reducing complexity, or adjusting scheduling.&#13;
34+
Document Findings:&#13;
35+
&#13;
36+
Keep a record of identified issues and resolutions for future reference and continuous improvement.&#13;
37+
Monitor Regularly:&#13;
38+
&#13;
39+
Set up regular monitoring to proactively catch slow jobs before they impact user experience.</resolution_details>
40+
<run_condition/>
41+
<score_max>100</score_max>
42+
<score_min>0</score_min>
43+
<score_scale>1</score_scale>
44+
<script><![CDATA[(function (engine) {
45+
46+
// Add your code here
47+
48+
})(engine);]]></script>
49+
<short_description>Tracks transaction logs to identify long-running jobs impacting performance.</short_description>
50+
<sys_class_name>scan_table_check</sys_class_name>
51+
<sys_created_by>admin</sys_created_by>
52+
<sys_created_on>2024-10-08 21:10:28</sys_created_on>
53+
<sys_id>cdd8763a8301121059f46b70deaad38b</sys_id>
54+
<sys_mod_count>0</sys_mod_count>
55+
<sys_name>Transaction Log Performance Check</sys_name>
56+
<sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package>
57+
<sys_policy/>
58+
<sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope>
59+
<sys_update_name>scan_table_check_cdd8763a8301121059f46b70deaad38b</sys_update_name>
60+
<sys_updated_by>admin</sys_updated_by>
61+
<sys_updated_on>2024-10-08 21:10:28</sys_updated_on>
62+
<table>syslog_transaction</table>
63+
<use_manifest>false</use_manifest>
64+
</scan_table_check>
65+
<sys_translated_text action="delete_multiple" query="documentkey=cdd8763a8301121059f46b70deaad38b"/>
66+
</record_update>

0 commit comments

Comments
 (0)