Agent skill
elk-installer
安裝 Linux 伺服器上安裝與設定 Elastic Stack(Elasticsearch、Logstash、Kibana、Fleet Server),包含 OS 更新、套件庫設定、組態、服務啟動、測試與結果回報。當使用者提供正式環境的 SSH 存取並希望自動化安裝 ELK/Elastic Stack(RHEL 9+、Oracle Linux 9+、SLES 15+、Debian 12+、Photon OS 5+)時使用。
Install this agent skill to your Project
npx add-skill https://github.com/jeff1121/MySkills/tree/001-skill-framework/skills/elk-installer
SKILL.md
ELK 安裝器
概覽
透過隨附的 Python SSH 安裝腳本在遠端 Linux 主機安裝、設定並驗證 Elasticsearch、Logstash、Kibana 與 Fleet Server(Elastic Agent)。指令一律在代理端機器上執行,不要在本機安裝。
支援平台
- SUSE Linux Enterprise Server 15+
- Red Hat Enterprise Linux 9+
- Photon OS 5+
- Oracle Linux 9+
- Debian Linux 12+
必要輸入
在進行任何變更前先收集 SSH 連線資訊:
- HostAddr: address or IP
- HostPort: SSH port
- HostUser: login user
- HostPass: login password
提示:若未提供設定選項,先詢問並告知預設值:
- Elastic 主版本(預設 8)
- 節點模式(單節點或多節點)
- Elasticsearch 與 Kibana 綁定位址
- Elasticsearch HTTP 連接埠(預設 9200)
- Kibana 連接埠(預設 5601)
- Logstash Beats 連接埠(預設 5044)
- Fleet Server 綁定位址(預設為 HostAddr)
- Fleet Server 連接埠(預設 8220)
- JVM heap size(預設 2g)
- 是否開放 Elasticsearch、Kibana、Logstash、Fleet Server 的防火牆連接埠(預設 9200、5601、5044、8220)
- 多節點的 seed hosts 與 initial masters
提示範例:
請提供 SSH 連線資訊:
HostAddr:
HostPort:
HostUser:
HostPass:
工作流程
1. 在代理端機器安裝前置需求
- 安裝 SSH 安裝器所需的 Python 相依套件:
python3 -m pip install -r scripts/requirements.txt
2. 執行 SSH 安裝器(建議)
- 執行
python3 scripts/main.py進入互動式提示,或直接帶入旗標。 - 套用變更前先確認設定摘要。
- 目標主機需具備 root 權限或免密 sudo。
- 多節點情境下,每台節點各跑一次,並使用相同的 seed host 與 initial master 值。
- Fleet Server 會透過 Elastic Agent complete 版(tarball)安裝並註冊到 Kibana Fleet。
指令範例:
python3 scripts/main.py \
--host 10.0.0.10 \
--user root \
--fleet-server-host 10.0.0.10 \
--open-firewall
3. 回報結果
- 擷取腳本輸出摘要並回報:
- Elasticsearch URL
- Kibana URL
- Fleet Server URL
- 產生的 elastic 密碼
- 提醒使用者妥善保存密碼。
- 若在 Photon OS 上略過防火牆規則,需明確說明。
4. 備援流程(僅在腳本受阻時使用)
- 改用 OS 專屬參考文件進行手動步驟:
references/os-rhel9-oracle9.mdreferences/os-sles15.mdreferences/os-debian12.mdreferences/os-photon5.md
- 使用
references/elastic-config.md取得組態範本。
疑難排解(快速)
- SSH 失敗:確認網路、帳密與 sudo 權限。
- Elasticsearch 無法啟動:檢查
journalctl -u elasticsearch與組態語法。 - Kibana 無法連線:確認帳密、CA 與
elasticsearch.hosts。 - Logstash pipeline 錯誤:執行組態測試並查看
/var/log/logstash/logstash-plain.log。 - Fleet Server 無法啟動:確認
elastic-agent服務狀態與/opt/Elastic/Agent/data/elastic-agent-*/logs。
腳本
scripts/main.py- SSH 安裝 CLI 進入點scripts/installer.py- 遠端安裝流程編排scripts/commands.py- OS 專屬指令與組態範本scripts/ssh_client.py- SSH 客戶端包裝器scripts/requirements.txt- Python 相依套件
參考文件
references/os-rhel9-oracle9.mdreferences/os-sles15.mdreferences/os-debian12.mdreferences/os-photon5.mdreferences/elastic-config.md
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
canvas-design
Design philosophy-driven visual art creation. For posters, artworks, graphic design, and other static visual outputs. Produce original designs without copying existing artworks. Output .md (design philosophy) + .pdf or .png (canvas).
Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
pptx
Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks
video-downloader
下載線上影片(YouTube 與其他平台),以 yt-dlp/ffmpeg 進行格式選擇、字幕與播放清單處理;在符合平台條款與版權下操作。
k8s-installer
自動化安裝 Kubernetes 叢集的 AI Agent Skill
Didn't find tool you were looking for?