Operations | Monitoring | ITSM | DevOps | Cloud

Latest Posts

Tricks with the ServiceNow Filter Navigator

The filter navigator sites in the top left modestly heading up the table of options. Until recently I’ve been using it to just filter the list below, then, someone introduced me to a couple of other cool commands you can run. The below six functions are all run against a table, for my examples I’ve uses sys_user, but any table can be used. I was able to find the New York documentation for this functionality here if you’d like more details.

Simple DateTime checks with ServiceNow Script Includes

I can’t remember the exact reason I created this script include, but after finding it figured I’d draft up a couple quick examples as the logic could be expanded to other checks, plus, I might need it again one day so its good to have on hand. The script include detailed below creates a new class type in ServiceNow that can be used both from the client-side with Ajax, and from the server-side as a simple object call.

Getting Related Record Data on ServiceNow Forms

Sometimes a case comes up where you need to lookup further information on the active record, via is referenced records. ServiceNow makes it pretty painless with the g_form.getReference method, which uses a callback to keep from blocking the rest of your script. The example I have below, and on our GitHub repo, uses getReference in a Client Script as a way to notify uses if they are setting the owner of a CI as an inactive user.

Deleting ServiceNow Records via List Filter

When doing testing and development I frequently want to clean up all of the records between releases to give myself a fresh start. Using the list view is helpful, but can be slow if you have more than 100 or so records to delete. The below script is run via the Scripts – Background view to take the results of your list view and delete the records, logging if they are successfully deleted or not with each one.

Updating Resources.mpx at build

If you’re developing a management pack with custom UI and/or .NET modules you’ve gone through the steps of getting your DLL recognized by the engine and loaded as an Assembly or DeployedAssembly depending on the project (here’s an SCSM example). Durning an ongoing project constantly updating the resource mpx file to have the correct QualifiedName can be frustrating, time-consuming, and error-prone.

Reset Dependency Monitors

Resetting the monitor that triggered an alert is the best option in SCOM as it will allow the monitor to alert again, if needed. Working programmatically this is easy for alerts that are generated from a Unit Monitor. A Dependency Monitor can be more challenging, which is what we’ll address here. To properly reset your Dependency Monitor you will need to find the underlying Unit Monitor(s) and reset them.

Identification and Reconciliation

90 seconds with ServiceNow’s Identification and Reconciliation engine, a key tool to your complete CMDB. Configuration data is spread enterprise-wide, spanning multiple systems and sources, each with its strengths and weaknesses. To create a centralized database that can be used confidently by all teams this cornucopia of data needs to be pruned, consolidated, and maintained.