How can I get a device inventory that includes manageable and pingable devices out of the vertica database?
DX NetOps Performance Management any version
To get a device inventory out of the vertica database do the following
./vsql -U dradmin -w <your password> -o /tmp/AllDevices.txt -c "select d.item_id, v6_ntoa(d.primary_ip_address), d.hostname, i.item_name, p.is_pingable, m.is_manageable from dauser.device d join dauser.item i on d.item_id=i.item_id left join (select item_id, true as is_pingable from dauser.v_item_facet where facet_qname='{http://im.ca.com/inventory}AccessibleDevice') p on p.item_id=d.item_id left join(select item_id, true as is_manageable from dauser.v_item_facet where facet_qname='{http://im.ca.com/inventory}ManageableDevice') m on m.item_id=d.item_id order by item_id;"
Check the tmp directory for AllDevices.txt. This will show an inventory of your devices, including wether a device is manageable or pingable