Discovery - Identifier not working correctly.

nR9
Giga Contributor

Hello All,

I have a query related to discovery which is as below.

  1. I selected an IP of Switch Device and run quick discovery.
  2. In the discovery log we can see that the identification is done based on name.
  3. Discovery updated the existing CI with all discovered data. Below is the screenshot of discovery log.
    find_real_file.png
  4. Here you can see Rule 1, 2, 3 are failed and Rule 4 - Match is performed using name.
  5. On investigating this further, mostly rule 3, I can see that on "cmdb_ci_hardware" table if I search using the Serial Number captured by discovery, then I am able to find 1 record. But here the same thing is failing using discovery.
  6. In other to justify my observation, I tried running Identification Simulation to check if I can find any record for same serial number using discovery and below is the input and output payload of the simulation.

    Input Payload :

    {
    "items": [
    {
    "className": "cmdb_ci_hardware",
    "lookup": [],
    "values": {
    "serial_number": "FOC2034U21R"
    }
    }
    ],
    "relations": []
    }

    Output Payload :

    {
    "items": [
    {
    "className": "cmdb_ci_ip_switch",
    "operation": "UPDATE_WITH_DOWNGRADE",
    "sysId": "e4369f1ddb6b5b40c74cf3de3b961965",
    "identifierEntrySysId": "fb27f69cc3000200d8d4bea192d3ae67",
    "identificationAttempts": [
    {
    "identifierName": "Hardware Rule",
    "attemptResult": "SKIPPED",
    "attributes": [
    "correlation_id"
    ],
    "searchOnTable": "cmdb_ci_hardware"
    },
    {
    "identifierName": "Hardware Rule",
    "attemptResult": "SKIPPED",
    "attributes": [
    "serial_number",
    "serial_number_type"
    ],
    "searchOnTable": "cmdb_serial_number"
    },
    {
    "identifierName": "Hardware Rule",
    "attemptResult": "MATCHED",
    "attributes": [
    "serial_number"
    ],
    "searchOnTable": "cmdb_ci_hardware"
    }
    ]
    }
    ],
    "relations": []
    }

  7. In above payload, we can clearly see that the match is performed using Serial Number but when doing the same using Discovery, it's failing.

Have anyone see this issue earlier. Any suggestion on this would be appreciated !!

1 ACCEPTED SOLUTION

nR9
Giga Contributor

Hello All,

Thanks for the update. Below is the update on this thread. After running discovery for multiple times what I observed is that there is some problem at device level. Identification engine is working as expected.

Trial 1 - When I run discovery in the morning, In the input payload we can see that "No Serial Number" is received. Below is the input payload sent to IRE>

Input

identification_engine : Input = {"items":[{"className":"cmdb_ci_ip_switch","values":{"short_description":"Cisco","discovery_source":"Manual Entry","name":"jNR-01","ip_address":"10.64.148.167","model_id":"924735c4dbdb970089a6b9836b96193c","sys_class_name":"cmdb_ci_ip_switch"},"lookup":[{"className":"cmdb_ci_network_adapter","values":{"netmask":"255.255.255.192","mac_address":"00:59:dc:a5:ac:5d","name":"Vlan99","ip_address":"10.64.148.167"}}],"related":[]}],"relations":[]}

Thus as Serial Number is not available, the match is done on Name. Below is the output payload.

Output

identification_engine : Output = {"items":[{"className":"cmdb_ci_ip_switch","operation":"UPDATE","sysId":"e4369f1ddb6b5b40c74cf3de3b961965","relatedSysIds":[null],"relatedItems":[{"className":"cmdb_ci_network_adapter"}],"identifierEntrySysId":"556eb250c3400200d8d4bea192d3ae92","identificationAttempts":[{"identifierName":"Hardware Rule","attemptResult":"SKIPPED","attributes":["correlation_id"],"searchOnTable":"cmdb_ci_hardware"},{"identifierName":"Hardware Rule","attemptResult":"SKIPPED","attributes":["serial_number","serial_number_type"],"searchOnTable":"cmdb_serial_number"},{"identifierName":"Hardware Rule","attemptResult":"SKIPPED","attributes":["serial_number"],"searchOnTable":"cmdb_ci_hardware"},{"identifierName":"Hardware Rule","attemptResult":"MATCHED","attributes":["name"],"searchOnTable":"cmdb_ci_hardware"}]}],"relations":[]}

Trial 2 - I tried running discovery again and this time, in the below input payload we can information related to Serial number.

Input

identification_engine : Input = {"items":[{"className":"cmdb_ci_ip_switch","values":{"short_description":"Cisco","discovery_source":"ServiceNow","serial_number":"FOC2034U21R","ip_address":"10.64.148.167","sys_class_name":"cmdb_ci_ip_switch"},"lookup":[{"className":"cmdb_serial_number","values":{"valid":"true","serial_number":"FOC2034U21R","serial_number_type":"physical"}},{"className":"cmdb_ci_network_adapter","values":{"netmask":"255.255.255.192","mac_address":"00:59:dc:a5:ac:5d","name":"Vlan99","ip_address":"10.64.148.167"}}],"related":[]}],"relations":[]}

Thus in the output payload we can see match based on Serial Number and Serial Number Type.

Output

identification_engine : Output = {"items":[{"className":"cmdb_ci_ip_switch","operation":"UPDATE","sysId":"e4369f1ddb6b5b40c74cf3de3b961965","relatedSysIds":["c7442c36dba823800d17a5ca0b9619a9","5615929fdb28e3800d17a5ca0b9619a1"],"relatedItems":[{"sysId":"c7442c36dba823800d17a5ca0b9619a9","className":"cmdb_serial_number"},{"sysId":"5615929fdb28e3800d17a5ca0b9619a1","className":"cmdb_ci_network_adapter"}],"identifierEntrySysId":"c12f9be8c3400200d8d4bea192d3aea6","identificationAttempts":[{"identifierName":"Hardware Rule","attemptResult":"SKIPPED","attributes":["correlation_id"],"searchOnTable":"cmdb_ci_hardware"},{"identifierName":"Hardware Rule","attemptResult":"MATCHED","attributes":["serial_number","serial_number_type"],"searchOnTable":"cmdb_serial_number"}]}],"relations":[]}

 

 

View solution in original post

10 REPLIES 10

vNick
ServiceNow Employee
ServiceNow Employee

If you query the cmdb_ci_hardware table using the serial number, do you get only 1 result?

nR9
Giga Contributor

Yes...when I manually query the hardware form with the serial number, I get one result.

raves12
Kilo Sage

Could you please check if the CI you queried on the hardware table is marked as duplicate? We faced this issue and was getting a multimatch on name even thoough the serial number in ECC input payload was same as that present in hardware table. We ended with deleting the all the CIs marked as duplicate and then ran discovery which eventually added the CI and identification started working properly.

Also you can modify discovery property to handle what action discovery needs to take when multimatch is found to update the oldest record.

Regards,

Ravi

ITSM/ITOM Developer and Support Analyst

nR9
Giga Contributor

Hello Ravi,

The CI that we are referring here is not marked as duplicate CI. There is only 1 record with Discovery Source as "ServiceNow"

Regards,

NR