142 lines
3.4 KiB
Markdown
142 lines
3.4 KiB
Markdown
# 🖥️ Checkmk OS Info
|
|
|
|

|
|

|
|

|
|

|
|
|
|
MKP-Erweiterung für **Checkmk Community 2.5.x**, die auf überwachten Hosts einen eigenen Service **„Betriebssystem“** bereitstellt.
|
|
|
|
⬅️ [Zurück zur Plugin-Übersicht](../README.md)
|
|
|
|
## ✨ Funktionen
|
|
|
|
Der Service zeigt:
|
|
|
|
- Betriebssystem bzw. Linux-Distribution
|
|
- Betriebssystem-Version / Windows-Build
|
|
- Architektur
|
|
- Kernel-Version
|
|
- OS-ID und Version-ID
|
|
|
|
### Unterstützte Plattformen
|
|
|
|
<p>
|
|
<img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/linux.svg" width="24" height="24" alt="Linux"> <strong>Linux</strong>
|
|
<img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/microsoft-windows.svg" width="24" height="24" alt="Windows"> <strong>Windows</strong>
|
|
<img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/apple.svg" width="24" height="24" alt="macOS"> <strong>macOS</strong>
|
|
</p>
|
|
|
|
## 📂 Repository-Struktur
|
|
|
|
```text
|
|
os-info/
|
|
├── src/
|
|
│ ├── agents/
|
|
│ │ ├── plugins/
|
|
│ │ │ └── os_info
|
|
│ │ └── windows/
|
|
│ │ └── plugins/
|
|
│ │ └── os_info.ps1
|
|
│ └── cmk_addons_plugins/
|
|
│ └── os_info/
|
|
│ ├── agent_based/
|
|
│ │ └── os_info.py
|
|
│ └── checkman/
|
|
│ └── os_info
|
|
├── dist/
|
|
│ └── os_info-1.0.0.mkp
|
|
├── CHANGELOG.md
|
|
├── PROJECT.md
|
|
├── LICENSE
|
|
└── README.md
|
|
```
|
|
|
|
## 📥 Installation des MKP
|
|
|
|
Das fertige Paket befindet sich unter `dist/os_info-1.0.0.mkp`.
|
|
|
|
```bash
|
|
mkp add /tmp/os_info-1.0.0.mkp
|
|
mkp enable os_info 1.0.0
|
|
cmk -R
|
|
```
|
|
|
|
Kontrolle:
|
|
|
|
```bash
|
|
mkp list
|
|
```
|
|
|
|
Der Eintrag `os_info` sollte als `Enabled (active on this site)` erscheinen.
|
|
|
|
## <img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/linux.svg" width="24" height="24" alt="Linux"> Agent-Plug-in für Linux / macOS
|
|
|
|
Nach Aktivierung des MKP liegt das Plug-in unter:
|
|
|
|
```text
|
|
~/local/share/check_mk/agents/plugins/os_info
|
|
```
|
|
|
|
Auf den Zielhost kopieren:
|
|
|
|
```bash
|
|
scp ~/local/share/check_mk/agents/plugins/os_info \
|
|
root@HOST:/usr/lib/check_mk_agent/plugins/os_info
|
|
```
|
|
|
|
Danach auf dem Zielhost:
|
|
|
|
```bash
|
|
chmod 755 /usr/lib/check_mk_agent/plugins/os_info
|
|
/usr/lib/check_mk_agent/plugins/os_info
|
|
```
|
|
|
|
Die Ausgabe muss mit `<<<os_info:sep(9)>>>` beginnen.
|
|
|
|
## <img src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/microsoft-windows.svg" width="24" height="24" alt="Windows"> Agent-Plug-in für Windows
|
|
|
|
Quelldatei auf dem Checkmk-Server:
|
|
|
|
```text
|
|
~/local/share/check_mk/agents/windows/plugins/os_info.ps1
|
|
```
|
|
|
|
Ziel auf dem Windows-Host:
|
|
|
|
```text
|
|
C:\ProgramData\checkmk\agent\plugins\os_info.ps1
|
|
```
|
|
|
|
## 🔎 Service Discovery
|
|
|
|
```bash
|
|
cmk -d HOSTNAME | grep -A2 '^<<<os_info'
|
|
cmk -vI HOSTNAME
|
|
cmk -R
|
|
```
|
|
|
|
Anschließend erscheint beim Host der Service **Betriebssystem**.
|
|
|
|
## 🧰 Fehlersuche
|
|
|
|
```bash
|
|
find ~/local -type f -name 'os_info*'
|
|
mkp list
|
|
cmk -d HOSTNAME | grep -A2 '^<<<os_info'
|
|
```
|
|
|
|
## 🛠️ Kompatibilität
|
|
|
|
- Checkmk Community 2.5.x
|
|
- Check API V2
|
|
- Linux-Agent
|
|
- Windows-Agent
|
|
- macOS grundsätzlich unterstützt
|
|
|
|
**Aktuelle Paketversion:** `1.0.0`
|
|
|
|
## ⚖️ Lizenz
|
|
|
|
GPL-2.0
|