zabbixサーバのパラメータ値が「いいえ」になっている
サーバOS:CentOS6.2
zabbix:zabbix-server-1.8.13-1.el6.JP.x86_64
mysql:mysql-server-5.1.61-1.el6_2.1.x86_64
mysql-5.1.61-1.el6_2.1.x86_64
php-mysql-5.3.3-3.el6_2.8.x86_64
なんとかインストールはできたのでが、web画面で見るとタイトルに記載があるように
「いいえ」になっており、動いていなさそうに見えます。
※インストールおよび設定は以下URLを参照しました
http://blog.torigoya.net/2012/03/10/centos6-zabbix/
zabbixサーバログをみると
[Z3001] connection to database 'zabbix' failed: [0] could not connect to server: Connection refused
Is the server running on host "localhost" and accepting
TCP/IP connections on port 5432?
9840:20120626:160452.911 Database is down. Reconnecting in 10 seconds.
上述ログが頻発しています。
selinuxやFWはすべて無効になっています。
Zabbixサーバ リスタートなどすべて問題なく、正常処理されます。
/etc/rc.d/init.d/zabbix-server status
zabbix_server (pid 9840) を実行中...
webでみるとagentも不明になっており、mapのアイコンも127.0.0.1 「44 不明」となっており
pingもできません。
どうすればいいか、ご教授いただけないでしょうか
無知ですみません。必要な情報があれば、取得しまして載せますのでいってください。
TNK - 投稿数: 4769
mysqldは起動した状態になっていますか?
mysqlコマンドでデータベースにアクセスできますか?
Kagaminuma - 投稿数: 1
気になるところが1点だけ、、、
port 5432 って PostgreSQL のポートではないでしょうか。
ご使用になっているのは mysql ですよね?mysql の通常のポートは 3306 だと思いますが。
ということで何かわかりますか?
TNK - 投稿数: 4769
MySQLを利用されるのであれば、Zabbixサーバに関して、
・zabbix-server
・zabbix-server-mysql
のパッケージをインストールすることが必要です。
yumコマンドでインストールされるときは、
# yum install zabbix-server-mysql
と明示的にMySQL用を指定するようにしてください。
victory777 - 投稿数: 3
TNKさん
Kagaminumaさん
ご返信ありがとうございます。
rpmをみたところ、以下ファイルがインストールされていました。
★zabbix-server-pgsql.x86_64 0:1.8.13-1.el6.JP
こちらをアンインストールして、
yum install zabbix-server-mysql
しましたが、事象はいまだ変わっておりません。
ただ、zabbix-serverのログの表記が以下に変わりました。
[Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'root'@'localhost' (using password: NO)
16053:20120626:191316.734 Database is down. Reconnecting in 10 seconds.
また、mysqlには登録したユーザとPWで入ることができます。
[root@localhost# mysql -u zabbix -p
Enter password: ←password を入力
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 185
Server version: 5.1.61 Source distribution
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql>
zabbix.conf.phpの設定
$DB["TYPE"] = 'MYSQL';
$DB["SERVER"] = 'localhost';
$DB["PORT"] = '0';
$DB["DATABASE"] = 'zabbix';
$DB["USER"] = 'zabbix';
$DB["PASSWORD"] = 'password';
// SCHEMA is relevant only for IBM_DB2 database
$DB["SCHEMA"] = '';
$ZBX_SERVER = 'localhost';
$ZBX_SERVER_PORT = '10051';
$ZBX_SERVER_NAME = '';
各プロセスも問題なく起動しております。
#/etc/rc.d/init.d/zabbix-server status
zabbix_server (pid 16053) を実行中...
# /etc/rc.d/init.d/mysqld status
mysqld (pid 16003) を実行中...
この情報で何かわかりますでしょうか?
TNK - 投稿数: 4769
「Access denied for user 'root'@'localhost'」ということは、
zabbix_server.confの設定が初期状態のままで設定がされていない
状態だと思われます。
zabbix_server.confのDBUserとDBPasswordの値をご確認ください。
あと、プロセスの稼動確認は、statusだけではなく、psコマンドで
各プロセスが起動しているかもご確認ください。
victory777 - 投稿数: 3
TNKさん
大変申し訳ございません。
zabbix-server-pgsql.x86_64 0:1.8.13-1.el6.JPをアンインストール際に
zabbix-serverもインストールし直したので、設定が初期値になっていました。
無事問題なく、web画面上でzabbixserverの起動状態が「はい」になりました。
大変ありがとうございました。