ZabbixProxy2.0.6での「failed to update local proxy configuration copy: database error」 の回避方法について
お世話になっております。
現在、Zabbix2.0.6を使用したZabbixServer * 1台とZabbix Proxy * 2台(Activeモード)新規環境の構築を行っているのですが、
サービス起動直後からZabbixProxy側にてdatabase errorが出力されている事を確認しております。
「failed to update local proxy configuration copy: database error」
回避方法について情報収集を行っているのですが、問題解決の目途がたっていない為投稿させて頂きました。
■zabbix_proxy.logに出力されているdatabase error
26824:20130724:105243.805 [Z3005] query failed: [1451] Cannot delete or update a parent row: a foreign key constraint fails (`zabbix_proxy/opgroup`, CONSTRAINT `c_opgroup_2` FOREIGN KEY (`groupid`) REFERENCES `groups` (`groupid`)) [delete from groups where groupid in (1,2,4);
delete from dchecks where dcheckid=2;
delete from drules where druleid=2;
delete from interface where interfaceid=1;
delete from hosts where (hostid between 10065 and 10079 or hostid in (10001,10047,10050,10056,10060,10081,10082,10083,10084));
]
26824:20130724:105243.805 failed to update local proxy configuration copy: database error
26824:20130724:105343.900 Received configuration data from server. Datalen 2507
26824:20130724:105343.903 [Z3005] query failed: [1451] Cannot delete or update a parent row: a foreign key constraint fails (`zabbix_proxy/opgroup`, CONSTRAINT `c_opgroup_2` FOREIGN KEY (`groupid`) REFERENCES `groups` (`groupid`)) [delete from groups where groupid in (1,2,4);
delete from dchecks where dcheckid=2;
delete from drules where druleid=2;
delete from interface where interfaceid=1;
delete from hosts where (hostid between 10065 and 10079 or hostid in (10001,10047,10050,10056,10060,10081,10082,10083,10084));
]
26824:20130724:105343.903 failed to update local proxy configuration copy: database error
Web上の情報からZabbixProxy向けデータベース初期構築にデータ投入が必要な
/usr/share/doc/zabbix-proxy-mysql-2.0.6/create/data.sql
のデータ投入を省いたところエラー出力が無くなった事を確認しております。
(schema.sqlとimages.sqlはデータ投入を実施)
data.sqlのデータ投入がない状態において自身で確認できる範囲で問題なくZabbixProxyが動作しているのですが、
この方法でのdatabase error回避とこのZabbix環境における今後の運用影響について不明な為、
大変恐縮ではございますがご存じの方ご教示頂けませんでしょうか。
よろしくお願い致します。
TNK - 投稿数: 4769
Zabbix Proxyにdata.sqlは不要です。
schema.sqlでスキーマだけ作成してください。
わかりづらいですが、マニュアルにも、
For Zabbix proxy database only schema.sql
should be imported (no images.sql nor data.sql)
との記載があります。
ご参考:
https://www.zabbix.com/documentation/2.0/manual/appendix/install/db_scripts
mnakagawa - 投稿数: 5
TNK 様
日本語ベースの情報を中心に構築手順を調査していた為見落としておりました。
ご連絡頂いておりますURL先情報にてZabbixProxy構築時におけるimages.sql及びdata.sqlが不要との記載を確認致しました。
早急にご回答頂きありがとうございました。