CheckMK Integration
WARNING
Overall State
0/9
Hosts Online
0
Hosts with Updates
0/6
Disks Failed/Total
0
VM Endpoints
0
Storage Endpoints
API Token
Use this token to authenticate CheckMK against FleetPilot1cbd7e5fc564fed36d055b85a340c7eb662209a4d259f2dca035e3bdd6c775e2
Pass as HTTP header: X-FleetPilot-Token: <token>
or query parameter: ?token=<token>
API Endpoints
| Endpoint | Method | Description | Use In CheckMK | Test |
|---|---|---|---|---|
/api/checkmk/agent |
GET | Full <<<local>>> agent output — all hosts, disks, VMs, storage |
Datasource Program | |
/api/checkmk/host/<name> |
GET | Piggyback data for a specific host | Piggyback | |
/api/checkmk/hosts |
GET | JSON list of all configured hosts | Helper | |
/api/checkmk/status |
GET | Structured JSON status summary (Grafana / REST API) | REST / Grafana |
Setup Instructions
Place this script on the CheckMK monitoring host (or any host monitored by CheckMK). It queries FleetPilot and outputs CheckMK-compatible service lines.
- Download the script: fleetpilot_check
- Copy to CheckMK agent local directory:
cp fleetpilot_check /usr/lib/check_mk_agent/local/ - Make executable:
chmod +x /usr/lib/check_mk_agent/local/fleetpilot_check - Run service discovery in CheckMK — FleetPilot services will appear automatically
View script source
#!/bin/bash # FleetPilot CheckMK Local Check Script # Generated by FleetPilot — place in /usr/lib/check_mk_agent/local/ # Make executable: chmod +x /usr/lib/check_mk_agent/local/fleetpilot_check # # This script queries the FleetPilot REST API and outputs # CheckMK-compatible local check lines. # # Configuration: FLEETPILOT_URL="https://fleetpilot.home" FLEETPILOT_TOKEN="1cbd7e5fc564fed36d055b85a340c7eb662209a4d259f2dca035e3bdd6c775e2" TIMEOUT=10 # Fetch data from FleetPilot RESPONSE=$(curl -sf --max-time "$TIMEOUT" \ -H "X-FleetPilot-Token: $FLEETPILOT_TOKEN" \ "$FLEETPILOT_URL/api/checkmk/agent" 2>/dev/null) if [ $? -ne 0 ] || [ -z "$RESPONSE" ]; then echo '2 "FleetPilot Agent" - FleetPilot API unreachable' exit 0 fi # Output the agent data directly (already in <<<local>>> format) echo "$RESPONSE"
Live Agent Output Preview
Click Refresh to load live output...
Host Status Overview
| Host | IP | Status | OS | Pending Updates | Security Updates | Last Seen |
|---|---|---|---|---|---|---|
| pve-01 | 192.0.2.10 |
unknown | — | Up to date | 0 | — |
| pve-02 | 192.0.2.11 |
unknown | — | Up to date | 0 | — |
| nas | 192.0.2.20 |
unknown | — | Up to date | 0 | — |
| docker-01 | 192.0.2.30 |
unknown | — | Up to date | 0 | — |
| web-01 | 192.0.2.31 |
unknown | — | Up to date | 0 | — |
| pihole | 192.0.2.53 |
unknown | — | Up to date | 0 | — |
| backup | 192.0.2.40 |
unknown | — | Up to date | 0 | — |
| lab-01 | 192.0.2.60 |
unknown | — | Up to date | 0 | — |
| win-desk | 192.0.2.70 |
unknown | — | Up to date | 0 | — |