0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Zabbix Agent 1 (zabbix_agentd) から Agent 2 (zabbix-agent2) への移行

Posted at

✅ 1. まず「古いAgent1」を止めて、無効化します

Agent 1 (/usr/local/zabbix-agent) がまだ動いていると、
ポート10050を握ってしまうので、完全に止める&無効化します。

古いAgentの停止

sudo systemctl stop zabbix-agent

古いAgentの自動起動を無効化

sudo systemctl disable zabbix-agent

これで、再起動してもAgent1は立ち上がらなくなります。


✅ 2. 次に「新しいAgent2」を起動&有効化します

Agent2の設定ファイルを必要に応じて確認・修正

設定ファイルはここです

/etc/zabbix/zabbix_agent2.conf

ポイントだけ:

  • Server=
  • ServerActive=
  • Hostname=

が正しいかだけは念のため再確認してください


Agent2を起動

sudo systemctl start zabbix-agent2

Agent2を自動起動有効化

sudo systemctl enable zabbix-agent2

これで再起動してもAgent2が自動で上がるようになります。


✅ 3. 動作確認

Agent2のステータスをチェックします:

sudo systemctl status zabbix-agent2

active (running) になっていればOK

さらにログを見る

tail -f /var/log/zabbix/zabbix_agent2.log

→ ここで

active check configuration update from [zabbix.net:10051] is OK
sending [agent.ping] to server is successful

が出たらOK


✅ まとめ

ステップ コマンド
古いAgent1を止める sudo systemctl stop zabbix-agent
古いAgent1を無効化 sudo systemctl disable zabbix-agent
新しいAgent2を起動 sudo systemctl start zabbix-agent2
新しいAgent2を自動起動化 sudo systemctl enable zabbix-agent2
ステータス確認 sudo systemctl status zabbix-agent2
ログ確認 tail -f /var/log/zabbix/zabbix_agent2.log
0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?