select ds.name AS “Site Name”, dst.site_id AS “Site ID”, dst.included AS “Included”, dst.scope AS “Exclusion Level”, string_agg(dst.target::character varying, ’ | ') AS “Target”
from dim_site_target dst
JOIN dim_site ds USING(site_id)
JOIN dim_site_scan USING (site_id)
JOIN dim_scan USING (scan_id)
GROUP BY ds.name, dst.site_id, dst.included, dst.scope
Hi All, I think I am working with an outdated schema map for the insightvm console so I am going to ask for the most updated version. In the meantime I was hoping to receive some help with the above query. I would like to add the scan engine IP the site is using and the next time the site is supposed to run a scan. Thank you for your help!
As for the next scan time of a site, I’m not so certain that is available in the data model. Will let someone else chime in if they have a good way to pull that information. It is possible to pull the site scan schedule with the API but it will still require some work to find out the next time it will run: https://help.rapid7.com/insightvm/en-us/api/index.html#operation/getSiteScanSchedules