entity Table

The Entity table contains information about which entities appear in the topologies and when. Table gets updated with each market cycle.

entity

entity table

This table lists a bunch of columns that have different information in them. We want to say something about htem, but don't know what to say.

Column Name

Type

Nullable

Primary

Description

oid

bigint

false

true

Unique entity identifier

type

entity_type

false

false

Type of entity. This field supports both entity and group types.

name

text

false

false

Entity’s current display name. While display names may change over time, the data tracks only the most recent display name.

environment

environment_type

true

false

The kind of environment the entity exists in:

environment_type

environment_type type

  • CLOUD
  • HYBRID
  • ON_PREM
  • UNKNOWN_ENV

attrs

jsonb

true

false

Information that is specific for the given entity type.

attr_type

attr_type type

  • ENTITY_STATE
  • NUM_VCPU
  • VOLUME_ATTACHED

first_seen

timestamp with time zone

false

false

A topology timestamp for when this entity first appeared.

last_seen

timestamp with time zone

false

false

A topology timestamp for when this entity last appeared.

A value of 9999-12-31T23:59:59 means the entity still exists in latest market cycle.

Sample Use Cases

Count entities that meet specific criteria:

For a given time interval, count the number of PHYSICAL_MACHINE entities that have 4 CPUS.

select count(*)
from entity e
where e.type = 'PHYSICAL_MACHINE'
    and attrs->'num_cpus'= '4'
    and ('2021-02-01T05:00:00Z','2021-02-18T04:59:59Z') OVERLAPS (e.first_seen, e.last_seen)

Find clusters that were configured for a given time range:

Queries like this are common to generate values for grafana variables that you can run reports against.

SELECT name, oid
FROM entity
WHERE
  entity.type = 'COMPUTE_CLUSTER'
  AND ('2021-02-01T05:00:00Z','2021-02-18T04:59:59Z') OVERLAPS (first_seen, last_seen)
ORDER BY 1

For example, here’s a list of variables that a user is choosing:

Report Variables