With the new changes to licensing, we now need to estimate how many deployment targets (machines) we anticipate adding over a given license term (one year). The best way to anticipate our machine count increase going forward is to analyze how our machine count has increased in the past. Is there a way to see when machines were added to the Octopus ecosystem? I looked in the web portal under Tasks and I looked in the database in the Machines table but I’m not seeing a MachineAddedDate anywhere.
Hey @rjhansen, thanks for reaching out!
The best way to see this data today is using the audit functionality. There’s an event category filter for
Machine created that you can use to see those explicit events. You’ll have to contend with any archived/removed data, but that’s the best place to see it in the UI currently.
Hopefully that helps, let me know if you have any other questions or need assistance!
To execute what you’re suggesting, go to Configuration > Audit. Click on the Event Categories drop down list and select Machine Created.
The filter for me only goes back 90 days. How do I go back 3 or more years? If I can’t find the data in the audit log, where can I find it in the database? We’re using Octopus 2019.6.7 LTS.
I don’t have a great test bed for 2019.6.7 handy, but you should be able to use the custom date range to get data from longer than 90 days. That is still manual though, I completely understand.
We generally don’t recommend querying the database correctly, but if you need to query against it for this data, you should be able to find it in the events table. From some limited investigation, these two conditions should get you into the right space -
WHERE Category = 'Created' AND RelatedDocumentIds LIKE '|Machines%'
Let me know if that works for the data you need!
I see. I can query the data from the Octopus portal, I just have to select the calendar dates manually by paging through the calendar. However when I click the Export button nothing happens. I even tried changing the date range to the last 7 days but the Export button still doesn’t do anything. Probably a bug in our specific version of Octopus. I’m using Chrome 100.
I am able to query the database though. I used the queries:
WHERE Category='Created' AND RelatedDocumentIDs LIKE '|Machines%'
WHERE Category='Deleted' AND RelatedDocumentIDs LIKE '|Machines%'
Note: There could be duplicate machines in the results in the case where a machine was added or removed multiple times. Those (the duplicates) should be ignored to yield a more accurate machine count.