- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
01-30-2024 12:11 AM - edited 01-30-2024 12:12 AM
Preface
IT Operation Management is a complex product with a lot of modules, like:
- Discovery
- Service Mapping
- Event Management
- Certificate Management
- Firewall audits and reporting
- and so on...
The purpose of this article is to give a high-level understanding of the base capabilities of ITOM, using special demonstration equipment (which will be memorable 🙂).
I'm going to detail the main functionality of Discovery, Service Mapping and Event Management. It won't be on a deep technical level. I try to stay on a business level and minimize the technical aspects of the solution. Later on, I plan to write another article, where I introduce the solution from a technical point of view.
Let's jump into the details, I hope dear reader, you will enjoy it. 🙂
l chose a gripping tool for this, which is Lego. I think Lego is one of the most widely known toys. By the way, is it really a toy? 🤔
I'm going to show you that even a Lego vehicle can be controlled by ServiceNow via ITOM.
Preparation
I borrowed some Lego elements from my son and started building something - a vehicle. It's a special one that can be controlled via programming. After creating more than 10 versions, I felt that it finally looked acceptable and would be suitable for introducing ITOM.
Let me introduce my Lego transporter vehicle:
I know, this is not the most beautiful one, but it fulfils the requirements of this topic 🙂
As you can see on the image, this is a simple tracked vehicle. The hidden, but most important elements of the vehicle are the Lego Boost MoveHub and a Color & Distance sensor, I have built-in.
Lego Boost MoveHub | Lego Color & Distance Sensor |
The Lego Boost MoveHub is a key part of the Lego Boost set. It's a brick-shaped device that acts as the control center for your Lego creations. Connected to smart devices or computers via Bluetooth, it controls the models using built-in motors and sensors. With the MoveHub, people can build and program robots and vehicles for interactive play. Numerous APIs are available on the internet which can be used to control it. It was quite challenging to find the best one, but finally I found an API, which I could use to implement my own RESTFul Web Service. This can be used to send different operation requests to the MoveHub. The Web Service itself was implemented using TypeScript.
After finishing the implementation, the architecture of the solution can be seen as follows:
I have a Windows laptop with NodeJs installed. I have developed a JavaScript application which utilizes Express as a Web Application Framework. In this application, I have defined multiple endpoints (routes) to facilitate control of the MoveHub. The JavaScript application includes a special Bluetooth API, which can be used to communicate with the device. During the implementation, there were several challenges, which I'm going to detail in my following article, focusing on the solution on a deeper technical level. The HTTP endpoints give the possibility to perform the following actions with the device:
- Establish Bluetooth connection
- Drop Bluetooth connection
Once the BT connection is alive:
- Go forward / backward
- Stop
- Turn
- Color & Distance sensor data processing
At this point I was able to control the vehicle using HTTP GET methods.
A short story about the solution
The original plan was to utilize the distance sensor, but its maximum range is only 20 cm (7.8 in), which is quite limited. Additionally, the average process time in ServiceNow (on my PDI) was approximately 15-20 seconds. Given this relatively long time frame for such a short distance, I decided to use the color sensor and colored papers on the floor as markers for different use cases.
I decided not to add extra logic to the vehicle management software just a special one:
When the vehicle crosses the red line, it triggers an emergency stop action, resulting in the device coming to a halt within a few seconds.
How is it related to ServiceNow ITOM?
The Lego MoveHub will represent a transportation service. As long as the service is running, there is no need to intervene. However, unexpected events may occur that need to be handled.
MoveHub (transportation) Service
Only services that have been added to the CMDB can be managed in ServiceNow. This is the first important milestone: placing the CIs into ServiceNow's database using the built-in automated features. In the following sections, I will introduce Discovery and Service Mapping capabilities, in order to search our transportation service related CI elements, store them into CMDB and build Dependency and Service Map.
Referring back the the architecture figure, the transportation service consist of the following elements:
- Hardware (This is the computer, which hosts the Web Application)
- Software ( This is the Web Application, which manages the Lego MoveHub)
- Additional CI: Lego MoveHub vehicle (This is the Lego Device itself - MoveHub)
- Additional CI: Lego MoveHub service (This is the Transportation Service)
CMDB enhancement
There is no OOTB table in the CMDB for storing Lego elements, so at first I had to create them:
- Lego Vehicle Manager
- The purpose of this table is to store the Web Application, which can be used to control the Lego MoveHub via Bluetooth.
- This table was inherited from Application, because it will be discovered as a Web application.
- Lego MoveHub
- The purpose of this table is to store information about Lego MoveHub vehicles.
- MoveHub actually is a Hardware, so the table is inherited from the base Hardware table.
I recommend using a useful tool called CI Class Manager for creating tables. This tool consolidates all essential settings and configuration options (like column definitions, identification rules, etc.) into one user-friendly interface. It simplifies CMDB related activities and allows for efficient progress.
At this point, we have all the tables, which will be used for discovering and storing CI elements of the transportation service.
Discovery & Service Mapping
ServiceNow Discovery is a powerful feature that enables the identification and tracking of Configuration Items (CIs) within an IT infrastructure. It offers two distinct approaches: horizontal discovery, which focuses on detecting CIs based on open ports, and top-down discovery (Service Mapping), which allows for the management of Business or Application service relationships. While horizontal discovery simplifies CI detection, top-down discovery facilitates the comprehensive mapping and understanding of service dependencies.
Going back to the current topic, I had to configure Discovery in order to find the transportation service related CIs in the infrastructure.
The most effective approach to do this, is by defining specific patterns that provide step-by-step definitions on how to discover a CI and specify the necessary actions to be taken based on the findings. Although ServiceNow offers several Out-of-the-Box (OOTB) patterns. In this particular case, I had to create a custom pattern tailored to my requirements.
I have my own CIs (Lego MoveHub, Lego Vehicle Manager and my computer) and I know that this Web Application is listening on port 3000. I also know that this application is running in a NodeJS environment, which can be identified easily. So there is a process (a running application on the computer), which I have to find and execute the pattern on it.
During the discovery process there are different phases:
The Scanning phase is about port scanning. Discovery first takes the Shazzam probe, which means that checks, which ports are open on the given IP address or range. The next one is called Classification, which means that the found CI is classified by the system. In other words ServiceNow decides the target table, where the CI will be stored. Identification is the next one, when the system matches data with existing records, while Exploration, which is the last phase, relationships and dependencies are mapped.
Discovery configuration
In the current case I enhanced the discovery process with an extra logic, in order to identify the Vehicle Manager (which is a NodeJS process, listening on port 3000) and the Lego MoveHub. Since the vehicle itself is not accessible directly, I did a small trick here. I have implemented a special endpoint in the Lego Vehicle Manager Web Application, to retrieve information about the managed vehicle (such as name, MAC address, unique ID). I used this information to classify and identify the Lego MoveHub as a CI. Furthermore I had to create relationships as well between CIs. The outcome of the Horizontal Discovery can be seen on the image below.
The Lego Vehicle Manager is at the top of the Map. This CI has two important relationships:
- Lego Vehicle Manager manages the Lego MoveHub CI
- Lego Vehicle Manager runs on a Computer
The deeper level of CI information is coming from the OOTB Discovery process, which I didn't modify.
At this point we have a CI Dependency Map, but the target is to monitor the transportation service, so the next step is to create the Service Map. The Service Mapping gives the possibility to relate the discovered CIs to the corresponding service. Service Mapping CI discovery always starts from a specific entry point, which in this case is the Vehicle Manager Web application.
There are three different modes how a Service Mapping process can be executed:
Top-Down Mapping: This approach enables the management of Business or Application service relationships. By starting at the top-level service and walking down, Service Mapping creates a visual representation of the service hierarchy and the underlying components.
Machine Learning: ServiceNow leverages Machine Learning capabilities to enhance Service Mapping. Machine Learning algorithms automatically analyze and map the relationships between CIs, enabling rapid and accurate mapping of complex service landscapes.
Tag-based Mapping: Service Mapping also includes tag-based mapping, which allows administrators to define rules and criteria for mapping specific CIs based on their assigned tags. This provides a flexible and customizable way to map CIs based on relevant business criteria or attributes.
Service Mapping configuration
In my case, I had to use Tag-Based Service Mapping, since the Top-Down Mapping did not meet my expectations and Machine Learning was not supported on my PDI. To leverage Tag-Based Mapping, I made a simple enhancement in the Discovery process by assigning a specific tag to all relevant CIs. This facilitated the accurate mapping of the CIs based on the defined tags.
Finally I executed the Tag-based Mapping, and the result fit my expectations. The following image represents the mapped transportation service (in this example I just called the service as Lego MoveHub):
All pre-required activities are done, so the transportation service is ready to be monitorized. The next chapter is about to describe some use cases and demonstrates how it works.
Lego Remote management
To manage the Lego Vehicle, I utilized ServiceNow's Event Management module.
I have defined three different use cases, in order to introduce the Event Management capabilities on a high level:
- Stop the vehicle with the built-in emergency stop feature, without ServiceNow support (basic level)
- Stop the vehicle with the built-in emergency stop feature, but send critical severity SNMP trap to ServiceNow in order to create incident (intermediate level)
- The plan is to prevent the occurrence of an emergency stop, based on a major SNMP trap and remediation flow (advanced level)
Basic level
This is very simple scenario, it consists of just a few steps:
- The Lego MoveHub is started via a HTTP request
- The vehicle crosses the red line
- The vehicle stops in a couple of seconds (due to the emergency stop logic)
At the end of this use case, our transport service is stopped, but the infrastructure team is not notified, which leads to the situation that, the Customer will start complaining in a short time. We have to avoid this case.
I have prepared a short video which represents the use-case.
The following uses-cases represent a kind of ServiceNow integration, so let's indicate on the vehicle that ServiceNow is part of the service. 🙂
Intermediate level
The intermediate level of solution is a bit smarter. I have added the following enhancement to the Vehicle MoveHub Manager:
- Once the color sensor identifies that the vehicle crosses the red line, a critical SNMP trap is generated and sent to ServiceNow via the OOTB SNMP listener.
- Once the color sensor identifies that the vehicle crosses the blue line, a major SNMP trap is generated and sent to ServiceNow via the OOTB SNMP listener.
What is the SNMP trap?
SNMP trap is a mechanism in Simple Network Management Protocol (SNMP) where network devices can send notifications, called traps, to a management system. Traps are triggered by specific events or conditions, such as a network failure or performance issue. They provide real-time alerts, allowing network administrators to proactively monitor and respond to critical events within the network infrastructure.
To ensure simplicity and compatibility with ServiceNow, without any additional configuration, I utilized the standard MIB (Management Information Base) known as ENTITY-MIB to send valid SNMP traps. This approach allowed for seamless processing of the traps by ServiceNow.
The following activities are related to the intermediate-level scenario:
- Lego MoveHub is started via HTTP request
- The vehicle crosses the red line
- The vehicle stops within a couple of seconds, but during the event:
- The vehicle sends critical severity SNMP trap to ServiceNow
- Event is created in ServiceNow
- Event rule is evaluated, critical alert is generated
- Alert management rule is evaluated, new incident record is generated
The problem becomes visible on the Service Map as well:
This is better than the earlier solution, because in this case the vehicle is stopped, but the support team is notified and the Service outage can be tracked in ServiceNow. As a demonstration of the functionality please take a look at the video below:
Advanced Level
This level gives the possibility to execute an automated remediation action, once the event is detected. In this use-case, I used two markers, a red and a blue one. As we know, the red one is the critical point, once it is reached the device will be stopped. The blue line indicates a major event. The purpose of this line is to inform ServiceNow, that the red line is close, need to do something in order to avoid the service outage.
The following activities are related to the advanced-level scenario:
- In this case I used ServiceNow's Service Operation Workspace to start the vehicle
- Once the blue line is reached, a major severity SNMP trap is sent to ServiceNow
- There is an Event Rule, which is able to identify this major event, and created an Alert. Once the major alert is in place, the Service Map becomes yellow:
I have created an Event Management rule, which is triggered, when a major alert is created, which is related to the Lego MoveHub CI. This rule contains a remediation Flow with the following steps:
- Stops the vehicle
- Initiates a 90° turn movement
- Starts the vehicle for 3 seconds
- Initiates another 90° turn movement
- Starts the vehicle again
- Closes the Alert
Once the alert is closed the warning sign disappears from the Service Map
The issue was solved without any user interaction.
The following short video demonstrates how it works
Closure
I used the following elements of ServiceNow for the solution:
- CMDB (CI Class Manager)
- MID Server
- Integration HUB - REST Step
- Service Operation Workspace
- ITOM Visibility - Discovery
- Discovery Patterns (Pattern Designer)
- ITOM Visibility - Service Mapping
- Tag-Based Service Mapping
- Tag-Based Service Family
- Tag-Based Service Traversal rules
- Tag-Based Service Mapping
- ITOM Health - Event Management
- Event Rule
- Alert Management Rule
- Remediation Flow (Flow designer)
- MID SNMP Trap Listener
- Entity-MIB
Although the IT Operation Management product offers numerous functionalities, I had to establish a boundary for this article. I hope that the selected topic and related videos were interesting enough to provide a generic understanding of how ITOM functions and its purpose.
I had two objectives with this article:
- Present a high-level overview of the product.
- Demonstrate that even a Lego building can be controlled by this product.
If you have any comments, notes, or if you come across any inaccuracies, please feel free to leave a comment.
- 1,696 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello @AttilaVarga ,
Thank you so much for such an excellent article. It is by far the best one I have read in 2024. Your work has been really helpful in getting me started with Raspberry Pi5 and ServiceNow AIOps. I would appreciate it if you would consider publishing a more detailed technical article in the future, covering topics such as:
1. How you are using the Bluetooth API and IoT devices.
2. Whether it is possible to use the ServiceNow customer component (NOW CLI) instead of a NodeJS app.
3. If it is possible to call the BLE API from within ServiceNow itself.
Thank you again for your great work!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thank you, @Vivek Verma! 🙂
- Yes, I plan to write another article, which will be about deeper technical introduction of the solution.
- Regarding NOW CLI, it's an interesting topic, it haven't come to my mind yet, I'll be thinking about the possibilities.
- I'm not sure, that it is possible. I mean, calling the BLE API directly from ServiceNow. You need a "hardware" which has a BT adapter. (in my case it was a laptop, in your case it is a Raspberry Pi). You can execute a script or other type of code on this HW, which is initiated from ServiceNow, but this is not a direct API call.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
This is AWESOME!