0
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ZabbixからRDSを監視する

Last updated at Posted at 2017-11-14

ZabbixからAWS RDSを監視する設定です

ODBCのインストール

RDSに接続するためODBCをインストール

$yum install unixODBC unixODBC-devel
$yum install mysql-connector-odbc

設定

上記でインストールすると/etc/odbc.iniファイルが生成されるので下記のように監視対象のRDSの情報を書きます

/etc/odbc.ini
[mydatabase]
Description = MySQL Database
Driver    = MySQL
Database   = hogehoge-db
Server    = hogehoge-db.fugafuga.ap-northeast-1.rds.amazonaws.com
Port     = 3306
User     = root
Password   = XXXXXXXXXXX

確認

以下のコマンドでRDSとの疎通確認ができます

$isql mydatabase

+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> quit

エラー

下記のエラーが出た場合は書式がおかしいので再度設定を見直しましょう

[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect

参考リンク

Zabbix Documentation 2.2

ZabbixServerからAWSのRDS(Mysql)を監視するためにODBC接続設定をCentOS7+Zabbix3.0でやってみた。

0
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?