ControlUp for VDI – Deeper integration with ServiceNow Events Management

ControlUp AutomateControlUp AutomationControlUp for VDIPowerShellScript ActionsScript Library

ServiceNow is a powerful ITSM solution with some powerful features to track incidents and events that can occur in your environment. One of the features of ServiceNow is event tracking.

But how does event tracking differ from incidents?

Incidents are usually reported by users or detected by service desk personnel through user complaints. Events, on the other hand, are often detected automatically by monitoring tools. ControlUp being a monitoring tool can be leveraged to track events in ServiceNow!

One of the most common events used for tracking in ServiceNow is the amount of free space on a disk. When a disk drops below a certain free space threshold it should create an event and when it exceeds that threshold it should resolve the event. 

ControlUp for VDI 9.0’s new metrics for Logical Disks is the perfect metric to monitor and execute this event tracking.

ServiceNow Events

Events within ServiceNow are handled by the ServiceNow Event Management feature. Once activated in your ServiceNow environment, ControlUp can leverage the ServiceNow Rest API to execute updates.

An example of a low disk space event generated and cleared by ControlUp looks like this within ServiceNow:

The events – Low Disk Space Detected:

The events — Low Disk Space Resolved:

We can see ControlUp puts in a good amount of information to track this event. The machine is identified, the specific drive letter and how much drive space was reduced or freed. The ControlUp trigger mechanism allows for the monitoring of specific drive letters, all drive letters or you can just exclude a specific drive letter.

ControlUp’s Integration:

ControlUp’s trigger system allows for execution of actions based on state-change events which is perfect for tracking things such as low disk space. Since remediation is required as well, two triggers will be used, one for reporting on the issue occurring and the second for reporting on resolution of the issue.

These triggers are available from the community trigger pack. Download them and add them to your ControlUp for VDI environment!

I’ll describe the trigger configuration and how it operates.

  1. When reviewing the trigger, the first page of the wizard is the trigger name.
  2. The Record Type for the resource will be monitoring is “Logical Disk”
  3. Trigger Conditions. This is where the magic happens. ControlUp allows a variety of options for trigger conditions that modifies the behavior of the trigger. In order to ensure that disks that have transitioned to “low disk space” a “From this state” is specified. In addition, “Include logical disks that were just discovered” is not checked. The “Include logical disks that were just discovered” option causes the trigger to be evaluated when a new machine is added to ControlUp. Since the requirements are only for systems with a change in disk space and not to monitor machines that come with low disk space already and we include a “From” condition, this option is not required. However, the “minimum duration in new state” should be adjusted to suit the environmental needs. A minimum duration of 3 seconds means that when the free space is higher than 5GB and moves into a state of lower than 5GB and is in the “To this state” for 3 consecutive seconds, the trigger will execute its actions.To modify the conditions of the trigger, click the “Filter editor…” buttons on each state and define your free space threshold.
  4. Modify the values to fit your needs
  5. Set the scope for the monitored resources:
  6. The “Follow-up actions” will run a script action “ServiceNow Events Management – Free Space”. At the bottom of this trigger is a “Wait at least…” option. This option is here to prevent ‘flapping’. That is, when changes occur consecutively to move into and then out of the monitored state, this option prevents multiple execution of the triggers until the time threshold configured has elapsed.

What does this mean? If something was reducing free disk space by a gigabyte, then releasing that space, and then consuming it again within a short period of time you could get multiple alerts. By setting this value to something like “5 minutes”, it will prevent consecutive executions for that specified duration. The recommendation here would be to match the ‘minimum duration in new state’ condition in step 3 to ensure that the condition evaluation is correctly covered.

The “resolved” trigger has the exact same parameters except the “From this state” and “To this state” are reversed:

Configuring the Script Action for your environment

The script action to configure is “ServiceNow Events Management – Free Space”

This action requires some minor modification to make it work in your environment. In the Script Actions pane, select it and click “Modify”

Select the “Arguments” header and then click the “Edit” icon next to “AuthenticationHeader”

Replace the value in “Default” with the Base64 authentication header data for your ServiceNow environment.  Powershell can generate the value for you with this code:

# Set the credentials
	$User = 'admin'
	$Pass = 'ThisIsAComplexPassword'
	$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $User, $Pass)))
	Write-Host "$base64AuthInfo"

For the ServiceNow Endpoint, update it with your ServiceNow Events Management API endpoint URL. It should look similar to this:

>https://dev142496.service-now.com/api/global/em/jsonv2

When testing the functionality, ControlUp’s Audit Log will report on the success or failure of the automation.

Example (Success) — Note the State is “Completed” and there is an “Output” from the script:

As we wrap up our exploration of ControlUp’s seamless integration with ServiceNow’s Event Management Database feature, it’s clear that this powerful collaboration is more than just a technical convergence. It represents a significant leap forward in how IT departments can streamline their operations, enhance system reliability, and elevate the end-user experience. By harnessing the combined strengths of ControlUp and ServiceNow, organizations are equipped to not only react swiftly to issues as they arise but also to anticipate and mitigate potential problems before they impact productivity.

This integration empowers IT teams with real-time insights and automated workflows, transforming the way they manage and resolve incidents. The result? A more resilient, efficient, and user-centric IT environment. As we move forward in an era where digital infrastructure is increasingly complex and critical to business success, partnerships like that of ControlUp and ServiceNow are paving the way for a new standard in IT operations and service excellence.

Trentent Tye

Trentent Tye, a Tech Person of Interest, is based out of Canada and its many, many feet of snow. FUN FACT: Trentent came to ControlUp because, as a former customer, the product impacted his life in so many positive ways—from reducing stress, time to remediation, increased job satisfaction, and more—he had to be our evangelist. Now an integral part of ControlUp’s Product Marketing Team, he educates our customers, pours his heart and soul into the product, and generally makes ControlUp a better place. Trentent recently moved to be closer to family. He does not recommend moving during a pandemic.