Just another IT site ※IT系の記事は当方環境での実施内容となるため実施する場合は自己責任でお願いいたします。At Your Own Risk!! TURN BACK WHILE YOU CAN
PR

zabbix7.0.x→7.4へのアップグレード

※IT系の記事は当方環境での実施内容となるため実施する場合は自己責任でお願いいたします。スクリプトはAI生成のものも多いのでコピー&ペーストの際は文字コードに注意ください!
スポンサーリンク
バッチ処理の自動化スキルは市場価値が高いです。今の自分の単価を調べてみませんか?
顧客常駐はもう嫌だ!社内SEへ転職するなら【社内SE転職ナビ】
Cursor・Claude Code・Codex AIスキルを学ぶなら
環境構築不要!AIエージェント開発を非エンジニアでも即実践【AI Agent Camp】

サービスを止める

systemctl stop zabbix-server
systemctl stop zabbix-agent2

バックアップ

以下のものをバックアップしておく。

/etc/zabbix 配下のconfファイル

/etc/httpd/conf.d配下のzabbixのWeb画面を表示するためのVirtualHosts設定ファイル

/usr/share/zabbix ディレクトリ丸ごと

/usr/share/zabbix-sql-scripts ディレクトリ丸ごと

/usr/share/zabbix-* 他にもあればそのディレクトリ丸ごと

アップグレード

rpm -Uvh https://repo.zabbix.com/zabbix/7.4/release/rhel/9/noarch/zabbix-release-latest.el9.noarch.rpm
dnf clean all
dnf install zabbix-server zabbix-server-mysql zabbix-web-mysql zabbix-agent2 zabbix-agent2-plugin-*
dnf install zabbix-apache-conf
systemctl restart httpd
systemctl start zabbix-server
systemctl start zabbix-agent2

エラー対応

zabbix-agent2起動エラー

zabbix-agent2が起動していなかったので、statusを見ると、以下のようなエラーが。

zabbix-agent2.service: Main process exited, code=exited, status=1/FAILURE

詳細を確認

journalctl -xeu zabbix-agent2.service

ERROR: Cannot register plugins: failed to register metrics of plugin "NVIDIA": failed plugin registration: Failed to validate plugin: Failed to validate nvml>

なんかのプラグインで躓いている模様。

足りないパッケージがあるのかと、以下を試してみたが、すでに入っていた。

dnf install zabbix-agent2-plugin-nvidia-gpu
Last metadata expiration check: 1:26:49 ago on Fri Feb 13 20:23:19 2026.
Package zabbix-agent2-plugin-nvidia-gpu-7.4.7-release1.el9.x86_64 is already installed.

調査の結果、

以下の通りにconfの該当行をコメントすることで起動。

zabbix-agent2 7.2.1 fails to start with NVIDIA GPU plugin on Linux – ZABBIX Forums

I encountered the same issue with Zabbix Agent 2. To resolve it, you need to comment out the single line in the nvidia.conf file. This will prevent Zabbix Agent 2 from attempting to interact with the NVIDIA plugin, thereby eliminating the error.

You can do this by editing the file:

nano /etc/zabbix/zabbix_agent2.d/plugins.d/nvidia.conf
Then comment out the following line:

# Plugins.NVIDIA.System.Path=/usr/libexec/zabbix/zabbix-agent2-plugin-nvidia-gpu
Save the file and restart the Zabbix Agent 2 service. The error should no longer appear.

Web表示エラー

今までのWebURLにアクセスすると以下のようなエラーが。しかし対象方も書いてあった。

/etc/httpd/conf.d配下のzabbixのweb画面用VirtualHostの設定で今までのドキュメントルートに「/ui」を付加したものに変える必要があったとのこと。変更後は無事に表示された。

あと、アップグレードした時に/etc/httpd/conf.d配下にzabbix.confというファイルが出来ているので、不要なら退避して、もとあったファイルのドキュメントルートを書き換える。書き換えた後はhttpdを再起動。

Manual intervention is required to complete upgrade!
Starting with Zabbix 7.2 official packages, frontend PHP files were moved from /usr/share/zabbix to /usr/share/zabbix/ui.

If you are seeing this message, Zabbix configuration for Apache must be updated manually.


Back up your old configuration file:
# cp /etc/httpd/conf.d/zabbix.conf /etc/httpd/conf.d/zabbix.conf.bak

Set the correct path in the configuration file:
# sed -i 's:/usr/share/zabbix:/usr/share/zabbix/ui:g' /etc/httpd/conf.d/zabbix.conf

Restart the web server:
# systemctl restart httpd

 

 

タイトルとURLをコピーしました