Table of Contents
Welcome to our SNOW INFO PAGE Section H
HealthScan - Health Scan
- Modules
???
- Takeaway The Health Scan is a free tool that provides metrics on an instance's Ease of Management, Usability, Performance, Security, and Upgradability. The Health Scan can be used to help you locate technical debt in your instance. - Video: Optimizing Your Instance with ServiceNow HealthScan - A no-charge tool that helps you better understand and improve your instances “health”. - Helps you understand where you may have technical debt. - Identifies customizations and configurations so you can go back to out-of-the-box functionality. In many cases new functionality may satisfy the original customization Use Case, making removal of the customization a good option. - For each product suite, it provides data in 5 categories, as follows:
- Ease of Management
- Usability (User Experience)
- Performance
- Security
- Upgradeability
- Step 1. The system analyzes your instance. Only takes about 10 minutes. - Step 2. Analysis of the data. A Scorecard / Dashboard is provided to help you review the results at a high level. - Detailed Configuration Review reports may then be Purchased form ServiceNow professional services to help you take action. - Includes an Automated Code Review feature. Runs daily. Sends results via email.
HI Service Portal - HI Portal - Customer Support Portal - HI
- Takeaway - HI or Hosted Instance is the customer support portal that ServiceNow offers to all customers. HI is itself implemented on the Now Platform. HI allows a customer to manage Users and Roles, along with contact information for those users. It provides a Change Calendar to show upcoming changes to a customer's instance, and allow upgrades to be scheduled. Plugins are also available via HI. There is a list of Known Errors. There is a way to open a support case. And there is a Service Catalog for change requests and enhancement requests. - Now Support (HI) - HI stands for Hosted Instance. - HI is a client company's portal to ServiceNow services. HI itself happens to run on the ServiceNow platform. - A website to allow a ServiceNow customer to manage instances and upgrades. Includes: Changes Planned on your Instances (Patches, etc.) * Community * Available outside of HI also. Knowledge Known Errors Manage User Account (Users & Roles) for the HI Portal Itself. NowSupport- Troubleshooting, Updates, Videos, etc. Open a Case Plugins * Product Documentation Schedule Upgrades Service Catalog (Change Requests & Enhancement Requests) - “Manage Accounts” allows users and roles to be managed, along with contact information. - If you can't find an answer in Documentation, you can post a question on HI to the Community, or as a last result, you can open a “Case”. - HI displays the service portal roles of the logged in user (under My Profile, at the bottom left).
Homepages - Overview Pages
- Being phased out and replaced by Dashboards. - A page that presents summary information in easy-to-read formats, via “widgets”. - A widget can get data directly from a table, or from a “Report Source” which is a Filtered data source. - The “Type” property is the overall format of the widget, for example a “speedometer” type. - Widgets may be dragged and dropped into new positions by their Titles. - Use the “Add Content” button to add a Widget to the page.
HR Service Delivery / Human Resources Service Delivery - (HRSD)(HR Integrations Application)
- See separate document “ServiceNow_Knowledge_HRSD.docx”.
Handling Tables with over a Million records, such as sysapproval_approver
- Normal scripts will timeout and terminate after 300 seconds (5 minutes). - This may only be a problem however if you run a script in the FOREGROUND. It seems like if you use the Execute Now button on the sysauto_script table, the script will run in the background, for as long as necessary, and may not degrade performance too much. - Long running scripts with no breaks can also degrade performance of the instance for you, and for others using the same table. - How to break a script up into chunks that will not degrade instance responsiveness (if necessary): - Step 1
If necessary to differentiate which records have been processed, and which have not…
Add a “Processed” (u_processed) Boolean column to the table you want to work with. - Before you save the new field, set the “Default value” to “false”. - This operation may be done very fast by the database; not sure exactly why or how. ~100 seconds for 3 Million records. - Step 2
- Generate a query that queries only those records which you have Not yet processed.
- Example:
u_processed=false - Step 3
- Declare a new event in the Event Registry against the table you are processing.
- Example event name: “Event_GGB_05_15_2022” - Step 4
- Create a “sysevent_script_action” script, such as one of the following.
- Example 1
function UpdateDatabaseInEventDrivenChunks(limit, currentNumber) {
var EVENT_NAME = 'Event_GGB_05_15_2022'; var TABLE_NAME = 'sysapproval_approver'; var QUERY = "u_processed=false"; var MAX_RECORDS = 3500000;
var gr = new GlideRecord(TABLE_NAME);
//Be sure that we don't get above the total number of records expected. if (currentNumber > MAX_RECORDS) { gs.log('UpdateDatabaseInEventDrivenChunks TERMINATED. Unexpected number of records encountered.'); return; } gr.setForceUpdate(true); //Make sure record is saved to database even if the value you are setting did not change. gr.setWorkflow(false); //Disable Business Rules on this table only, for faster processing time. Ignored in referenced tables. gr.setLimit(limit); //Only query X records at a time. gr.addQuery(QUERY); gr.query(); if (!gr.hasNext()) { gs.log('UpdateDatabaseInEventDrivenChunks completed with ' + currentNumber + ' total records processed.'); return; //No more records to process. Halt function, and loop. } while (gr.next()) { var vLongName = "Approval Record"; var vNumber = "YYYY"; if (gr.document_id && gr.document_id.number) { vNumber = gr.document_id.number; vLongName = "Approval for " + vNumber; } gr.setValue("u_longname", vLongName); gr.setValue("u_processed", true); gr.update(); currentNumber++; } //Log a progress update gs.log('Event wrapper processed ' + currentNumber + ' records so far. Triggering the next loop.'); //Trigger the event again gs.eventQueue(EVENT_NAME, gr, limit, currentNumber);
} UpdateDatabaseInEventDrivenChunks(event.parm1, event.parm2); UpdateDatabaseInEventDrivenChunks(500,0); - Example 2 function UpdateDatabaseInEventDrivenChunks(limit, currentNumber) { var EVENT_NAME = 'Event_DeleteRecordsFromTable_task_ci'; var TABLE_NAME = 'task_ci'; var QUERY = “task.numberLIKEINC^task.ref_incident.u_major_incident=false^u_added_by=system”; var MAX_RECORDS = 12000000; 12M
var gr = new GlideRecord(TABLE_NAME);
//Be sure that we don't get above the total number of records expected. if (currentNumber > MAX_RECORDS) { gs.log('UpdateDatabaseInEventDrivenChunks TERMINATED. Unexpected number of records encountered.'); return; } gr.setForceUpdate(true); //Make sure record is saved to database even if the value you are setting did not change. gr.setWorkflow(false); //Do NOT update the Updated and Updated By fields. The saves processing time. gr.setLimit(limit); //Only query X records at a time. gr.addQuery(QUERY); gr.query(); if (!gr.hasNext()) { gs.log('UpdateDatabaseInEventDrivenChunks completed with ' + currentNumber + ' total records processed.'); return; //No more records to process. Halt function, and loop. } gr.deleteMultiple(); currentNumber = Number(currentNumber) + Number(limit); //Log a progress update gs.log('Event wrapper processed ' + currentNumber + ' records so far. Triggering the next loop.'); //Trigger the event again //gs.eventQueue(EVENT_NAME, gr, limit, currentNumber); gs.eventQueue(EVENT_NAME, null, limit, currentNumber);
} UpdateDatabaseInEventDrivenChunks(event.parm1, event.parm2);
//UpdateDatabaseInEventDrivenChunks(1000, 0);
- Step 5
- Copy that entire script from step 3 into Scripts - Background, and switch out the last line with parameters such as 1000 and 0.
- Step 6
- Run a query against your table that selects all the UN-processed records.
- Make a note of the total number such as 3,456,050
- Step 7
- Execute the script from step 5.
- Step 8
- Monitor the event log.
- Example:
ExampleEventLogURL sys_created_onONToday@javascript:gs.daysAgoStart(0)@javascript:gs.daysAgoEnd(0)^nameSTARTSWITHEvent_GGB_05_15 - Note how long it take between events. - Example 1. If an event is processed every 10 seconds and handles 100 records, you are running at about 10 records a second. If you have 3M records, that will take 300,000 seconds. 300,000 / 60 / 60 = 83 hours. / 24 = 3.5 days. - Example 2. If an event is processed every 20 seconds and handles 1000 records, you are running at about 50 records a second. If you have 3M records, that will take 60,000 seconds. 60,000 / 60 / 60 = 16 hours. - Step 9
- Monitor the system log.
- Example:
ExampleSystemLogURL sys_created_onRELATIVEGT@minute@ago@15 - Step 10
- Refresh your main record query to be sure:
1) The count of records with “processed = false” is decreasing. 2) On the processed records you are seeing the expected results in the fields you are updating. - To TERMINATE the entire job, you can set the Active field to false on your event handler script.
- In order for a Catalog item to appear in the Catalog Search, you may need to be sure it has at least one Category assigned!
hiwave.servicenowservices.com
- Dashboard - Contains an “Instance Restore” capability. This is not a clone. It's an actual image. You can choose the source and the target.