Columns
Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||
---|---|---|---|---|---|---|---|---|---|---|
id | serial | 10 | √ | nextval('zone.target_id_seq'::regclass) |
|
|
Unique identifier for target record |
|||
zone_id | int4 | 10 | null |
|
|
Zone Id for target record. It maps to system.zone.id. |
||||
collector_id | int4 | 10 | null |
|
|
Collector Id for target record. It maps to system.collector.id |
||||
device_id | int4 | 10 | √ | null |
|
|
Device Id for target record. It maps to zone.device.id |
|||
route_id | int4 | 10 | √ | null |
|
|
Route Id for target record. It maps to zone.route.id |
|||
cidr_id | int4 | 10 | √ | null |
|
|
CIDR Id for target record. For each target CIDR entry, there will be one entry for host/path for collector that has host or path configured. It maps to zone.attribute_cidr.id |
|||
cidrval | cidr | 2147483647 | null |
|
|
Actual IP/CIDR that needs to be targeted. Having value in this record avoids extra joins with attribute_cidr, device or route tables. |
||||
scantype_id | int4 | 10 | null |
|
|
Scan Type / Discovery Type Id for target record. It maps to zone.scantype.id |
||||
details | text | 2147483647 | √ | null |
|
|
Used to store target speicfic metadata. It holds extra configuration values that are being used by collectors. |
|||
last_target | timestamptz | 35,6 | √ | null |
|
|
Timestamp when this target was picked up by a collector last. It is set to null when it is yet to be picked up. When collector asks for next set of records, records with null last_target will get picked up first. If value is non null, targets will be picked up if time elapsed since last_update is greater than rescan interval of a collector. |
|||
batchid | int4 | 10 | √ | null |
|
|
A serial number that gets inserted each time a collector is given list of targets. It contains nextval('zone.target_batch_id'). |
|||
ordid | float4 | 8,8 | √ | random() |
|
|
A Random value used to distribute targets. When collector requests next set of targets, query performs order by ordid before returning target list |
|||
expandedconfig | text | 2147483647 | √ | null |
|
|
Not being used. |
Table contained 0 rows
Indexes
Constraint Name | Type | Sort | Column(s) |
---|---|---|---|
pk_target | Primary key | Asc | id |
idx_target_cidr | Performance | ||
idx_target_cidr_id | Performance | Asc | cidr_id |
idx_target_colcidr | Performance | Asc/Asc | collector_id + cidrval |
idx_target_colcidrst | Performance | Asc/Asc/Asc | collector_id + scantype_id + cidrval |
idx_target_collt | Performance | Asc/Asc | collector_id + last_target |
idx_target_colordid | Performance | Asc/Asc | collector_id + ordid |
idx_target_colscancidr_gist | Performance | Asc/Asc | collector_id + scantype_id |
idx_target_device_id | Performance | Asc | device_id |
idx_target_route_id | Performance | Asc | route_id |
idx_target_scantype_id | Performance | Asc | scantype_id |
uk_target | Must be unique | Asc/Asc/Asc/Asc | cidrval + collector_id + zone_id + scantype_id |