From: Benny A. <ben...@am...> - 2008-08-04 11:15:44
|
What is the best way to automatically add or remove hosts from Zabbix (from a script)? The obvious way is to just add the relevant data to the database, but there is a snag: E.g. if you try to add a new group to the groups table, you have to invent a new group id. There is a rather complicated function called get_dbid which apparently allocates a new ID, but that is hard to use if your scripts are not written in PHP. Is there a specification for that function which other scripts can follow? It seems like it would be cleaner if nodeid and item id were kept separate in the database. Then you could just add auto_increment to the groups table and be done... /Benny |