Re: post hook into bosh delete vm command




First of all I suggest adding your Zabbix integration as a regular bosh-release instead of a package. You can use the runtime-config to add it to all deployed vms.


If I remember correctly there are two parameters passed to the drain script and based on those you should be able to find out if the vm is about to be deleted.


Kind regards



From: cf-bosh@... [mailto:cf-bosh@...] On Behalf Of estein@...
Sent: Mittwoch, 20. Juni 2018 22:18
To: cf-bosh@...
Subject: [cf-bosh] post hook into bosh delete vm command



We are interested in deploying a zabbix agent via a bosh package.  We want the package to automatically add the VM once created to the Zabbix monitor, which can be done via post-start or post-deployment I believe.  However, I can't figure out how to do the opposite: namely in the case where a VM is deleted, we need it's entry in the Zabbix monitor to be deleted.  I know the APIs that allows the deletion and we have a Java application that can do it, but is there a way to hook into that delete mechanism?  Drain/post-stop is called regardless of whether the VM is stopped or deleted, so I don't think that will work.

Hoping someone knows.  Thanks.

Join to automatically receive all group messages.