Inventory report


An example inventory report is as follows:

Information
Example

select * from (
select
'CPU Name' as label,
h1.CPU_NAME as value,
h2.CPU_NAME as "value_1",
TO_CHAR(h1.COLLECTION_TIME, 'YYYY-MM-DD"T"HH24:MI:SS') COLLECTION_TIME,
h1.CHANGE_SINCE_PREVIOUS
from
host_deltas h1
left join host h2
on h1.previous_collection_id = h2.collection_id
where
h1.clarity_node_object_id = __ENTITY_ID__
and
h1.clarity_manager_id = '__MGR_ID__'
and
h1.collection_time between
to_date('__COLLECTION_START_TIME__', 'YYYY-MM-DD HH24:MI:SS')
and
to_date('__COLLECTION_END_TIME__', 'YYYY-MM-DD HH24:MI:SS')
union all
select
'CPU Count (Logical)' as label,
to_char(h1.CPU_COUNT_LOGICAL) as value,
to_char(h2.CPU_COUNT_LOGICAL) as "value_1",
TO_CHAR(h1.COLLECTION_TIME, 'YYYY-MM-DD"T"HH24:MI:SS') COLLECTION_TIME,
h1.CHANGE_SINCE_PREVIOUS
from
host_deltas h1
left join host h2
on h1.previous_collection_id = h2.collection_id
where
h1.clarity_node_object_id = __ENTITY_ID__
and
h1.clarity_manager_id = '__MGR_ID__'
and
h1.collection_time between
to_date('__COLLECTION_START_TIME__', 'YYYY-MM-DD HH24:MI:SS')
and
to_date('__COLLECTION_END_TIME__', 'YYYY-MM-DD HH24:MI:SS')
union all
select
'CPU Count (Physical)' as label,
to_char(h1.CPU_COUNT_PHYSICAL) as value,
to_char(h2.CPU_COUNT_PHYSICAL) as "value_1",
TO_CHAR(h1.COLLECTION_TIME, 'YYYY-MM-DD"T"HH24:MI:SS') COLLECTION_TIME,
h1.CHANGE_SINCE_PREVIOUS
from
host_deltas h1
left join host h2
on h1.previous_collection_id = h2.collection_id
where
h1.clarity_node_object_id = __ENTITY_ID__
and
h1.clarity_manager_id = '__MGR_ID__'
and
h1.collection_time between
to_date('__COLLECTION_START_TIME__', 'YYYY-MM-DD HH24:MI:SS')
and
to_date('__COLLECTION_END_TIME__', 'YYYY-MM-DD HH24:MI:SS')
union all
select
'CPU Architecture' as label,
to_char(h1.CPU_ARCH) as value,
to_char(h2.CPU_ARCH) as "value_1",
TO_CHAR(h1.COLLECTION_TIME, 'YYYY-MM-DD"T"HH24:MI:SS') COLLECTION_TIME,
h1.CHANGE_SINCE_PREVIOUS
from
host_deltas h1
left join host h2
on h1.previous_collection_id = h2.collection_id
where
h1.clarity_node_object_id = __ENTITY_ID__
and
h1.clarity_manager_id = '__MGR_ID__'
and
h1.collection_time between
to_date('__COLLECTION_START_TIME__', 'YYYY-MM-DD HH24:MI:SS')
and
to_date('__COLLECTION_END_TIME__', 'YYYY-MM-DD HH24:MI:SS')
union all
select
'CPU Speed (Mhz)' as label,
to_char(h1.CPU_SPEED_MHZ) as value,
to_char(h2.CPU_SPEED_MHZ) as "value_1",
TO_CHAR(h1.COLLECTION_TIME, 'YYYY-MM-DD"T"HH24:MI:SS') COLLECTION_TIME,
h1.CHANGE_SINCE_PREVIOUS
from
host_deltas h1
left join host h2
on h1.previous_collection_id = h2.collection_id
where
h1.clarity_node_object_id = __ENTITY_ID__
and
h1.clarity_manager_id = '__MGR_ID__'
and
h1.collection_time between
to_date('__COLLECTION_START_TIME__', 'YYYY-MM-DD HH24:MI:SS')
and
to_date('__COLLECTION_END_TIME__', 'YYYY-MM-DD HH24:MI:SS')
union all
select
'OS Name' as label,
to_char(h1.OS_NAME) as value,
to_char(h2.OS_NAME) as "value_1",
TO_CHAR(h1.COLLECTION_TIME, 'YYYY-MM-DD"T"HH24:MI:SS') COLLECTION_TIME,
h1.CHANGE_SINCE_PREVIOUS
from
host_deltas h1
left join host h2
on h1.previous_collection_id = h2.collection_id
where
h1.clarity_node_object_id = __ENTITY_ID__
and
h1.clarity_manager_id = '__MGR_ID__'
and
h1.collection_time between
to_date('__COLLECTION_START_TIME__', 'YYYY-MM-DD HH24:MI:SS')
and
to_date('__COLLECTION_END_TIME__', 'YYYY-MM-DD HH24:MI:SS')
union all
select
'OS Type' as label,
to_char(h1.OS_TYPE) as value,
to_char(h2.OS_TYPE) as "value_1",
TO_CHAR(h1.COLLECTION_TIME, 'YYYY-MM-DD"T"HH24:MI:SS') COLLECTION_TIME,
h1.CHANGE_SINCE_PREVIOUS
from
host_deltas h1
left join host h2
on h1.previous_collection_id = h2.collection_id
where
h1.clarity_node_object_id = __ENTITY_ID__
and
h1.clarity_manager_id = '__MGR_ID__'
and
h1.collection_time between
to_date('__COLLECTION_START_TIME__', 'YYYY-MM-DD HH24:MI:SS')
and
to_date('__COLLECTION_END_TIME__', 'YYYY-MM-DD HH24:MI:SS')
union all
select
'OS Version' as label,
to_char(h1.OS_VERSION_MAJOR) as value,
to_char(h2.OS_VERSION_MAJOR) as "value_1",
TO_CHAR(h1.COLLECTION_TIME, 'YYYY-MM-DD"T"HH24:MI:SS') COLLECTION_TIME,
h1.CHANGE_SINCE_PREVIOUS
from
host_deltas h1
left join host h2
on h1.previous_collection_id = h2.collection_id
where
h1.clarity_node_object_id = __ENTITY_ID__
and
h1.clarity_manager_id = '__MGR_ID__'
and
h1.collection_time between
to_date('__COLLECTION_START_TIME__', 'YYYY-MM-DD HH24:MI:SS')
and
to_date('__COLLECTION_END_TIME__', 'YYYY-MM-DD HH24:MI:SS')
union all
select
'Kernel Version' as label,
to_char(h1.OS_VERSION_KERNEL) as value,
to_char(h2.OS_VERSION_KERNEL) as "value_1",
TO_CHAR(h1.COLLECTION_TIME, 'YYYY-MM-DD"T"HH24:MI:SS') COLLECTION_TIME,
h1.CHANGE_SINCE_PREVIOUS
from
host_deltas h1
left join host h2
on h1.previous_collection_id = h2.collection_id
where
h1.clarity_node_object_id = __ENTITY_ID__
and
h1.clarity_manager_id = '__MGR_ID__'
and
h1.collection_time between
to_date('__COLLECTION_START_TIME__', 'YYYY-MM-DD HH24:MI:SS')
and
to_date('__COLLECTION_END_TIME__', 'YYYY-MM-DD HH24:MI:SS')
union all
select
'Swap Space (MB)' as label,
to_char(h1.SWAP_TOTAL) as value,
to_char(h2.SWAP_TOTAL) as "value_1",
TO_CHAR(h1.COLLECTION_TIME, 'YYYY-MM-DD"T"HH24:MI:SS') COLLECTION_TIME,
h1.CHANGE_SINCE_PREVIOUS
from
host_deltas h1
left join host h2
on h1.previous_collection_id = h2.collection_id
where
h1.clarity_node_object_id = __ENTITY_ID__
and
h1.clarity_manager_id = '__MGR_ID__'
and
h1.collection_time between
to_date('__COLLECTION_START_TIME__', 'YYYY-MM-DD HH24:MI:SS')
and
to_date('__COLLECTION_END_TIME__', 'YYYY-MM-DD HH24:MI:SS')
union all
select
'Memory (MB)' as label,
to_char(h1.MEM_TOTAL) as value,
to_char(h2.MEM_TOTAL) as "value_1",
TO_CHAR(h1.COLLECTION_TIME, 'YYYY-MM-DD"T"HH24:MI:SS') COLLECTION_TIME,
h1.CHANGE_SINCE_PREVIOUS
from
host_deltas h1
left join host h2
on h1.previous_collection_id = h2.collection_id
where
h1.clarity_node_object_id = __ENTITY_ID__
and
h1.clarity_manager_id = '__MGR_ID__'
and
h1.collection_time between
to_date('__COLLECTION_START_TIME__', 'YYYY-MM-DD HH24:MI:SS')
and
to_date('__COLLECTION_END_TIME__', 'YYYY-MM-DD HH24:MI:SS')
)
order by
COLLECTION_TIME

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Database Automation 8.7