zabbix 4.0
昨日の「ラズパイ」に続いて他のサーバーもZABBIXエージェントのバージョンアップを行います。AWS上に構築したマルチクラウドのOSはUbuntuなので、以下のパッケージをダウンロードしてインストールします。設定ファイルを新しいパッケージのインストールで上書きするか保存するか聞かれるのでいずれかを選びます。新しいインストールで上書きするとあとでサーバーのアドレスや名前などを書き換える手間が増えますが新しいインストールがどんな設定ファイルを書き出すのかも興味あるのでなかなか悩ましいところではあります(笑)
sudo wget http://repo.zabbix.com/zabbix/4.0/ubuntu/pool/main/z/zabbix/zabbix-agent_4.0.9-3+bionic_amd64.deb sudo dpkg -i zabbix/zabbix-agent_4.0.9-3%2Bbionic_amd64.deb
設定ファイルの問題を解決したら、エージェントを再起動し、以下のコマンドによるZABBIXエージェントのバージョン確認を行います。
$ sudo zabbix_agentd --version zabbix_agentd (daemon) (Zabbix) 4.0.9 Revision 97a69d5d5a 5 June 2019, compilation time: Jun 7 2019 07:01:00 Copyright (C) 2019 Zabbix SIA License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it according to the license. There is NO WARRANTY, to the extent permitted by law. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/). Compiled with OpenSSL 1.1.0g 2 Nov 2017 Running with OpenSSL 1.1.1 11 Sep 2018
ちなみにサービスとしてのステータスは以下のコマンドでも確認できますので、念のため確認します。特に自動起動の設定が「enabled」になっているかの確認は、次回起動時に自動起動されないとサーバーの監視が出来ないので重要なポイントです。
$ sudo systemctl status zabbix-agent ● zabbix-agent.service - Zabbix Agent Loaded: loaded (/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: enabled) Active: active (running) since Fri 2019-06-21 14:46:54 JST; 5h 9min ago Process: 6792 ExecStop=/bin/kill -SIGTERM $MAINPID (code=exited, status=0/SUCCESS) Process: 6793 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS) Main PID: 6805 (zabbix_agentd) Tasks: 6 (limit: 1152) CGroup: /system.slice/zabbix-agent.service ├─6805 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf ├─6806 /usr/sbin/zabbix_agentd: collector [idle 1 sec] ├─6807 /usr/sbin/zabbix_agentd: listener #1 [waiting for connection] ├─6808 /usr/sbin/zabbix_agentd: listener #2 [waiting for connection] ├─6809 /usr/sbin/zabbix_agentd: listener #3 [waiting for connection] └─6810 /usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec] 6月 21 14:46:53 ip-172-26-4-14 systemd[1]: Stopped Zabbix Agent. 6月 21 14:46:53 ip-172-26-4-14 systemd[1]: Starting Zabbix Agent... 6月 21 14:46:54 ip-172-26-4-14 systemd[1]: zabbix-agent.service: Can't open PID file /run/zabbix/zabbix_agentd.pid (yet?) after 6月 21 14:46:54 ip-172-26-4-14 systemd[1]: Started Zabbix Agent.
これで全4台のバージョンアップが完了しました。構成は以下の通りです。
CentOS 6 + Zabbix Server 4.0.9 + Zabbix Agent 4.0.9 CentOS 7 + Zabbix Agent 4.0.6 Ubuntu 18.04 + Zabbix Agent 4.0.9 (EC2) Ubuntu 18.04 + Zabbix Agent 4.0.9 (Lightsail)