Skip to content

Instance scan check to identify slow jobs in transaction logs. #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![instance-scan-check-banner](https://github.com/Lacah/example-instancescan-checks/assets/47461634/2dc8c308-a249-41ca-89f6-26bc68749f7c)

# example-instancescan-checks

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.

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

### Instance scan check to identify slow jobs in transaction logs.
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.

### Check System Property with 'Ignore cache' = False
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.

Expand Down
18 changes: 0 additions & 18 deletions ca8467c41b9abc10ce0f62c3b24bcbaa/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
UBvFrDYpp6F473PapuKpJKvmmOUFgHEiVD5h695pnIT46m0IVAx59x1ktpNoZWBTXgM7AdJP1coxhN00Shmw9bNXm_HzYL92UD4dYmuICsujNrQr31qwCPeozLHR3BkzlPvWytL5BfPWcqGU-XSsarhtGPDjxgC2FP4hthcVI3uLDUY6HVQ8NAuLvOL3sEcCUuAMpVy6ZZjVZMVULf47a0Q8uS3aVM-Nn2UB4i5ifDA10sVReTr6N9HxC3A54aCwdMBDEY8krcVl7O_2q2QNS2UPoXc2Os0PxlJCzfBZYgvdq2Wa07TUEPv9hM_Gd-MYKC_9tJpmGuiIwkdUKo1Sdg0zrfTBq5bK03aonAUQ3YohDTcbHXyDJ0vXycn1eb4wgzzgZwlY5yILELwfm3t4_A1KYANrO3IC_ImJNe3nj8GGhuKVhdAVxfbrfjmcredgTeCIY5AyzzhR815b2zX0PPxvYYJOIVTajm6GWIH8yvUwV5q1lSrMYHw4nDIRsDUjH30qpg7EIV4ivBtO-lrCmwbXCsv6wpXJWqbtReK82OCZEWN3ovn1RYThAD55WAJkMt40_D0X7t1afak0eKUDTDK_V8lSQSeZ9d_D6cMtr2QlgZgHxX7jdmkn8KK0f9TCa07z4J5s4TJUFUxkriPZDimd3NcG3gpIJzV3AJOgqeE
WWQm_IdWsTxg4URwBle2eXw7sIYuz7QcfROoa5TolyTIo-4kY4yJv9mdj4AV6pxGDqmcce-OqWYk2SRfmXXkpFqgbPUkM2EpKlebMDOKFW2seNgYWN4bkeJ9_Q6L0iEK6I6CR2QT3cGXnUdGOTJcKtOLprLFRIuuxIyn5oIOPoM6Kt1ok5D6usEHVLLSIVKw_2ipwP0u2uEaw_Gik4mla7e-vqKVXeArvB3AyUf6w1x-mRUIYg2ovffLI4ZvhIhdXuo8RFxkzAc5KvSWwMydfQ7Bqnvxc_ZPwwISUEJUshlpVExoEXU4N4ht15P5IrELTHQUYN6qlonJWzWP_kmjEZKO9zpr6yav5-Swp7Rtati5ByQx8sfdfX-MNa1Fg8eAPZUXTQiCiVMIonfzrgDZdUfRWi8kZfN0DnVxS0Drb31u3uroGnsrg4aa5QDU6upUoaX_sUGAdZfoRDxQwU42PA0qu8WKDAwaxdNgsSOy6hFn0rF3BCQkU1aI4aBsx_9P2o58Tp44Xe6IDNO_PuVGIfivJs7DVZzKbHdk4fdc8zRmv2Wl9nwbPpTEKHBDHalqO27RbZGOsB-vUswKKjlEYfgWT5aXoppZaaMI5zvdOvzyE1NsBDSahgAgQBuLSMrK8ZtGILILJn-6gGmh5dZHKbVEzDwrq_H41tkVvlfcJc
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?><record_update table="scan_table_check">
<scan_table_check action="INSERT_OR_UPDATE">
<active>true</active>
<advanced>false</advanced>
<category>performance</category>
<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"/>
<item endquery="false" field="sys_created_on" goto="false" newquery="false" operator="ON" or="false" value="Yesterday@javascript:gs.beginningOfYesterday()@javascript:gs.endOfYesterday()"/>
<item endquery="true" field="" goto="false" newquery="false" operator="=" or="false" value=""/>
</conditions>
<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>
<documentation_url/>
<finding_type>scan_finding</finding_type>
<name>Transaction Log Performance Check</name>
<priority>2</priority>
<resolution_details>If slow jobs are detected, the following steps should be taken to address the issues:&#13;
&#13;
Identify Long-Running Transactions:&#13;
&#13;
Review the transaction logs for entries with a response time exceeding predefined thresholds (e.g., 120 seconds).&#13;
Analyze the Context:&#13;
&#13;
Examine the affected job's details, including:&#13;
User ID&#13;
Session ID&#13;
System ID&#13;
Transaction start and end times&#13;
Associated business rules and background jobs&#13;
Evaluate Dependencies:&#13;
&#13;
Investigate any dependencies or blocking issues that may be causing delays, such as resource contention, database locks, or network issues.&#13;
Optimize Performance:&#13;
&#13;
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;
Document Findings:&#13;
&#13;
Keep a record of identified issues and resolutions for future reference and continuous improvement.&#13;
Monitor Regularly:&#13;
&#13;
Set up regular monitoring to proactively catch slow jobs before they impact user experience.</resolution_details>
<run_condition/>
<score_max>100</score_max>
<score_min>0</score_min>
<score_scale>1</score_scale>
<script><![CDATA[(function (engine) {

// Add your code here

})(engine);]]></script>
<short_description>Tracks transaction logs to identify long-running jobs impacting performance.</short_description>
<sys_class_name>scan_table_check</sys_class_name>
<sys_created_by>admin</sys_created_by>
<sys_created_on>2024-10-08 21:10:28</sys_created_on>
<sys_id>cdd8763a8301121059f46b70deaad38b</sys_id>
<sys_mod_count>0</sys_mod_count>
<sys_name>Transaction Log Performance Check</sys_name>
<sys_package display_value="Example Instance Checks" source="x_appe_exa_checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_package>
<sys_policy/>
<sys_scope display_value="Example Instance Checks">ca8467c41b9abc10ce0f62c3b24bcbaa</sys_scope>
<sys_update_name>scan_table_check_cdd8763a8301121059f46b70deaad38b</sys_update_name>
<sys_updated_by>admin</sys_updated_by>
<sys_updated_on>2024-10-08 21:10:28</sys_updated_on>
<table>syslog_transaction</table>
<use_manifest>false</use_manifest>
</scan_table_check>
<sys_translated_text action="delete_multiple" query="documentkey=cdd8763a8301121059f46b70deaad38b"/>
</record_update>
Loading