3

How to automatically remove an auto registered host from zabbix server when the monitored host is decommissioned? In other words: How to do auto unregistration?

ITL
  • 231
  • 3
  • 10

1 Answers1

1

Easist way I know about is use zabbix rest api and method host.delete. When your automatization tool destroy host, it will call zabbix api to delete it. But is it really that what you need? Are you definitelly sure you will don't need historical data from that host, ie. for comparation with actual behavior?

I will suggest you to use host.update and set status to 1 - unmonitored and delete host by hand later, when you will have exported data of that host.

If you are using zabbix 2.4 or 3.0, documentation says

Starting with Zabbix 2.4.0, hosts created by a network discovery rule are deleted automatically if a discovered entity is not in the rule's IP range anymore. Hosts are deleted immediately.

Ondra Sniper Flidr
  • 2,653
  • 12
  • 18