Zabbix agent インストール [Ubuntu,Zabbix 6.0]

Ubuntu 20.04に、zabbix-agentを入れるメモです。

apt-update,apt-upgaradeを実行済みです。

ConohaVPSで作業をしてみました。

標準ではいる、zabbix-agent

# apt install zabbix-agent
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libfwupdplugin1 linux-headers-5.4.0-66 linux-headers-5.4.0-66-generic linux-image-5.4.0-66-generic linux-modules-5.4.0-66-generic linux-modules-extra-5.4.0-66-generic
Use 'apt autoremove' to remove them.
The following NEW packages will be installed:
  zabbix-agent
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 241 kB of archives.
After this operation, 860 kB of additional disk space will be used.
Get:1 http://jp.archive.ubuntu.com/ubuntu focal/universe amd64 zabbix-agent amd64 1:4.0.17+dfsg-1 [241 kB]
Fetched 241 kB in 3s (84.2 kB/s)     
Selecting previously unselected package zabbix-agent.
(Reading database ... 145273 files and directories currently installed.)
Preparing to unpack .../zabbix-agent_1%3a4.0.17+dfsg-1_amd64.deb ...
Unpacking zabbix-agent (1:4.0.17+dfsg-1) ...
Setting up zabbix-agent (1:4.0.17+dfsg-1) ...

Creating config file /etc/zabbix/zabbix_agentd.conf with new version
Created symlink /etc/systemd/system/multi-user.target.wants/zabbix-agent.service → /lib/systemd/system/zabbix-agent.service.
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for systemd (245.4-4ubuntu3.17) ...

↑インストールされました

# 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 2022-XX-XX XX:XX:XX JST; XX ago
       Docs: man:zabbix_agentd
   Main PID: 11821 (zabbix_agentd)
      Tasks: 6 (limit: 2273)
     Memory: 7.6M
     CGroup: /system.slice/zabbix-agent.service
             ├─11821 /usr/sbin/zabbix_agentd --foreground
             ├─11843 /usr/sbin/zabbix_agentd: collector [idle 1 sec]
             ├─11844 /usr/sbin/zabbix_agentd: listener #1 [waiting for connection]
             ├─11846 /usr/sbin/zabbix_agentd: listener #2 [waiting for connection]
             ├─11848 /usr/sbin/zabbix_agentd: listener #3 [waiting for connection]
             └─11849 /usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec]

systemd[1]: Started Zabbix Agent.
zabbix_agentd[11821]: Starting Zabbix Agent [118-27-68-184]. Zabbix 4.0.17 (revision a528a0a4bc).
zabbix_agentd[11821]: Press Ctrl+C to exit.

↑zabbix 4.0 なので、古いです・・
最新版の、zabbix 6.0を入れてみたいと思います。

Zabbix Agent version 6.0.x のインストール

ダウンロード

↑Zabbixのダウンロードページにアクセスします。

↑「6.0 LTS」、「Ubuntu」、「20.04 (Focal)」、「MySQL」、「Apache」と選びます。

画面下に書いてあるコマンドを実行します。

# wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-1+ubuntu20.04_all.deb
--2022-XX-XX XX:XX:XX--  https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-1+ubuntu20.04_all.deb
Resolving repo.zabbix.com (repo.zabbix.com)... 178.128.6.101, 2604:a880:2:d0::2062:d001
Connecting to repo.zabbix.com (repo.zabbix.com)|178.128.6.101|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3504 (3.4K) [application/octet-stream]
Saving to: ‘zabbix-release_6.0-1+ubuntu20.04_all.deb’

zabbix-release_6.0-1+ubuntu20.04_all.deb   100%[========================================================================================>]   3.42K  --.-KB/s    in 0s      

2022-XX-XX XX:XX:XX (252 MB/s) - ‘zabbix-release_6.0-1+ubuntu20.04_all.deb’ saved [3504/3504]
# dpkg -i zabbix-release_6.0-1+ubuntu20.04_all.deb
Selecting previously unselected package zabbix-release.
(Reading database ... 145293 files and directories currently installed.)
Preparing to unpack zabbix-release_6.0-1+ubuntu20.04_all.deb ...
Unpacking zabbix-release (1:6.0-1+ubuntu20.04) ...
Setting up zabbix-release (1:6.0-1+ubuntu20.04) ...
# apt update
Get:1 https://repo.zabbix.com/zabbix/6.0/ubuntu focal InRelease [4,958 B]
Get:2 https://repo.zabbix.com/zabbix/6.0/ubuntu focal/main Sources [1,240 B]
Get:3 https://repo.zabbix.com/zabbix/6.0/ubuntu focal/main amd64 Packages [5,158 B]
Hit:4 http://jp.archive.ubuntu.com/ubuntu focal InRelease 
Get:5 http://jp.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:6 http://jp.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Get:7 http://jp.archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:8 http://jp.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,789 kB]
Get:9 http://jp.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [921 kB]
Fetched 3,057 kB in 3s (967 kB/s)                        
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
# apt install zabbix-agent
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libfwupdplugin1 linux-headers-5.4.0-66 linux-headers-5.4.0-66-generic linux-image-5.4.0-66-generic linux-modules-5.4.0-66-generic linux-modules-extra-5.4.0-66-generic
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  libmodbus5
The following NEW packages will be installed:
  libmodbus5 zabbix-agent
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 23.5 kB/254 kB of archives.
After this operation, 1,001 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://jp.archive.ubuntu.com/ubuntu focal/universe amd64 libmodbus5 amd64 3.1.6-2 [23.5 kB]
Fetched 23.5 kB in 4s (5,686 B/s)     
Selecting previously unselected package libmodbus5:amd64.
(Reading database ... 145279 files and directories currently installed.)
Preparing to unpack .../libmodbus5_3.1.6-2_amd64.deb ...
Unpacking libmodbus5:amd64 (3.1.6-2) ...
Selecting previously unselected package zabbix-agent.
Preparing to unpack .../zabbix-agent_1%3a6.0.4-1+ubuntu20.04_amd64.deb ...
Unpacking zabbix-agent (1:6.0.4-1+ubuntu20.04) ...
Setting up libmodbus5:amd64 (3.1.6-2) ...
Setting up zabbix-agent (1:6.0.4-1+ubuntu20.04) ...
Created symlink /etc/systemd/system/multi-user.target.wants/zabbix-agent.service → /lib/systemd/system/zabbix-agent.service.
Processing triggers for systemd (245.4-4ubuntu3.17) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...

↑ZabbixAgent がインストールされました。

# 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 2022-XX-XX XX:XX:XX JST; XX ago
   Main PID: 12074 (zabbix_agentd)
      Tasks: 6 (limit: 2273)
     Memory: 8.8M
     CGroup: /system.slice/zabbix-agent.service
             ├─12074 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
             ├─12076 /usr/sbin/zabbix_agentd: collector [idle 1 sec]
             ├─12077 /usr/sbin/zabbix_agentd: listener #1 [waiting for connection]
             ├─12078 /usr/sbin/zabbix_agentd: listener #2 [waiting for connection]
             ├─12079 /usr/sbin/zabbix_agentd: listener #3 [waiting for connection]
             └─12080 /usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec]

systemd[1]: Starting Zabbix Agent...
systemd[1]: Started Zabbix Agent.

↑サービスも、起動しています。

# /usr/sbin/zabbix_agentd -V
zabbix_agentd (daemon) (Zabbix) 6.0.4
Revision 3d787ff402e 3 May 2022, compilation time: Apr  6 2022 13:22:31

Copyright (C) 2022 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.1f  31 Mar 2020
Running with OpenSSL 1.1.1f  31 Mar 2020

↑Zabbix Agent の 6.0.4が稼働中です。

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