ServiceNow Mid-Server Insights
Tags: serverless, cloud, vim, tutorial
Published: 2024-07-03 18:25:13

**ServiceNow Mid servers**, also known as Management Instrumentation and Discovery, play a crucial role in extending the platform's capabilities. These Java applications, installed on external servers, act as bridges, fetching data from third-party sources and delivering it back to ServiceNow. 

####What are Mid Servers and How Do They Work?
Mid servers facilitate seamless data flow between ServiceNow and external applications, services, and data sources. They initiate communication with the ServiceNow instance and leverage the External Communication Channel (ECC) Queue for message exchange. This queue acts as a communication log, allowing data insertion, updates, and queries.

####ECC Queue: The Communication Hub
Think of the ECC Queue as a central communication point. It houses two record types:

Output Probes: Instructions sent by ServiceNow to the mid-server for data retrieval.
Input Probes: Responses containing retrieved data sent by the mid-server back to ServiceNow.

####Security is Paramount
Secure connections are essential for both mid-server installation and data discovery. ServiceNow utilizes `HTTPS:443` for encrypted communication with the mid-server. Similarly, the mid server establishes secure network connections with data sources to ensure information integrity.

####Installing a Mid Server in ServiceNow
#####1.<u>Create a User and Give Them the Mid-Server Role</u>
•Go to the sys_user table on your ServiceNow instance to create a new user who will interact with the mid-server. `This user account is created to have a specific account to manage the integration, preventing it from stopping. Using other user accounts risks termination or revocation, which can cause the server to stop running.`
•Create a user and set a password.
•Once the user is created, give them the `mid-server` role.
#####2.<u>Download the Mid Server</u>
•Search for `“Mid Server”` in your application navigator and click on `“Downloads”` to download the mid server. Select the appropriate installer based on your operating system (e.g., Windows, Linux).
•Download the mid-server.
•Once the download is complete, it will be accessible under your file downloads.
•Go to your files and create a folder in your `C: drive`, which will act as your directory. In the directory, create a new folder and name it.
•Under downloads, where your mid server has been downloaded, right-click to `extract all` and select the folder you created under your directory so that it is extracted into the designated folder.
•Go to your drive/folder, which now contains mid-server contents, and click on the `agent folder`.
•Under the agent folder, click on the `config XML file` and fill in the required parameters, including your instance URL`(ex,https://dev210312.service-now.com/)` 
the username `(ex, midserver_user)` 
and password of the user you created and assigned the mid-server role to, and create a name. 
**Then save.**
#####3.<u>Validate and Update</u>
•Wait for it to populate on your instance under mid_server. Then click on it to validate and update it. Wait for it to validate and for the status to be up.
•Once the status is populated, congratulations! You have successfully installed a mid server into your ServiceNow instance.

####Upgrading the Mid Server
   ServiceNow mid servers typically perform periodic checks for upgrade availability. Upon detecting a newer version, they automatically download and install the upgrade package. Manual upgrades are also an option. 

####Troubleshooting Mid-Server Issues
#####1. <u>Restarting the Mid Server:</u> 
You can restart the mid-server through the ServiceNow UI or the Command Line Interface (CLI).
#####UI Method
•Sign in to ServiceNow.
•Go to “System Definition” and select “Mid Servers.”
•Choose the mid-server that needs restarting.
•Click the “Restart” button at the top.
•Wait a few minutes until the mid-server status changes to “Running.”
•Verify its connectivity and performance.
#####CLI Method
•Log into the machine hosting the mid-server.
•Execute commands from ServiceNow documentation.
#####2.<u>Checking Mid-Server Logs:</u> 
The mid-server logs, located in the installation directory, offer valuable insights into any issues encountered.

####ServiceNow Applications that Leverage Mid Servers:
.Discovery
.Service Mapping
.Event Management
.Cloud Management
.Integration Hub
.Orchestration

####External Applications that Utilize Mid Servers:
.Import sets
.Microsoft System Center Configuration Manager (SCCM)
.Microsoft Identity Integration Server (MIIS)
.Microsoft System Center Operations Manager (SCOM)

####Compatibility Matters
For seamless communication, ensure compatibility between the mid-server version and your ServiceNow instance version. The mid-server version should at least belong to the same major release (e.g., Tokyo) as the instance. While minor version compatibility (e.g., Tokyo Patch 1) might work, it's highly recommended to upgrade to the latest version for optimal performance and security.

####Conclusion
ServiceNow mid servers are powerful tools for extending platform functionality. By understanding their purpose, configuration process, and use cases, you can leverage them to streamline data integration and enhance your overall ServiceNow experience.

______________________________________________________
ServiceNow Product Documentation on MidServers:

What is a mid-server: https://docs.servicenow.com/bundle/washingtondc-servicenow-platform/page/product/mid-server/concept/mid-server-landing.html

Configure mid-server parameters: https://docs.servicenow.com/bundle/washingtondc-servicenow-platform/page/product/mid-server/reference/mid-server-parameters.html