監視サーバーをAWS上で構築し、CML上のネットワーク機器/サーバーを監視します。監視ソフトウェアはZabbixを利用します。
【前回】AWS上での監視サーバー(Zabbix)構築【2.AWSのEC2構築】
【次回】AWS上での監視サーバー(Zabbix)構築【4.Zabbixのインストールと設定】
ネットワーク構成
下記のネットワーク環境を構築し、AWS上のEC2(Zabbixサーバー)から、CML上のネットワーク機器/サーバーを監視できるようにしていきます。
![ネットワーク構成](https://infrastructure-engineer.com/wp-content/uploads/2021/08/000-3-1024x239.png)
AWSのRDS構築
パラメータグループの作成
MyzSQL8.0以上では、デフォルトの設定ではZabbixが動作しないため、RDSを適用するパラメータグループを作成します。
RDSの画面から、「パラメータグループを作成」をクリックします。
![パラメータグループの作成開始](https://infrastructure-engineer.com/wp-content/uploads/2021/09/034-1024x494.jpg)
パラメータグループファミリーは、「mysql8.0」を選択します。グループ名/説明は、「rdsparametergroup」としています。
![パラメータグループの詳細設定](https://infrastructure-engineer.com/wp-content/uploads/2021/09/035-1024x494.jpg)
作成したパラメータグループをクリックします。
![作成したパラメータグループの選択](https://infrastructure-engineer.com/wp-content/uploads/2021/09/036-1024x494.jpg)
検索窓に”server”と入力し、「character_set_server」と「collation_server」が表示されることを確認し、「変更」をクリックします。
![パラメータを検索し、変更をクリック](https://infrastructure-engineer.com/wp-content/uploads/2021/09/037-1024x494.jpg)
下記の通りに値を入力し、「続行」をクリックします。
character_set_server:utf8mb4
collation_server:utf8mb4_unicode_ci
![パラメータを入力](https://infrastructure-engineer.com/wp-content/uploads/2021/09/038-1024x493.jpg)
変更内容を確認し、「変更を適用」をクリックします。
![変更を適用](https://infrastructure-engineer.com/wp-content/uploads/2021/09/039-1024x494.jpg)
パラメータグループが作成されたことを確認します。
![パラメータグループの確認](https://infrastructure-engineer.com/wp-content/uploads/2021/09/040-1024x494.jpg)
RDSの作成
RDSの画面から、「データベースの作成」をクリックします。
![RDSの作成開始](https://infrastructure-engineer.com/wp-content/uploads/2021/09/041-1024x495.jpg)
作成方法は、「標準作成」を選択します。
![作成方法は標準作成を選択](https://infrastructure-engineer.com/wp-content/uploads/2021/09/042-1024x363.jpg)
エンジンのタイプは、「MySQL」を選択します。
![エンジンのタイプは、MySQLを選択](https://infrastructure-engineer.com/wp-content/uploads/2021/09/043-1024x797.jpg)
テンプレートは、「無料利用枠」を選択します。
![テンプレートは無料利用枠を選択](https://infrastructure-engineer.com/wp-content/uploads/2021/09/044-1024x303.jpg)
インスタンス識別子は、「zabbix-database-1」としています。
マスターユーザ名とマスターパスワードを入力します。
![インスタンス識別子、マスターユーザー名、マスターパスワードを入力](https://infrastructure-engineer.com/wp-content/uploads/2021/09/045-1024x766.jpg)
無料利用枠を利用する場合は、「db.t2.micro」が選択されます。
![無料利用枠の場合、インスタンスクラスはdb.t2.microとなる](https://infrastructure-engineer.com/wp-content/uploads/2021/09/046-1024x356.jpg)
検証用のため、「ストレージの自動スケーリングを有効にする」のチェックを外します。
![ストレージの自動スケーリングは無効化](https://infrastructure-engineer.com/wp-content/uploads/2021/09/047-1024x477.jpg)
作成したVPC(aws-zabbix-test)を選択します。
![VPCを選択](https://infrastructure-engineer.com/wp-content/uploads/2021/09/048-0-1024x610.jpg)
セキュリティグループは、「既存の選択」を選択し、作成したセキュリティグループ(zabbix-sg)を選択します。
![セキュリティグループを選択](https://infrastructure-engineer.com/wp-content/uploads/2021/09/048-2-1024x321.jpg)
データベース認証は、「パスワード認証」を選択します。
![データベース認証はパスワード認証を選択](https://infrastructure-engineer.com/wp-content/uploads/2021/09/049-1-1024x374.jpg)
追加設定を展開し、DBパラメータグループで、”rdsparametergroup”を選択します。
![DBパラメータグループは、rdsparametergroupを選択](https://infrastructure-engineer.com/wp-content/uploads/2021/09/050-1024x982.jpg)
「データベースの作成」をクリックします。
![データベースの作成をクリック](https://infrastructure-engineer.com/wp-content/uploads/2021/09/051-1024x982.jpg)
下記のエラーが表示された場合は、こちらの手順を参考にサブネットを複数アベイラビリティゾーンに作成してください。
![エラー画面](https://infrastructure-engineer.com/wp-content/uploads/2021/09/053-1024x217.jpg)
ご指定になった DB インスタンス xxxxxxxx の作成リクエストは実行されませんでした。
DB Subnet Group doesn’t meet availability zone coverage requirement. Please add subnets to cover at
least 2 availability zones. Current coverage: 1 (Service: AmazonRDS; Status Code: 400; Error Code:
DBSubnetGroupDoesNotCoverEnoughAZs; Request ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx;
Proxy: null)
ステータスが、「利用可能」となることを確認します。※数分かかります。
![RDSの確認](https://infrastructure-engineer.com/wp-content/uploads/2021/09/052-1024x496.jpg)
これで、AWS上での監視サーバー(Zabbix)構築【3.AWSのRDS作成】の説明は完了です!
【前回】AWS上での監視サーバー(Zabbix)構築【2.AWSのEC2構築】
【次回】AWS上での監視サーバー(Zabbix)構築【4.Zabbixのインストールと設定】