From: <bge...@ta...> - 2008-08-05 13:43:16
|
The zabbix schema is complex enough that I wouldn't recommend editing the database. The easiest way is to use wget or curl to post the data the right web page. You can find out what data fields are needed by looking at the url, html source and/or the php source. Baron Gerhardt bge...@ta... > 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 > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Zabbix-developers mailing list > Zab...@li... > https://lists.sourceforge.net/lists/listinfo/zabbix-developers > |