IP Address assigned to a new server, instead of creating a new server record, it renamed the old one
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2025 11:56 AM - edited 04-03-2025 02:05 PM
Hello friends,
I'm struggling with a challenge here, we have ServiceNow Discovery and SolarWinds importing server information into the CMDB.
I deactivated the IP Address from Identification Rule as it doesn't make any sense to use it, an IP may be assigned to a different server once it's released from old server.
And this is the problem I'm facing.
We had a Server Decommission request in place for ServerA, which was completed in December last year.
A new server was built and the IP Address that was originally assigned to ServerA now is assigned to ServerB.
When ServerB was imported into ServiceNow from SolarWinds, ServerA got renamed to ServerB.
This should not happen, as they are totally different devices. Also, all old tickets where ServerA was a CI, now is showing ServerB.
I manually update the record back to its original name, but once SolarWinds import runs again, it renames back.
How to deal with this situation?
EDIT: Using the Identification Simulator in ServiceNow, I noticed that the output is mentioning "sys_object_source MATCHED", see below:
How to fix this, because the source is a different server that happens to have received the same IP Address that was once assigned to that "match".
- Labels:
-
Discovery
-
Orchestration (ITOM)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2025 01:16 AM
INteresting, So I woudl start with the Importing site. How it is done? Trasnform map? ETL? I believe you can handle it there. Are those CIs imported through IRE? Than there has to be adjusted the classifier, did you checked hardware rule?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2025 05:48 AM - edited 04-08-2025 06:34 AM
Hi @Doci1
The import uses OOTB integration for SolarWinds.
And yes, it uses IRE, I've been digging this since yesterday and I think I'm getting close to a plan. Yesterday I've found the cause to be the relationship record in the sys_object_source, today I'm going to dig a little deeper in IRE settings and adjust accordingly.
Most probably, I'll have to adjust the Server Decommission workflow to mark the server as retired, clear the IP address field and clear the relationship in the sys_object_source, then, when the same IP address get assigned to a new server, a new record will be created.
EDIT: Just an update here, the best solution I could think of was updating our Server Decommission workflow to automatically clear the IP Address field on a server being decommissioned and set the Operational Status as Retired. IRE then set the Asset record Install Status as Retired as well.
In the same script in the workflow, I'm cleaning any record in the sys_object_source table for the server being decommissioned.
Listing here the two scripts being used:
Update CMDB Record:
var serverSysId = current.variables.server_name;
// Set CI as retired and clear IP
var grCI = new GlideRecord('cmdb_ci');
if (grCI.get(serverSysId)) {
grCI.setValue('operational_status', 6); // Retired
grCI.setValue('ip_address', '');
grCI.update();
}
Object Source table clean-up:
var serverSysId = current.variables.server_name;
var agg = new GlideAggregate('sys_object_source');
agg.addQuery('target_sys_id', serverSysId);
agg.addAggregate('COUNT');
agg.query();
if (agg.next()) {
var total = agg.getAggregate('COUNT');
gs.info("Found " + total + " records to delete for target_ci " + serverSysId);
}
// Delete related records in sys_object_source
var grSource = new GlideRecord('sys_object_source');
grSource.addQuery('target_sys_id', serverSysId);
grSource.query();
while (grSource.next()) {
grSource.deleteRecord();
}
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2025 09:20 AM
The plan above solved part of the problem. It is now creating a new server when the IP address is assigned to a new server.
However, the old server continues to have the name as the new server, we need to revert the old server name back to what it was before, but not sure how to proceed without having to manually edit each one of them,