Run custom powershell for all deployments

We would like to log each deployment made by octopus server into its windows event log. We do not want to force every project to package for example a Deploy.ps1. Is it possible to execute a custom powershell that is separated from all projects? I the end we like to visualize all deployments made in Kibana (using ELK stack).


Thanks for reaching out!

Out of the box its not possible to force projects to execute a specific script on every single deployment. They’ll have to willingly add it as a step in their deployment process. You could add a Step Template to your library so they only have to add it without having to configure anything.

Now, I know that trusting your project members to add that step is not the most reliable thing in the world if you’re trying to setup a monitoring strategy.

I’d personally recommend you to do one of the following:

  1. Use the reporting API endpoint to gather this data from a separate app and dump it into Kibana.

  2. Setup a scheduled stored procedure that gathers the data you are looking for from SQL. Then build a console app that calls the SP and dumps it into Kibana.

Hope that helps,


Thanks for the fast answer and suggestions of different approaches. I’ll explore the reporting API endpoint.

Regards - Anders Lundsgård, Scania