How to query the Specrtrum Report database for creation details on whether a device is discovered manually or using trap based discovery

book

Article ID: 224587

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction

Need a report of all the devices in our environment with the creation details.

We need details of whether a device is discovered manually or using trap based discovery.

Environment

Release : All

 

Resolution

The event code for discovery event is the same for both trap-based discovery and regular discovery.

Only the Created By is different.

Event : A model has been created.  The model is RT01P of type Rtr_Cisco created by [email protected]
Created By : [email protected]
Event Type: 0x10201

Event : A model has been created.  The model is RT01P of type Rtr_Cisco created by [email protected]
Created By : [email protected]
Event Type: 0x10201

This is a MySQL query to search for the 0x10201 event code and filter by the "TrapDiscovery" string (you can include or remove any column):

select dm.model_name,dm.IP,HEX(dm.model_h),dm.model_key,HEX(e.type),e.time,dm.destroy_time,HEX(e.landscape_h) from devicemodel dm, event e where type=0x10201 and event_msg like '%TrapDiscovery%' and e.model_key=dm.model_key;

In the MySQL query below, I also added the event_msg column:

https://api-broadcom-ca.wolkenservicedesk.com/attachment/get_attachment_content?uniqueFileId=MjyLY9Cd/Z6UBxEiL/CtBw==