Views

I

(

SELECT de.device_id, cast (de.ip_address as varchar(255)) AS device_ip,

tsd.target_type, de.device_id AS target_id, de.sys_name AS target_name, measure.measure_type AS collectible_type, tsd.measure_id AS collectible_id, tsd.collector_id, pdc.name AS collector_name,

(measure.name::text '.'::text) tsd.measure_index::text

AS collectible_name,

measure.detail AS collectible_detail, tsd.value, tsd.time_in_seconds, tsd.measure_index

FROM time_series_data_info tsd

JOIN device de ON tsd.target_id = de.device_id JOIN pm_data_collector pdc ON pdc.id = tsd.collector_id

JOIN measure ON measure.id = tsd.measure_id WHERE tsd.target_type = 0 OR tsd.target_type = 18

UNION ALL

SELECT de.device_id, cast (de.ip_address as varchar(255)) AS

device_ip,

tsd.target_type, ifs.interface_id AS target_id, ifs.if_name AS target_name, measure.measure_type AS collectible_type, tsd.measure_id AS collectible_id, tsd.collector_id, pm_data_collector.name AS collector_name, (measure.name::text '.'::text) tsd.measure_index::text

AS collectible_name,

measure.detail AS collectible_detail, tsd.value, tsd.time_in_seconds, tsd.measure_index

FROM time_series_data_info tsd

JOIN interface ifs ON (tsd.target_type = 1 OR tsd.target_type = 2 OR tsd.target_type =15) AND tsd.target_id = ifs.interface_id

JOIN device de ON ifs.device_id = de.device_id

JOIN pm_data_collector ON pm_data_collector.id = tsd.collector_id JOIN measure ON measure.id = tsd.measure_id)

UNION ALL

SELECT de.device_id, cast (de.ip_address as varchar(255)) AS device_ip, tsd.target_type,

sp.id AS target_id, sp.name AS target_name, measure.measure_type AS collectible_type, tsd.measure_id AS collectible_id, tsd.collector_id, pm_data_collector.name AS collector_name, (measure.name::text '.'::text) tsd.measure_index::text AS

collectible_name,

measure.detail AS collectible_detail, tsd.value, tsd.time_in_seconds, tsd.measure_index

FROM time_series_data_info tsd

JOIN switch_port sp ON tsd.target_type = 4 AND tsd.target_id = sp.id JOIN virtual_switch vs ON sp.virtual_switch_id = vs.id

JOIN device de ON vs.managed_element_id = de.managed_element_id JOIN pm_data_collector ON pm_data_collector.id = tsd.collector_id JOIN measure ON measure.id = tsd.measure_id

UNION ALL

SELECT 0 as device_id, cast (vs.ip_address as varchar(255)) AS device_ip, tsd.target_type,

sp.id AS target_id, sp.name AS target_name, measure.measure_type AS collectible_type, tsd.measure_id AS collectible_id, tsd.collector_id, pm_data_collector.name AS collector_name, (measure.name::text '.'::text) tsd.measure_index::text AS

collectible_name,

measure.detail AS collectible_detail, tsd.value,

Brocade Network Advisor IP User Manual

1657

53-1003056-01

 

Page 1709
Image 1709
Brocade Communications Systems IP250 user manual From timeseriesdatainfo tsd, Union ALL