device


Description

This table contains a list of devices discovered in a zone. It is parent table that is partitioned over zone schema. Example: Devices discovered in zone id 2 will reside in zone_0002.device table.

Columns

Column Type Size Nulls Auto Default Children Parents Comments
id serial 10 nextval('zone.device_id_seq'::regclass)
device.device_id fk_device_device R
device_attribute.device_id fk_devattr_dev C
device_certificate.device_id fk_dev_cert_dev C
device_cloudalias.device_id fk_device_cloud_alias_device C
device_match.device_id fk_device_match_device C
device_pattern.device_id fk_device_pattern_device C
device_ports.device_id fk_device_ports_device C
device_profiledata.device_id fk_dev_pd_dev C
device_response.device_id fk_device_response_device C
device_snmpalias.device_id fk_device_alias_device C
device_values.device_id fk_devval_dev C
device_wmialias.device_id fk_device_wmi_alias_device C
interface_host.device_id fk_ifha_dev C
link.device_id1 fk_link_dev1 C
link.device_id2 fk_link_dev2 C
target.device_id fk_target_device C
target_highpriority.device_id fk_target_hp_device C

Unique identifier for device record

zone_id int4 10 null
zone.id fk_device_zone R

Zone Id of a device record. Since zone.device table is a parent table for all partitioned (by zone_id) tables, same IP Address can be found while querying zone.device table for different zone_id. It maps to zone.id column

device_id int4 10 null
device.id fk_device_device R

Parent Id of a device. parent child relationship is implemented with self join to device table. If this field is not null, it indicates that this device is a child device and device.id that matches up with this zone.device.device_id is parent of this child.

iftable_id int4 10 null
iftable.id fk_device_iftable R

Id of interface table record that this device is associated to. A device having a non null value in this column is most likely a switch. iftable_id maps to zone.iftable.id

meta bool 1 false

Boolean flag that indicates whether this device was discovered and has gone through any type of consolidation. Value of false means that the device was discovered and has not gone through any consolidation. Value of true means it was consolidated as part of another discovery.

ip inet 2147483647 null

IP Address of a device. It can either be IPv4 or IPv6 IP Address. The combination of IP Address and meta flag has to be unique within a zone. That allows same IP Address to be stitched to itself. In that case, child record will have meta flag set to false, while parent record with the same IP Address will have meta flag set to true

mac macaddr 2147483647 null

MAC address of a device. MAC and meta flag has to be unique within a zone.

macvendor_id int4 10 null
macvendor.id fk_device_macvendor N

Id of macvendor of a device. It maps to system.macvendor.id

identity text 2147483647 null

A metadata that further identifies a device, especially the ones that don't have IP Address or MAC address. Possible values include (but are not limited to) collector:* or stealth:*. When a stealth device is found, notation that is being used to populate identity is stealth:::. start is either c for collector, or a device id. end is either h for a host, or a device id. For collector, notation is collector:. It is a null allowed field and for most of the devices it is set to null.

lastupdate text 2147483647 null

Indicates how or why of the last update for this. It only retains the reason for the last update that happened to this device. For example, when an interface table data is processed for the first time, IP Address for that interface data gets lastupdate set to iftable-dev, however, while processing later response, if we got another update, we will then set the lastupdate to later response code. Possible values are: ident-ins - This value will be set if device with given identity doesn't exist in db and incoming device does not have IP associated with it. This will be mostly be true for all stealth devices. As we discover them, we insert them in db with lastupdate set to ident-ins identip-ins - very similar to ident-ins, This value will be seen if device with given identity does not exist in db and incoming device contains an IP Address. This will be true for collector device identip-upd - This value will be set when a response comes in for collector or stealth and there is no device in db with that entity. However, since IP Address exists in the database, we update existing database device and set its last update to identip-upd iftable-dev - This value will be set when a device interface table data is processed, one IP Address gets picked from available interface addresses and entry is created in device table for that IP Address and lastupdate for that device gets set to iftable-dev (along with meta to be true and iftable_id to be interface table id for this interface data) intf-ip-ins - This value will be set when a device interface data is processed, entries in interface->addresses (these are interface IP Addresses) and interface->physicalAddress (these are interface macs) gets inserted as devices. Their lastupdate is set to intf-ip-ins and device_id is set to id of device for that interface table data intf-ip-upd - This value will be set when while processing device interface data, if entry exists in the database for either interface->addresses or interface->physicaladdress but assigned to different device, (device_id is not same as id of interface device that we are processing), device for this IP or MAC gets updated with lastupdate set to intf-ip-upd and device_id set to id of interface device that is getting processed if IP Address exists in the database that is also contained in interface->addresess, database entry for that IP gets updated with lastupdate set to intf-ip-upd and device_id set to id of interface device that is getting processed and null mac ip - This value will be set when a device is discovered for the first time layer2-hosts - This value will be set when all MAC addresses present in interface->switchInfo->hosts get inserted into device table with lastupdate set to layer2-hosts. are almost always devices with null ip macip-arp - This value will be set When a device interface data is processed, all ARP entries (present in device->interface->hosts (as MAC/IP pairs)), where both MAC or IP does not exist in the database, gets inserted in to device table (with few exceptions) with lastupdate set to macip-arp snm-cons-ip - This value will be set for the device if serial number is present in response attributes and IP Address does not exist in database (we don't stitch devices on serial number if they have an interface table) snm-cons-meta - This value will be set ff serial number is present in response attributes and IP Address that exists in database does not have any parent device_id associated with it, we create a parent device for the same IP and set last update to snm-cons-meta for this parent IP and set meta to true snmp-macip - There are few scenarios when a device.lastupdate gets set to snmp-macip: 1. When a device response contains ARP entries and for a given arp entry (MAC/IP pair), if device with either of the MAC address or IP Address does not exist in the database, a device entry is created with lastupdate set to snmp-macip - This is really synonymous to macip-arp and might need to change it to macip-arp 2. When a device response contains ARP entries and for a given arp entry (MAC/IP pair), if device exists in the database with IP that is in MAC/IP pair, however no device exists in the database with MAC from MAC/IP pair, and database device with IP does not have a MAC associated with it, that database device gets updated with MAC from arp entry and lastupdate is set to snmp-macip 3. When a device response contains ARP entries and for a given arp entry (MAC/IP pair), if two separate devices exist in the database (one with IP set to arp IP and another one with MAC set to arp MAC) and none of the devices in the database are consolidated (their device_id is null) and if IP device in database also has a MAC (different then the one in arp entry), update database device with arp IP and set its IP Address to null and lastupdate to snmp-macip and ident set to "unassigned:" (Side note: Device in database with arp MAC gets updated and its IP is set to arp IP) snmp-macip-assign snmp-macip-reassign

active bool 1 null

Boolean flag that is set to true each time when a device is discovered and when a response is received for that device. It is set to false when no response is received for the device for 3 consecutive rescan intervals

firstobserved timestamp 29,6 now()

Timestamp a device was first observed. Timestamp refers to timestamp/timezone of database server

lastobserved timestamp 29,6 now()

Timestamp a device was last observed. Timestamp refers to timestamp/timezone of database server. It gets updated each time a response is received for this device. Note: Each time a response is received and processed for a device, lastobserved gets current timestamp and active gets set to true.

maclastobserved timestamptz 35,6 now()

Timestamp of the last time this MAC/IP pairing was seen. This will be used to potentially time out the MAC address for this device (which might occur if the device picks up its address via DHCP and moves from one subnet to another on the network)

enterprise_id int4 10 null

Table contained 0 rows

Indexes

Constraint Name Type Sort Column(s)
pk_device Primary key Asc id
idx_device_iftable_id Performance Asc iftable_id
idx_device_macvendor_id Performance Asc macvendor_id
idx_zone_device_devid Performance Asc device_id
idx_zone_device_enterprise_id Performance Asc enterprise_id
idx_zone_device_ident Performance Asc identity
idx_zone_device_ip Performance
idx_zone_device_ipr Performance
idx_zone_device_mac Performance Asc mac
uk_device_ident Must be unique Asc/Asc meta + identity
uk_device_ipv4 Must be unique Asc/Asc meta + ip

Relationships