From ccc8718f80dfd2336b90db770bffdbdb0f024e8d Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 8 Oct 2024 14:15:35 -0700 Subject: [PATCH 1/5] Add instance scan check to identify slow jobs in transaction logs. --- ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt | 2 +- ...check_cdd8763a8301121059f46b70deaad38b.xml | 66 +++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_cdd8763a8301121059f46b70deaad38b.xml diff --git a/ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt b/ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt index 8d1f820..87b782f 100644 --- a/ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt +++ b/ca8467c41b9abc10ce0f62c3b24bcbaa/checksum.txt @@ -1 +1 @@ -zKXVYjmTYdaUi17DjcgoXWtXX_r6CHPBtrSKlLiqj8Eq7u0uljxaXTgwGGgfBb0bZPqDwv3KpiZ5TBgbcB174pIXaw35AnbNe5iXTbargQQgyhTbcg6_oynarqVoW0VaTfI3XajNJZN2mF889Yz-Mcz5YRB7hK80971bWOcMDhb2QnLAXf7U98k4apomHB45owe2g5XuAoqk4zLwGwgV5sl2wcFfhClAfzuL7jhaxwvd37aEx4BCqjLpkKLRcYT5twtMoJbKAJUAz4ry9UwcbCuSK2GS03-2rsSjeNVqh3NBWNFbtBo3I22SJwVEIpg2PQCHYb5f2ztmHLWknivKaVCzE5A1n6VhVKdST14FKs-F6vtsffOko_MgzgN_by3L0mNy8PcWM9S18_B4pLn9wyREtG3i0UIBOXbpmlCWPXKCwEN7CNYYef09UcCgawGqVRPusHj0O7J7tCbs4241UyfS7om4ch3QD2qMro-TlQjdna_S-5ApnBg8rIb8HapfWJOhGril_TMmtYROGcK3suw1kZuJUEiG5NrhH8e0AM1fXAdF6Aed7z0kEH8UF308F_-SqJs5g3dlRa6uAcmZccZsGCCK4-CEWRtpct38F3ly5i1fPkrb9keSSAJ6-ojhemXulA2jWe1eu5I66bGsPbeMIW807BK4B7h2jOLnYXw \ No newline at end of file +4WWQm_IdWsTxg4URwBle2eXw7sIYuz7QcfROoa5TolyTIo-4kY4yJv9mdj4AV6pxGDqmcce-OqWYk2SRfmXXkpFqgbPUkM2EpKlebMDOKFW2seNgYWN4bkeJ9_Q6L0iEK6I6CR2QT3cGXnUdGOTJcKtOLprLFRIuuxIyn5oIOPoM6Kt1ok5D6usEHVLLSIVKw_2ipwP0u2uEaw_Gik4mla7e-vqKVXeArvB3AyUf6w1x-mRUIYg2ovffLI4ZvhIhdXuo8RFxkzAc5KvSWwMydfQ7Bqnvxc_ZPwwISUEJUshlpVExoEXU4N4ht15P5IrELTHQUYN6qlonJWzWP_kmjEZKO9zpr6yav5-Swp7Rtati5ByQx8sfdfX-MNa1Fg8eAPZUXTQiCiVMIonfzrgDZdUfRWi8kZfN0DnVxS0Drb31u3uroGnsrg4aa5QDU6upUoaX_sUGAdZfoRDxQwU42PA0qu8WKDAwaxdNgsSOy6hFn0rF3BCQkU1aI4aBsx_9P2o58Tp44Xe6IDNO_PuVGIfivJs7DVZzKbHdk4fdc8zRmv2Wl9nwbPpTEKHBDHalqO27RbZGOsB-vUswKKjlEYfgWT5aXoppZaaMI5zvdOvzyE1NsBDSahgAgQBuLSMrK8ZtGILILJn-6gGmh5dZHKbVEzDwrq_H41tkVvlfcJc \ No newline at end of file diff --git a/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_cdd8763a8301121059f46b70deaad38b.xml b/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_cdd8763a8301121059f46b70deaad38b.xml new file mode 100644 index 0000000..d32ce09 --- /dev/null +++ b/ca8467c41b9abc10ce0f62c3b24bcbaa/update/scan_table_check_cdd8763a8301121059f46b70deaad38b.xml @@ -0,0 +1,66 @@ + + + true + false + performance + response_time>120000^sys_created_onONYesterday@javascript:gs.beginningOfYesterday()@javascript:gs.endOfYesterday()^EQ + + + + 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. + + scan_finding + Transaction Log Performance Check + 2 + If slow jobs are detected, the following steps should be taken to address the issues: + +Identify Long-Running Transactions: + +Review the transaction logs for entries with a response time exceeding predefined thresholds (e.g., 120 seconds). +Analyze the Context: + +Examine the affected job's details, including: +User ID +Session ID +System ID +Transaction start and end times +Associated business rules and background jobs +Evaluate Dependencies: + +Investigate any dependencies or blocking issues that may be causing delays, such as resource contention, database locks, or network issues. +Optimize Performance: + +Consider optimizing any identified business rules, scripts, or scheduled jobs that are causing delays. This may involve code optimization, reducing complexity, or adjusting scheduling. +Document Findings: + +Keep a record of identified issues and resolutions for future reference and continuous improvement. +Monitor Regularly: + +Set up regular monitoring to proactively catch slow jobs before they impact user experience. + + 100 + 0 + 1 + + Tracks transaction logs to identify long-running jobs impacting performance. + scan_table_check + admin + 2024-10-08 21:10:28 + cdd8763a8301121059f46b70deaad38b + 0 + Transaction Log Performance Check + ca8467c41b9abc10ce0f62c3b24bcbaa + + ca8467c41b9abc10ce0f62c3b24bcbaa + scan_table_check_cdd8763a8301121059f46b70deaad38b + admin + 2024-10-08 21:10:28 + syslog_transaction
+ false +
+ +
From 1e1c3f5556653fb9b091624531b5251895950057 Mon Sep 17 00:00:00 2001 From: selvarun-umass Date: Tue, 8 Oct 2024 17:22:12 -0400 Subject: [PATCH 2/5] Instance scan check to identify slow jobs in transaction logs. --- ca8467c41b9abc10ce0f62c3b24bcbaa/README.md | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/ca8467c41b9abc10ce0f62c3b24bcbaa/README.md b/ca8467c41b9abc10ce0f62c3b24bcbaa/README.md index 455baff..8b4fb71 100644 --- a/ca8467c41b9abc10ce0f62c3b24bcbaa/README.md +++ b/ca8467c41b9abc10ce0f62c3b24bcbaa/README.md @@ -1,18 +1,4 @@ -# Generated files -This repository contains generated files and a checksum. + ### Instance scan check to identify slow jobs in transaction logs. -If you find yourself unable to import your repository due to the presence of files edited outside an instance of ServiceNow, merge commits that mix files from different revisions, or other data that does not match the checksum, you may recover using either of the following techniques: -* Remove the problem commits: - 1. Clone your repository to a personal computer with the git command line tools installed and open a git command prompt in the repository root - 2. Run `git log` and take note of the SHA1s of the problem commits - 3. Build revert commits using `git revert SHA1` repeatedly, working backward in time, for each commit that introduced changes not generated by a ServiceNow instance - 4. Run `git push` - -* Overwrite the problem code snapshot with a known good one: - 1. Clone your repository to a personal computer with the git command line tools installed and open a git command prompt in the repository root, - 2. Locate a known good code snapshot and record its SHA1. For this step, `git log` can be useful. - 2. Run `git reset --hard SHA1` to a commit that was generated by a ServiceNow instance - 3. Run `git reset HEAD{1}` - 4. Run `git add -A` - 5. Run `git commit` - 6. Run `git push` +### 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. From 3503c39a832c4979994a969865b83eeb7f9682d5 Mon Sep 17 00:00:00 2001 From: selvarun-umass Date: Wed, 9 Oct 2024 11:48:44 -0400 Subject: [PATCH 3/5] Delete ca8467c41b9abc10ce0f62c3b24bcbaa/README.md --- ca8467c41b9abc10ce0f62c3b24bcbaa/README.md | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 ca8467c41b9abc10ce0f62c3b24bcbaa/README.md diff --git a/ca8467c41b9abc10ce0f62c3b24bcbaa/README.md b/ca8467c41b9abc10ce0f62c3b24bcbaa/README.md deleted file mode 100644 index 8b4fb71..0000000 --- a/ca8467c41b9abc10ce0f62c3b24bcbaa/README.md +++ /dev/null @@ -1,4 +0,0 @@ - ### 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. From 71d0c5397da61e3deacbc0dbb40448ad107419d8 Mon Sep 17 00:00:00 2001 From: selvarun-umass Date: Wed, 9 Oct 2024 11:51:57 -0400 Subject: [PATCH 4/5] 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. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index afe7c51..c2168af 100644 --- a/README.md +++ b/README.md @@ -229,6 +229,8 @@ Restrict the number of row counts ma x to 10,20,50 instead of higher limits such Navigate to the 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. ## Category: Security ##Check Mandatory fields on incident From 09c2ac0081b7fe364289cde75826455f422f24dd Mon Sep 17 00:00:00 2001 From: selvarun-umass Date: Wed, 9 Oct 2024 11:52:46 -0400 Subject: [PATCH 5/5] Instance scan check to identify slow jobs in transaction logs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c2168af..dde7e56 100644 --- a/README.md +++ b/README.md @@ -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. 🔔🔔🔔