zabbix-agent2 ver5.2 windows10 install

Pocket

新しくノートパソコンを買ったので入れてみる

本文は適当なので\だったり/だったりします

windows -> Any -> amd64 -> 5.2 -> No encryption -> Archive
下にZabbix agent v5.2.6とZabbix agent 2 v5.2.6があるので今回はv2にする
https://www.zabbix.com/download_agents?version=5.2&release=5.2.6&os=Windows&os_version=Any&hardware=amd64&encryption=No+encryption&packaging=Archive

わかりやすくC直下に置くことにする
c/zabbix_agent2-5.2.6-windows-amd64-static
logのフォルダも作っておく
c/zabbix(ry)/logs

nvidiaのプラグインも入れたいのでconf.dも作っておく
c/zabbix(ry)/conf.d

confの中のzabbix_agent2.confを編集する
zabbixをいじっている人なら大体どこを変えればいいのかわかると思うので詳細には書かないが

LogFile=c:\zabbix_agent2-5.2.6-windows-amd64-static\logs\zabbix_agent2.log
Server
ServerActive
Hostname
Include=c:\zabbix_agent2-5.2.6-windows-amd64-static\conf.d\*.conf

ファイアウォールの設定をする
コントロール パネル\システムとセキュリティ\Windows Defender ファイアウォール
詳細設定
受信規則
新しい規則
ポート -> TCP -> 10050 -> 接続を許可する

コマンドプロンプトを管理者で起動して
c/zabbix(ry)/binに移動

C:\zabbix_agent2-5.2.6-windows-amd64-static\bin>zabbix_agent2.exe -c ..\conf\zabbix_agent2.conf -install
zabbix_agent2 [6988]: 'Zabbix Agent 2' installed successfully

サービスを見ると追加されていることがわかる

なんか間違ったときのアンインストール方法
uninstallをつければいいだけかと思ったら怒られた

C:\zabbix_agent2-5.2.6-windows-amd64-static\bin>zabbix_agent2.exe -uninstall
zabbix_agent2 [14796]: ERROR: cannot open configuration file: open C:\zabbix_agent2-5.2.6-windows-amd64-static\bin\zabbix_agent2.win.conf: The system cannot find the file specified.

雑に空ファイルでbin\zabbix_agent2.win.confを作って実行すればよい

C:\zabbix_agent2-5.2.6-windows-amd64-static\bin>zabbix_agent2.exe -uninstall
zabbix_agent2 [15952]: 'Zabbix Agent 2' uninstalled successfully

サービスから起動する
サービスを開いてzabbix agent 2を選んで起動
何事もなく起動したらlogsの下にログがでてる
起動に失敗して停止しましたみたいなこと書いてたらconfが間違っている可能性があるので見直そう
(自分は Hostname==みたいになってた)

ノートPCを固定IPにしてzabbix server側も設定して終わり

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください