1
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?

More than 3 years have passed since last update.

PowerVS の Linux (CentOS) にSysdig Agent が導入できるかどうかを確認

Last updated at Posted at 2021-07-28

PowerVS (Power Systems Virtual Server) の監視は IBM Cloud Monitoring with Sysdig で対応できるのだろうかという確認で、PowerVS の Linux(CentOS) に Sysdig agent が導入できるか確認しました。

[参考] モニタリング・エージェントのデプロイ

Sysdig Agent install の Requirement:
https://docs.sysdig.com/en/host-requirements-for-agent-installation.html

Sysdig のRequirement では Supported OS に CentOS、RHEL はありますが。AIX、SUSE は記載がありません。
今回は、CentOS 確認します。


環境

IBM Cloud Power Systems Virtual Server
HW: S922
OS: CentOS 8


確認

・ホスト名確認

[root@test-centos ~]# hostname
test-centos

・OS確認

[root@test-centos ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
[root@test-centos ~]#

・yum repository を確認

[root@test-centos ~]# yum repolist
repo id                                                  repo name
appstream                                                CentOS Linux 8 - AppStream
baseos                                                   CentOS Linux 8 - BaseOS
extras                                                   CentOS Linux 8 - Extras

・ kernel 確認

[root@test-centos ~]# uname -r
4.18.0-240.10.1.el8_3.ppc64le
Sysdig agent 導入前提 rpm の導入
[root@test-centos ~]# yum -y install kernel-devel-$(uname -r)
CentOS Linux 8 - AppStream                                                                        3.9 kB/s | 4.3 kB     00:01
CentOS Linux 8 - AppStream                                                                        2.4 MB/s | 7.2 MB     00:03
CentOS Linux 8 - BaseOS                                                                           2.0 kB/s | 3.9 kB     00:01
CentOS Linux 8 - BaseOS                                                                           868 kB/s | 3.8 MB     00:04
CentOS Linux 8 - Extras                                                                           1.2 kB/s | 1.5 kB     00:01
CentOS Linux 8 - Extras                                                                           6.4 kB/s | 9.8 kB     00:01
No match for argument: kernel-devel-4.18.0-240.10.1.el8_3.ppc64le
Error: Unable to find a match: kernel-devel-4.18.0-240.10.1.el8_3.ppc64le
[root@test-centos ~]#

-> 対応するrpm は存在しないとのこと...

「kernel-devel*」 でyum search を実施するとkernel-devel.ppc64le は存在しています。

[root@test-centos ~]# yum search kernel-devel*
Last metadata expiration check: 0:02:35 ago on Tue 27 Jul 2021 02:10:46 AM UTC.
================================================== Name Matched: kernel-devel* ===================================================
kernel-devel.ppc64le : Development package for building kernel modules to match the kernel

バージョン指定せず、kernel-devel.ppc64le を導入します。

[root@test-centos ~]# yum -y install kernel-devel.ppc64le
Last metadata expiration check: 0:02:56 ago on Tue 27 Jul 2021 02:10:46 AM UTC.
Dependencies resolved.
==================================================================================================================================
 Package                        Architecture              Version                                  Repository                Size
==================================================================================================================================
Installing:
 kernel-devel                   ppc64le                   4.18.0-305.10.2.el8_4                    baseos                    18 M


Transaction Summary
==================================================================================================================================
Install  1 Package


Total download size: 18 M
Installed size: 48 M
Downloading Packages:
kernel-devel-4.18.0-305.10.2.el8_4.ppc64le.rpm                                                    2.3 MB/s |  18 MB     00:07
----------------------------------------------------------------------------------------------------------------------------------
Total                                                                                             2.2 MB/s |  18 MB     00:08
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                          1/1
  Installing       : kernel-devel-4.18.0-305.10.2.el8_4.ppc64le                                                               1/1
  Running scriptlet: kernel-devel-4.18.0-305.10.2.el8_4.ppc64le                                                               1/1
  Verifying        : kernel-devel-4.18.0-305.10.2.el8_4.ppc64le                                                               1/1


Installed:
  kernel-devel-4.18.0-305.10.2.el8_4.ppc64le


Complete!
[root@test-centos ~]#

導入できました!

確認

[root@test-centos ~]# rpm -qa | grep kernel-devel
kernel-devel-4.18.0-305.10.2.el8_4.ppc64le
[root@test-centos ~]#

これで前提 rpm は導入できました。

続いて、Sysdig agent が導入できるかどうかを確認します。

Case 1. Sysdig agent 導入実行(インストールスクリプト使用)
[root@test-centos ~]#  curl -sL https://ibm.biz/install-sysdig-agent | sudo bash -s -- --access_key MONITORING_ACCESS_KEY --collector COLLECTOR_ENDPOINT --collector_port 6443 --secure true --tags TAG_DATA --additional_conf 'sysdig_capture_enabled: false'
* Detecting operating system
Unsupported operating system. Please consider contacting support@sysdigcloud.com or trying the manual installation.

サポートがないOSとのこと。
manual installation を試したらできるのかもしれません。

-> インストールスクリプト( https://ibm.biz/install-sysdig-agent ) ではアーキテクチャー確認の分岐にppc64le がないため、unsupported へ分類されます。

ARCH=$(uname -m)
if [[ ! $ARCH = *86 ]] && [ ! $ARCH = "x86_64" ] && [ ! $ARCH = "s390x" ]; then
    unsupported
fi

Case 2. Sysdig agent 導入実行 (マニュアル・インストール)

手動での導入を試します。

Agent Install: Manual Linux Installation : CentOS, RHEL, Fedora, Amazon AMI, Amazon Linux 2

・yum repository 「draios」の導入

[root@test-centos ~]# rpm --import https://download.sysdig.com/DRAIOS-GPG-KEY.public
[root@test-centos ~]# echo $?
0
[root@test-centos ~]# curl -s -o /etc/yum.repos.d/draios.repo http://download.sysdig.com/stable/rpm/draios.repo
[root@test-centos ~]# echo $?
0
[root@test-centos ~]# yum repolist
repo id                                                  repo name
appstream                                                CentOS Linux 8 - AppStream
baseos                                                   CentOS Linux 8 - BaseOS
draios                                                   Draios
extras                                                   CentOS Linux 8 - Extras

-> 「draios」 リポジトリが追加されました。

[root@test-centos ~]# rpm -i http://mirror.us.leaseweb.net/epel/6/i386/epel-release-6-8.noarch.rpm
curl: (22) The requested URL returned error: 404 Not Found
error: skipping http://mirror.us.leaseweb.net/epel/6/i386/epel-release-6-8.noarch.rpm - transfer failed

-> Not found

epel-release* を検索してみます。

[root@test-centos ~]# yum search epel-release*
Draios                                                                                            158  B/s | 309  B     00:01
Errors during downloading metadata for repository 'draios':
  - Status code: 404 for https://download.sysdig.com/stable/rpm/ppc64le/repodata/repomd.xml (IP: 216.137.37.33)
Error: Failed to download metadata for repo 'draios': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

-> draios リポジトリが邪魔をして、検索できていないようです。

draios リポジトリーを使用不可にし (enabled=0) epel* を探してみます。

[root@test-centos yum.repos.d]# yum repolist
repo id                                                  repo name
appstream                                                CentOS Linux 8 - AppStream
baseos                                                   CentOS Linux 8 - BaseOS
extras                                                   CentOS Linux 8 - Extras
[root@test-centos yum.repos.d]# yum search epel*
Last metadata expiration check: 0:12:29 ago on Wed 28 Jul 2021 01:19:48 AM UTC.
====================================================== Name Matched: epel* =======================================================
epel-next-release.noarch : Extra Packages for Enterprise Linux Next repository configuration
epel-release.noarch : Extra Packages for Enterprise Linux repository configuration


[root@test-centos yum.repos.d]#

「epel-next-release.noarch」、「epel-release.noarch」 が見つかりました。
「epel-release.noarch」を導入します。

[root@test-centos yum.repos.d]# yum install epel-release.noarch
Last metadata expiration check: 0:14:25 ago on Wed 28 Jul 2021 01:19:48 AM UTC.
Dependencies resolved.
==================================================================================================================================
 Package                           Architecture                Version                          Repository                   Size
==================================================================================================================================
Installing:
 epel-release                      noarch                      8-11.el8                         extras                       24 k


Transaction Summary
==================================================================================================================================
Install  1 Package


Total download size: 24 k
Installed size: 35 k
Is this ok [y/N]: y
Downloading Packages:
epel-release-8-11.el8.noarch.rpm                                                                   32 kB/s |  24 kB     00:00
----------------------------------------------------------------------------------------------------------------------------------
Total                                                                                              17 kB/s |  24 kB     00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                          1/1
  Installing       : epel-release-8-11.el8.noarch                                                                             1/1
  Running scriptlet: epel-release-8-11.el8.noarch                                                                             1/1
  Verifying        : epel-release-8-11.el8.noarch                                                                             1/1


Installed:
  epel-release-8-11.el8.noarch


Complete!
[root@test-centos yum.repos.d]#


[root@test-centos yum.repos.d]# yum repolist
repo id                                     repo name
appstream                                   CentOS Linux 8 - AppStream
baseos                                      CentOS Linux 8 - BaseOS
epel                                        Extra Packages for Enterprise Linux 8 - ppc64le
epel-modular                                Extra Packages for Enterprise Linux Modular 8 - ppc64le
extras                                      CentOS Linux 8 - Extras
[root@test-centos yum.repos.d]#

-> epel、epel-modular が追加されました。


[root@test-centos yum.repos.d]# vi draios.repo
[draios]
name=Draios
baseurl=https://download.sysdig.com/stable/rpm/$basearch
enabled=1
gpgcheck=1
gpgkey=https://download.sysdig.com/DRAIOS-GPG-KEY.public
# repo_gpgcheck=1
[root@test-centos yum.repos.d]# yum search draios-agent
Draios                                                                                            156  B/s | 309  B     00:01
Errors during downloading metadata for repository 'draios':
  - Status code: 404 for https://download.sysdig.com/stable/rpm/ppc64le/repodata/repomd.xml (IP: 216.137.37.19)
Error: Failed to download metadata for repo 'draios': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

-> baseurlにある $basearch が ppc64le となり、存在していないと推測されます。

・$basearch を指定して確認してみます。

①x86_64 の場合

[root@test-centos yum.repos.d]# vi draios.repo
[draios]
name=Draios
# baseurl=https://download.sysdig.com/stable/rpm/$basearch
baseurl=https://download.sysdig.com/stable/rpm/x86_64
enabled=1
gpgcheck=1
gpgkey=https://download.sysdig.com/DRAIOS-GPG-KEY.public
# repo_gpgcheck=1


[root@test-centos yum.repos.d]# yum search draios-agent
Draios                                                                                            102 kB/s | 291 kB     00:02
Last metadata expiration check: 0:00:01 ago on Wed 28 Jul 2021 01:43:30 AM UTC.
=============================================== Name Exactly Matched: draios-agent ===============================================
draios-agent.x86_64 : Sysdig Agent
=================================================== Name Matched: draios-agent ===================================================
draios-agent-kmodule.x86_64 : Sysdig Agent
draios-agent-slim.x86_64 : Sysdig Agent
draios-agentino.x86_64 : Sysdig Agent
draios-agentone.x86_64 : Sysdig Agent

-> x86_64 の draios-agent は存在しています。

② ppc64le の場合

[root@test-centos yum.repos.d]# vi draios.repo
[draios]
name=Draios
# baseurl=https://download.sysdig.com/stable/rpm/$basearch
baseurl=https://download.sysdig.com/stable/rpm/ppc64le
enabled=1
gpgcheck=1
gpgkey=https://download.sysdig.com/DRAIOS-GPG-KEY.public
# repo_gpgcheck=1


[root@test-centos yum.repos.d]# yum search draios-agent
Draios                                                                                            157  B/s | 309  B     00:01
Errors during downloading metadata for repository 'draios':
  - Status code: 404 for https://download.sysdig.com/stable/rpm/ppc64le/repodata/repomd.xml (IP: 216.137.37.115)
Error: Failed to download metadata for repo 'draios': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

-> 見つかりません。

③ noarch の場合

[root@test-centos yum.repos.d]# vi draios.repo
[draios]
name=Draios
# baseurl=https://download.sysdig.com/stable/rpm/$basearch
baseurl=https://download.sysdig.com/stable/rpm/noarch
enabled=1
gpgcheck=1
gpgkey=https://download.sysdig.com/DRAIOS-GPG-KEY.public
# repo_gpgcheck=1


[root@test-centos yum.repos.d]# yum search draios-agent
Draios                                                                                            160  B/s | 308  B     00:01
Errors during downloading metadata for repository 'draios':
  - Status code: 404 for https://download.sysdig.com/stable/rpm/noarch/repodata/repomd.xml (IP: 216.137.37.115)
Error: Failed to download metadata for repo 'draios': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

-> 見つかりません。


結果

Sysdig agent は PowerVS のLinux(CoreOS)のppc64leに対応するモジュールが存在しておらず導入ができませんでした。
今後導入可能になるかは、チェックしておきたいと思います。

以上です。

1
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
1
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?