Container Mid servers Identification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 10:36 PM
Hi All,
I am looking for a way to identify the container midservers.
While going through the docs, I did find that the parameter- mid.container.autoupgrade.enabled helps upgrade the container mid servers automatically. May I know where can I get this one ?
Also, if the mid server record has a container ID filled in, does that mean, its a containerized mid server ?
Any leads would help.
Thank You.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 02:18 AM
Hello @vishalvr ,
In ServiceNow, you can identify the container MID Servers using the MID Server table called 'cmdb_ci_container_m2m_mid_server'. This table maintains the many-to-many relationship between containers and MID Servers. Here's how you can query this table to identify the container MID Servers:
// Query the cmdb_ci_container_m2m_mid_server table to get the container MID Servers
var containerSysId = 'YOUR_CONTAINER_SYS_ID'; // Replace with the sys_id of the container you want to query
var gr = new GlideRecord('cmdb_ci_container_m2m_mid_server');
gr.addQuery('container', containerSysId);
gr.query();
// Iterate through the results to get the MID Server details
while (gr.next()) {
var midServerSysId = gr.getValue('mid_server'); // Get the sys_id of the MID Server
var midServerName = gr.getValue('mid_server.name'); // Get the name of the MID Server
gs.info('Container MID Server Sys ID: ' + midServerSysId + ', Name: ' + midServerName);
}
To identify containerized MID Servers and their corresponding container IDs, you can follow these steps:
Navigate to MID Servers:
- Go to "MID Server" > "MID Servers" in your ServiceNow instance.
View MID Server Records:
- View the MID Server records listed in the table.
- Look for the container field in the records. If a MID Server is containerized, its container field will contain the ID of the Docker container where the MID Server is running.
Check Container ID:
- If the container field is populated with a value (i.e., a container ID), it indicates that the MID Server is deployed in a containerized environment.
- You can inspect the value of the container field to determine the ID of the Docker container associated with the MID Server.
Verify Containerization:
- To verify that the MID Server is truly containerized, you may need to access the underlying infrastructure (e.g., Docker runtime environment) where the MID Server is deployed.
- You can use Docker commands or container orchestration tools (e.g., Docker CLI, Docker Swarm, Kubernetes) to inspect the container running the MID Server and confirm its containerized deployment.
To identify containerized MID Servers and their corresponding container IDs, you can follow these steps:
Navigate to MID Servers:
- Go to "MID Server" > "MID Servers" in your ServiceNow instance.
View MID Server Records:
- View the MID Server records listed in the table.
- Look for the container field in the records. If a MID Server is containerized, its container field will contain the ID of the Docker container where the MID Server is running.
Check Container ID:
- If the container field is populated with a value (i.e., a container ID), it indicates that the MID Server is deployed in a containerized environment.
- You can inspect the value of the container field to determine the ID of the Docker container associated with the MID Server.
Verify Containerization:
- To verify that the MID Server is truly containerized, you may need to access the underlying infrastructure (e.g., Docker runtime environment) where the MID Server is deployed.
- You can use Docker commands or container orchestration tools (e.g., Docker CLI, Docker Swarm, Kubernetes) to inspect the container running the MID Server and confirm its containerized deployment.
Please mark my answer Correct/Helpful, If applicable
Regards,
Sujit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2024 10:48 PM
hello @Sujit Jadhav , Thank you for the reply. I was unable to find the cmdb_ci_container_m2m_mid_server table in the instance. Does this get created when you have a container mid server in the instance ?