Export your Calendar
Your Nexpose calendar can help you stay up to date with all your scheduled scans and reports. By using an external calendar, you can easily track your schedule events without logging in to your security console. To help you view your calendar outside of the security console, you can export it and import it into an external calendar, such as Outlook or iCal.
There are two options for exporting your Nexpose calendar:
- You can download an ICS file and import it into your external calendar.
- You can subscribe to your calendar by adding an ICS URL to your external calendar.
Downloading and importing an ICS file
An ICS file contains a static snapshot of your calendar. Any changes that you make to your Nexpose calendar will not be automatically updated in your external calendar. To keep the calendar up to date, you should subscribe to your Nexpose calendar. Otherwise, the only way to refresh your external calendar will be to import a more current snapshot.
Download and import an ICS file
- Click the calendar icon in the navigation bar to view the monthly calendar of scheduled scans and reports.
- Click Export.
- In the Calendar Export dialog, select Download ICS file.
- Click Download.
- Save the ICS file to your computer.
- In your external calendar, import the ICS file.
For more information on importing ICS files, please check the documentation that is available for your external calendar.
- For Outlook, you can visit https://support.office.com/en-us/article/Import-iCal-or-Address-Book-items-into-Outlook-2a637ac6-f3b5-411d-8a73-016bd90c1094.
- For iCal, you can visit https://support.apple.com/kb/PH11524?locale=en_US.
Subscribing to a calendar
A subscription enables you to share the details of your Nexpose calendar with an external calendar, such as Outlook or iCal. Any changes that are made to the Nexpose calendar will automatically appear on your external calendar.
Subscription security
In order to subscribe to your Nexpose calendar, you'll need to generate an ICS URL and add it to your external calendar. The ICS URL contains the details that are required for your Nexpose calendar to be viewed in an external calendar. Anyone who has access to the ICS URL will be able to access your scan schedule details, such as your scan times and site names.
To help prevent unauthorized access to your calendar's details, the generated URL will contain a unique sequence of numbers and letters that will make it difficult for it to be bruteforced. These security measures will help protect your scan schedule details from being gained by or used for malicious purposes.
Subscribe to a calendar
- Click the calendar icon in the navigation bar to view the monthly calendar of scheduled scans and reports.
- Click the Export button.
- In the Calendar Export dialog, select Subscribe to your calendar.
- Click Generate ICS URL.
Security alert: Anyone with the ICS URL can view scan details
By generating this URL, you agree that your scan details are available and accessible to anyone who has access to the URL. Because of this, it is critical that you only share the URL with trusted individuals.
- When the ICS URL displays, copy it. You'll need it for your external calendar.
- In your external calendar, add the ICS URL.
For more information on adding an ICS URL, please check the documentation that is available for your external calendar.
- For Outlook, you can visit http://windows.microsoft.com/en-us/windows/outlook/calendar-import-vs-subscribe.
- For iCal, you can visit https://support.apple.com/en-us/HT201747.
Cancel a subscription
To disable the ICS URL, you can cancel the subscription. Nexpose will no longer update the events in your external calendar.
- Click the calendar icon on the navigation bar to view the monthly calendar of scheduled scans and reports.
- Click Export.
- In the Calendar Export dialog, select Subscribe to your calendar.
- Click Cancel Subscription.
Enabling universal compatibility for external calendars
Nexpose outputs ICS files using Coordinated Universal (UTC) time to support universal compatibility. After you import an ICS file or subscribe to an ICS URL, you will need to disable daylight savings to ensure that your external calendar accurately matches your Nexpose calendar.
To learn more about how you can modify your calendar's timezones, you can read the following resources:
- For Outlook, visit https://support.office.com/en-us/article/Add-remove-or-change-time-zones-8dc68954-a111-43c3-b51d-f5ccfddc08d6#bm3
- For iCal, visit https://support.apple.com/kb/PH2677
Export scan schedules
You can export your scan schedules at the site level for a view of your site calendar and any potential scheduled scans that may impact performance.
Depending on the schedule data you want, you can use the Command Console for all sites and the API for more extensive results.
Export all schedules for all sites using the Command Console
Access the Command Console from the /admin/global/diag_console.html Run dialogue.
In the Command Console, enter
show schedule
.
Refine your export using the API
1$Rapid7_User = Get-Credential2$Rapid7_Headers = @34{Authorization = "Basic $([System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes("$($Rapid7_User.UserName):$($Rapid7_User.GetNetworkCredential().password)")))"}5$Rapid7_BaseUrl = 'https://<Rapid7 Host>:3780/api/3'67$Rapid7_Sites = (Invoke-RestMethod -Uri "$Rapid7_BaseUrl/sites?size=500" -Headers $Rapid7_Headers).resources8$Rapid7_Sites_Info = @()9foreach($Rapid7_Site in $Rapid7_Sites) {10$Rapid7_Site_Schedules = (Invoke-RestMethod -Uri "$Rapid7_BaseUrl/sites/$($Rapid7_Site.id)/scan_schedules" -Headers $Rapid7_Headers).resources | select id,scanName,enabled,scanTemplateId,repeat11$Rapid7_Site_Tags = (Invoke-RestMethod -Uri "$Rapid7_BaseUrl/sites/$($Rapid7_Site.id)/tags" -Headers $Rapid7_Headers).resources | select id,name,source,type12#$Rapid7_Site_Users = (Invoke-RestMethod -Uri "$Rapid7_BaseUrl/sites/$($Rapid7_Site.id)/users" -Headers $Rapid7_Headers).resources | select id,enabled,login13$Rapid7_Site_Assets = (Invoke-RestMethod -Uri "$Rapid7_BaseUrl/sites/$($Rapid7_Site.id)/assets" -Headers $Rapid7_Headers).resources | select id,ip,hostname,os14$Rapid7_Site_IncludedTargets = (Invoke-RestMethod -Uri "$Rapid7_BaseUrl/sites/$($Rapid7_Site.id)/included_targets" -Headers $Rapid7_Headers).resources15$Rapid7_Site_ExcludedTargets = (Invoke-RestMethod -Uri "$Rapid7_BaseUrl/sites/$($Rapid7_Site.id)/excluded_targets" -Headers $Rapid7_Headers).resources16$Rapid7_Site_IncludedAssetGroups = (Invoke-RestMethod -Uri "$Rapid7_BaseUrl/sites/$($Rapid7_Site.id)/included_asset_groups" -Headers $Rapid7_Headers).resources | select id,name,type,searchCriteria17$Rapid7_Site_ExcludedAssetGroups = (Invoke-RestMethod -Uri "$Rapid7_BaseUrl/sites/$($Rapid7_Site.id)/excluded_asset_groups" -Headers $Rapid7_Headers).resources | select id,name,type,searchCriteria1819$Rapid7_Sites_Info += [pscustomobject]@2021{ ID = $Rapid7_Site.id Name = $Rapid7_Site.name ScanTemplate = $Rapid7_Site.scanTemplate Type = $Rapid7_Site.type Schedules = $Rapid7_Site_Schedules Tags = $Rapid7_Site_Tags #Users = $Rapid7_Site_Users Assets = $Rapid7_Site_Assets IncludedTargets = $Rapid7_Site_IncludedTargets ExcludedTargets = $Rapid7_Site_ExcludedTargets IncludedAssetGroups = $Rapid7_Site_IncludedAssetGroups ExcludedAssetGroups = $Rapid7_Site_ExcludedAssetGroups }22}2324$Rapid7_Sites_Info | select ID,Name,ScanTemplate,Type,@{name=’Schedules’; expression={if($_.Schedules -eq $null)2526{0} elseif ($.Schedules.GetType().Name -eq 'PSCustomObject') {1} else {$.Schedules.count}}},@{name=’Tags’; expression={if($_.Tags -eq $null) {0}27elseif ($_.Tags.GetType().Name -eq 'PSCustomObject')2829{1} else {$.Tags.count}}},@{name=’Assets’; expression={if($.Assets -eq $null) {0} elseif ($_.Assets.GetType().Name -eq 'PSCustomObject') {1}30else {$.Assets.count}}},@{name=’IncludedTargets’; expression={if($.IncludedTargets -eq $null)3132{0} elseif ($.IncludedTargets.GetType().Name -eq 'PSCustomObject') {1} else {$.IncludedTargets.count}}},@{name=’ExcludedTargets’; expression={if($_.ExcludedTargets -eq $null) {0}33elseif ($_.ExcludedTargets.GetType().Name -eq 'PSCustomObject')3435{1} else {$.ExcludedTargets.count}}},@{name=’IncludedAssetGroups’; expression={if($.IncludedAssetGroups -eq $null) {0} elseif ($_.IncludedAssetGroups.GetType().Name -eq 'PSCustomObject') {1}36else {$.IncludedAssetGroups.count}}},@{name=’ExcludedAssetGroups’; expression={if($.ExcludedAssetGroups -eq $null)3738{0}39elseif ($_.ExcludedAssetGroups.GetType().Name -eq 'PSCustomObject')4041{1}42else {$_.ExcludedAssetGroups.count}}} | Export-Csv -Path .\Downloads\Rapid7_Sites.csv -NoTypeInformation