在 Linux 上管理 Workload Protection 代理程式 Power Virtual Server
在 IBM Cloud 中提供 IBM Cloud® Security and Compliance Center Workload Protection 服務的實例後,您可以在 Linux 主機上部署 Workload Protection 代理程式,以 IBM® Power® Virtual Server 上部署 代理,以收集事件並保護您的工作負載。
在 Linux 主機上新增代理程式 Power Virtual Server
請依照以下步驟,在 Power Virtual Server 上將代理程式新增至 Linux 主機:
-
取得公用或專用汲取 URL。 如需相關資訊,請參閱 收集器端點。
-
安裝核心標頭。 當您安裝 Workload Protection 代理程式時,代理程式會使用核心標頭檔。 請選擇一個發行版,並執行對應的指令。
如果是 Debian 和 Ubuntu Linux 發行套件,請執行下列指令:
apt-get -y install linux-headers-$(uname -r)如果是 RHEL、CentOS 和 Fedora Linux 發行套件,請執行下列指令:
yum -y install kernel-devel-$(uname -r) -
請執行以下指令,以部署 Workload Protection 代理程式:
curl -sL https://ibm.biz/install-sysdig-agent | sudo bash -s -- -a ACCESS_KEY -c COLLECTOR_ENDPOINT --collector_port 6443 --tags TAG_DATA --secure true --additional_conf 'sysdig_api_endpoint: API_ENDPOINT\nhost_scanner:\n enabled: true\n scan_on_start: true\nkspm_analyzer:\n enabled: true'其中:
ACCESS_KEY- 該實例的攝入金鑰。
COLLECTOR_ENDPOINT- Workload Protection 實例所屬區域的公共或私有取用點 URL。 若要取得端點,請參閱收集器端點。 例如,
ingest.private.us-east.security-compliance-secure.cloud.ibm.com。 API_ENDPOINT- Workload Protection 實例所屬區域的公開或私有 API 端點 URL。 如需取得端點,請參閱「API 端點」。 請勿在端點名稱中包含
https://或/api。 例如,private.us-east.security-compliance-secure.cloud.ibm.com。 TAG_DATA- 以逗號分隔的標籤,格式為
TAG_NAME:TAG_VALUE。 您可以為您的 Workload Protection 代理程式關聯一個或多個標籤。 例如,role:serviceX,location:us-south。
若要安裝 cURL,,請在 RHEL 發行版上執行
yum -q -y install curl,在 CentOS, 及 Fedora Linux 發行版上執行相應指令。 -
請執行以下指令,以確認 Workload Protection 代理程式是否正在執行:
ps -ef | grep sysdig -
請檢查代理程式日誌。 最新的 Workload Protection 代理程式日誌位於
/opt/draios/logs目錄中的draios.log檔案內。若要檢查是否有錯誤,請執行以下指令:
grep error /opt/draios/logs/draios.log
更新代理程式
若要更新 Workload Protection 代理程式,請依照以下步驟操作:
-
執行以下指令以清除 yum 快取:
sudo yum clean expire-cache -
請執行以下指令來更新代理程式:
sudo yum -y install draios-agent
移除代理程式
若要移除 Workload Protection 代理程式,請執行以下指令:
sudo yum erase draios-agent
檢查代理程式狀態
若要檢查代理程式狀態,請執行以下其中一個指令:
service dragent status
systemctl status dragent
檢視代理程式日誌
最新的 Workload Protection 代理程式日誌位於 /opt/draios/logs 目錄中的 draios.log 檔案內。
若要檢視漏洞掃描的日誌,請執行以下指令:
grep host-scanner /opt/draios/logs/draios.log
若要檢視態勢管理日誌,請執行以下指令:
grep kspm-analyzer /opt/draios/logs/draios.log
若要檢查是否有錯誤,請執行以下指令:
grep -i error /opt/draios/logs/draios.log