The health task runs fine but generates a long list. People are not looking in it, so there is no signaling of it.
My Support department works with Nagios.
What i would like to do is:
let the health task write its ‘errors’ and ‘warnings’ output in a file.
Transport this file to the OctopusDeploy server.
I can organize that Nagios wil read this file.
Then my Support department will also see the errors/warning of Octopus Deploy health tasks.
But the health task is not able to make an artifact. New-OctopusArtifact does not work in this context.
I’ve also thougth about making a project for doing this. But the drawback is that I have to make a trigger for each environment and keep on managing this. Doesn’t seem a good idea…
Do you have any suggestions how to solve this problem?
Thanks for getting in touch! I’m sorry for the delay in getting back to you here.
I ran this past the team and had a discussion about different possible options here. I should note that no one on the team has any Nagios experience so our advice could be a bit limited there.
One of the option we considered, if it would work with Nagios, was to try using our Subscriptions feature. You can configure a Subscriptions in Octopus and as a result of certain events, have Octopus send a JSON payload to a Webhook.
Alternatively, the API will contain the data for your deployments including the entire raw deployment logs. It would be possible to write a custom script which can collect this output and parse it for any warning/errors.
Browsing to http://OctopusServer/api/tasks/ServerTasks-48327 will return the details for the task with the ID: ServerTasks-48327
If you append /raw to the end of the call, the raw deployment log for that task will be returned. You should be able to use this to write something which will achieve what you are after.
Using a project for this as you mention, would technically work. The maintenance for the project would be the drawback here as you also mentioned.
Sorry if this response is fairly uninformative but we do not have enough Nagios experience to be able to give you a good solution.
If you have any further thoughts or questions here, please let me know. I am more than happy to help.