Hi I want to know if my deployment target has any deployment activity. Could you provide any insight how do i find the log. basically i want to clean up the target that has no activity in last year. thank you!
Thanks for getting in touch! Great question. Each target has tabs to see the deployments and runbook runs executed on it in descending order, which looks like the below screenshot.
We also have a sample API script to find all machines that have not had a deployment to it in x number of days, which might be a good starting point to expand to clean up the machines returned.
This file has been truncated.
$ErrorActionPreference = "Stop";
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
$octopusUrl = "https://local.octopusdemos.app" ## Octopus URL to look at
$octopusApiKey = "YOUR API KEY" ## API key of user who has permissions to view all spaces, cancel tasks, and resubmit runbooks runs and deployments
$daysSinceLastDeployment = 90 ## The number of days since the last deployment to be considered unused. Any target without a deployment in the last  days is considered inactive.
$includeMachineLists = $false; ## If true, all machines in each category will get listed out to the console. If false, just a summary of information will be included.
$unsupportedCommunicationStyles = @("None")
$tentacleCommunicationStyles = @("TentaclePassive")
I hope this helps! Let me know if you have any further questions or concerns going forward.